mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-05 00:38:50 +01:00
add cucumber tests for tickler with group by project
This commit is contained in:
parent
b57c63abdb
commit
0607096e7c
4 changed files with 85 additions and 34 deletions
|
|
@ -116,6 +116,13 @@ Given /^I have a deferred todo "([^"]*)" in context "([^"]*)" with tags "([^"]*)
|
|||
@todo.save!
|
||||
end
|
||||
|
||||
Given(/^I have a deferred todo "(.*?)" in the context "(.*?)" in the project "(.*?)"$/) do |action_description, context_name, project_name|
|
||||
step "I have a todo \"#{action_description}\" in the context \"#{context_name}\" in the project \"#{project_name}\""
|
||||
@todo.show_from = @current_user.time + 1.week
|
||||
@todo.save!
|
||||
end
|
||||
|
||||
|
||||
####### COMPLETED TODOS #######
|
||||
|
||||
Given /^I have ([0-9]+) completed todos in project "([^"]*)" in context "([^"]*)"$/ do |count, project_name, context_name|
|
||||
|
|
|
|||
|
|
@ -10,39 +10,60 @@ Feature: Manage deferred todos
|
|||
And there exists a project "manage me" for user "testuser"
|
||||
And I have logged in as "testuser" with password "secret"
|
||||
|
||||
@javascript
|
||||
Scenario: I can add a deferred todo and it will show in the tickler
|
||||
@javascript
|
||||
Scenario Outline: I can add a deferred todo and it will show in the tickler
|
||||
# also adding the first deferred todo will hide the empty message
|
||||
Given I have a context called "test"
|
||||
And I have selected the view for group by <grouping>
|
||||
When I go to the tickler page
|
||||
Then I should see the empty tickler message
|
||||
When I submit a new deferred action with description "a new next action"
|
||||
Then I should see "a new next action"
|
||||
And I should not see the empty tickler message
|
||||
|
||||
Scenarios:
|
||||
| grouping |
|
||||
| context |
|
||||
| project |
|
||||
|
||||
@javascript
|
||||
Scenario: Editing the description of a todo in the tickler updated the todo
|
||||
Scenario Outline: Editing the description of a todo in the tickler updated the todo
|
||||
Given I have a deferred todo "not yet now"
|
||||
And I have selected the view for group by <grouping>
|
||||
When I go to the tickler page
|
||||
Then I should see "not yet now"
|
||||
When I edit the description of "not yet now" to "almost"
|
||||
Then I should not see "not yet now"
|
||||
And I should see "almost"
|
||||
|
||||
@javascript
|
||||
Scenario: Editing the context of a todo moves it to the new context
|
||||
Given I have a context called "A"
|
||||
And I have a context called "B"
|
||||
And I have a deferred todo "not yet now" in the context "A"
|
||||
When I go to the tickler page
|
||||
Then I should see "not yet now" in the context container for "A"
|
||||
When I edit the context of "not yet now" to "B"
|
||||
Then I should see "not yet now" in the context container for "B"
|
||||
And I should not see "not yet now" in the context container for "A"
|
||||
Scenarios:
|
||||
| grouping |
|
||||
| context |
|
||||
| project |
|
||||
|
||||
@javascript
|
||||
Scenario: Removing the show from date from a todo removes it from the tickler
|
||||
Scenario Outline: Editing the container of a todo moves it to the new contaier
|
||||
Given I have a context called "A"
|
||||
And I have a context called "B"
|
||||
And I have a project called "pA"
|
||||
And I have a project called "pB"
|
||||
And I have a deferred todo "not yet now" in the context "A" in the project "pA"
|
||||
And I have selected the view for group by <grouping>
|
||||
When I go to the tickler page
|
||||
Then I should see "not yet now" in the <first container>
|
||||
When I edit the <grouping> of "not yet now" to <new container name>
|
||||
Then I should see "not yet now" in the <new container>
|
||||
And I should not see "not yet now" in the <first container>
|
||||
|
||||
Scenarios:
|
||||
| grouping | first container | new container name | new container |
|
||||
| context | context container for "A" | "B" | context container for "B" |
|
||||
| project | project container for "pA" | "pB" | project container for "pB" |
|
||||
|
||||
@javascript
|
||||
Scenario Outline: Removing the show from date from a todo removes it from the tickler
|
||||
Given I have a deferred todo "not yet now"
|
||||
And I have selected the view for group by <grouping>
|
||||
When I go to the tickler page
|
||||
Then I should see "not yet now"
|
||||
When I remove the show from date from "not yet now"
|
||||
|
|
@ -51,6 +72,11 @@ Feature: Manage deferred todos
|
|||
When I go to the home page
|
||||
Then I should see "not yet now"
|
||||
|
||||
Scenarios:
|
||||
| grouping |
|
||||
| context |
|
||||
| project |
|
||||
|
||||
Scenario: Opening the tickler page shows me all deferred todos
|
||||
Given I have a deferred todo "not yet now"
|
||||
And I have a todo "now is a good time"
|
||||
|
|
@ -59,10 +85,16 @@ Feature: Manage deferred todos
|
|||
And I should not see "now is a good time"
|
||||
|
||||
@javascript
|
||||
Scenario: I can mark an action complete from the tickler
|
||||
Scenario Outline: I can mark an action complete from the tickler
|
||||
Given I have a deferred todo "not yet now"
|
||||
And I have selected the view for group by <grouping>
|
||||
When I go to the tickler page
|
||||
And I mark "not yet now" as complete
|
||||
Then I should not see "not yet now"
|
||||
When I go to the done page
|
||||
Then I should see "not yet now"
|
||||
|
||||
Scenarios:
|
||||
| grouping |
|
||||
| context |
|
||||
| project |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue