mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-05 12:30:15 +01:00
fix failing tests
This commit is contained in:
parent
07de6a8358
commit
7084c11263
12 changed files with 61 additions and 45 deletions
|
|
@ -68,10 +68,10 @@ Feature: dependencies
|
|||
And "test 2" depends on "test 1"
|
||||
When I go to the "dependencies" project
|
||||
Then I should see "test 2" in the deferred container
|
||||
And I should see "test 1" in the action container
|
||||
And I should see "test 1" in the context container for "@pc"
|
||||
When I mark "test 1" as complete
|
||||
Then I should see "test 1" in the completed container
|
||||
And I should see "test 2" in the action container
|
||||
And I should see "test 2" in the context container for "@pc"
|
||||
And I should not see "test 2" in the deferred container
|
||||
And I should see empty message for deferred todos of project
|
||||
|
||||
|
|
@ -86,9 +86,9 @@ Feature: dependencies
|
|||
And "test 2" depends on "test 1"
|
||||
When I go to the "dependencies" project
|
||||
Then I should see "test 2" in the deferred container
|
||||
And I should see "test 1" in the action container
|
||||
And I should see "test 1" in the context container for "@pc"
|
||||
When I delete the action "test 1"
|
||||
Then I should see "test 2" in the action container
|
||||
Then I should see "test 2" in the context container for "@pc"
|
||||
And I should not see "test 2" in the deferred container
|
||||
And I should see empty message for deferred todos of project
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ Feature: dependencies
|
|||
Then I should see "test 3" within the dependencies of "test 1"
|
||||
And I should not see "test 2"
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario: Dragging an action to a completed action will not add it as a dependency
|
||||
Given I have a context called "@pc"
|
||||
And I have a project "dependencies" that has the following todos
|
||||
|
|
@ -122,7 +122,7 @@ Feature: dependencies
|
|||
When I go to the "dependencies" project
|
||||
And I drag "test 1" to "test 3"
|
||||
Then I should see an error flash message saying "Cannot add this action as a dependency to a completed action!"
|
||||
And I should see "test 1" in the project container of "dependencies"
|
||||
And I should see "test 1" in the context container for "@pc"
|
||||
|
||||
@javascript
|
||||
Scenario Outline: Marking a successor as complete will update predecessor
|
||||
|
|
@ -148,7 +148,7 @@ Feature: dependencies
|
|||
| tag page for "bla" | context |
|
||||
| tag page for "bla" | project |
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario Outline: Marking a successor as active will update predecessor
|
||||
Given I have a context called "@pc"
|
||||
And I have selected the view for group by <grouping>
|
||||
|
|
@ -171,5 +171,6 @@ Feature: dependencies
|
|||
Scenarios:
|
||||
| page | grouping |
|
||||
| "dependencies" project | project |
|
||||
| "dependencies" project | context |
|
||||
| tag page for "bla" | context |
|
||||
| tag page for "bla" | project |
|
||||
|
|
@ -55,7 +55,7 @@ Feature: Edit a next action from every page
|
|||
@javascript @wip
|
||||
Scenario Outline: Changing container of the todo in that container will hide it
|
||||
# this script fails on https://code.google.com/p/selenium/issues/detail?id=3075 for selenium-webdriver > 2.14.
|
||||
# and selenium-webdriver < 2.20 fails on firefox 11 :-( So @wip for now. This may work on webkit though
|
||||
# and selenium-webdriver < 2.20 fails on firefox 11 :-( So @wip for now. This may work with webkit though
|
||||
Given I have a todo "delete me" in the context "@home" in the project "do it"
|
||||
And I have a project "go for it"
|
||||
And I have selected the view for group by <grouping>
|
||||
|
|
@ -77,6 +77,7 @@ Feature: Edit a next action from every page
|
|||
@javascript
|
||||
Scenario Outline: Deleting the last todo in container will show empty message # only project, context, tag, not todo
|
||||
Given I have a context called "@home"
|
||||
And I have selected the view for group by <grouping>
|
||||
And I have a project "my project" that has the following todos
|
||||
| context | description | tags |
|
||||
| @home | first action | test, bla |
|
||||
|
|
@ -90,12 +91,15 @@ Feature: Edit a next action from every page
|
|||
Then I should see empty message for todos of <page type>
|
||||
|
||||
Scenarios:
|
||||
| page | page type |
|
||||
| "my project" project | project |
|
||||
| context page for "@home" | context |
|
||||
| tag page for "bla" | tag |
|
||||
| page | page type | grouping |
|
||||
| "my project" project | project | project |
|
||||
| "my project" project | project | context |
|
||||
| context page for "@home" | context | context |
|
||||
| context page for "@home" | context | project |
|
||||
| tag page for "bla" | tag | context |
|
||||
| tag page for "bla" | tag | project |
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario Outline: I can mark an active todo complete and it will update empty messages
|
||||
Given I have a context called "visible context"
|
||||
And I have a project called "visible project"
|
||||
|
|
@ -134,7 +138,7 @@ Feature: Edit a next action from every page
|
|||
| "visible project" project | project |
|
||||
| context page for "visible context" | context |
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario Outline: I can mark a completed todo active and it will update empty messages and context containers
|
||||
Given I have a completed todo with description "visible todo" in project "visible project" with tags "starred" in the context "visible context"
|
||||
And I have selected the view for group by <grouping>
|
||||
|
|
@ -155,8 +159,8 @@ Feature: Edit a next action from every page
|
|||
| home page | home | context | container for context "visible context" |
|
||||
| home page | home | project | container for project "visible project" |
|
||||
|
||||
@javascript
|
||||
Scenario Outline: I can mark a completed todo active and it will update empty messages for pages without context containers
|
||||
@javascript
|
||||
Scenario Outline: I can mark a completed todo active and it will update empty messages for pages without hideable containers
|
||||
Given I have a completed todo with description "visible todo" in project "visible project" with tags "starred" in the context "visible context"
|
||||
When I go to the <page>
|
||||
Then I should see empty message for todos of <page type>
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ Feature: Edit a project
|
|||
Scenario: Moving the todo to the tickler will move todo to tickler container and update empty messages
|
||||
Given I have a project "test" with 1 todos
|
||||
When I go to the "test" project
|
||||
Then I should see "todo 1" in the action container
|
||||
Then I should see "todo 1" in the context container for "Context A"
|
||||
And I should see empty message for deferred todos of project
|
||||
And I should see empty message for completed todos of project
|
||||
When I defer "todo 1" for 1 day
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ Feature: Add new next action from every page
|
|||
| tickler page | context | not see |
|
||||
| tickler page | project | not see |
|
||||
| "test project" project | context | see |
|
||||
| "test project" project | project | see |
|
||||
| context page for "test context" | context | see |
|
||||
| context page for "test context" | project | see |
|
||||
| tag page for "starred" | context | see |
|
||||
| tag page for "starred" | project | see |
|
||||
|
||||
|
|
@ -124,7 +126,9 @@ Feature: Add new next action from every page
|
|||
| tickler page | not see | 0 | 3 | context |
|
||||
| tickler page | not see | 0 | 3 | project |
|
||||
| "testing" project | see | 3 | 3 | context |
|
||||
| "testing" project | see | 3 | 3 | project |
|
||||
| context page for "test context" | see | 2 | 3 | context |
|
||||
| context page for "test context" | see | 2 | 3 | project |
|
||||
| tag page for "starred" | see | 2 | 3 | context |
|
||||
| tag page for "starred" | see | 2 | 3 | project |
|
||||
|
||||
|
|
@ -199,9 +203,13 @@ Feature: Add new next action from every page
|
|||
| tickler page | context | not see | not see |
|
||||
| tickler page | project | not see | not see |
|
||||
| "visible project" project | project | not see | see |
|
||||
| "visible project" project | context | not see | see |
|
||||
| "hidden project" project | project | see | not see |
|
||||
| "hidden project" project | context | see | not see |
|
||||
| context page for "visible context" | context | not see | see |
|
||||
| context page for "visible context" | project | not see | see |
|
||||
| context page for "other context" | context | not see | not see |
|
||||
| context page for "other context" | project | not see | not see |
|
||||
| tag page for "starred" | context | not see | not see |
|
||||
| tag page for "starred" | project | not see | not see |
|
||||
| tag page for "test" | context | see | see |
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ Then(/^I should (not see|see) "([^"]*)" in the (completed|done today|done this w
|
|||
id = 'completed_rest_of_month_container' if container == 'done this month'
|
||||
|
||||
css = "div##{id} div#line_todo_#{find_todo(todo_description).id}"
|
||||
page.should have_css(css)
|
||||
check_css_visibility(visible, css)
|
||||
end
|
||||
|
||||
|
|
@ -138,9 +137,8 @@ end
|
|||
|
||||
Then /^I should (see|not see) empty message for (done today|done this week|done this month|completed todos|deferred todos|todos) (of done actions|of context|of project|of home|of tag)/ do |visible, state, type|
|
||||
css = "error: wrong state"
|
||||
css = "div#c#{@context.id}-empty-d" if state == "todos" && type == "of context"
|
||||
css = "div#p#{@project.id}-empty-d" if state == "todos" && type == "of project"
|
||||
css = "div#no_todos_in_view" if state == "todos" && (type == "of home" || type == "of tag")
|
||||
css = "div#c#{@context.id}-empty-d" if state == "todos"
|
||||
css = "div#no_todos_in_view" if state == "todos" && ["of home", "of tag", "of context", "of project"].include?(type)
|
||||
css = "div#completed_today_container" if state == "done today"
|
||||
css = "div#completed_rest_of_week_container" if state == "done this week"
|
||||
css = "div#completed_rest_of_month_container" if state == "done this month"
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ Given /^I have ([0-9]+) todos$/ do |count|
|
|||
end
|
||||
|
||||
Given /^I have a todo with description "([^"]*)" in project "([^"]*)" with tags "([^"]*)" in the context "([^"]*)"$/ do |action_description, project_name, tags, context_name|
|
||||
context = @current_user.contexts.where(:name => context_name).first_or_create
|
||||
project = @current_user.projects.where(:name => project_name).first_or_create
|
||||
@todo = @current_user.todos.create!(:context_id => context.id, :project_id => project.id, :description => action_description)
|
||||
@context = @current_user.contexts.where(:name => context_name).first_or_create
|
||||
@project = @current_user.projects.where(:name => project_name).first_or_create
|
||||
@todo = @current_user.todos.create!(:context_id => @context.id, :project_id => @project.id, :description => action_description)
|
||||
@todo.tag_with(tags)
|
||||
@todo.save
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue