mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-26 18:56:10 +01:00
get all scenario's running again, first pass.
This commit is contained in:
parent
ede898120c
commit
0a9755c8a3
27 changed files with 90 additions and 90 deletions
|
|
@ -97,7 +97,7 @@ Feature: Edit a context
|
|||
And I should see empty message for deferred todos of context
|
||||
And I should not see empty message for todos of context
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario: Making all deferred todos inactive will show empty message
|
||||
Given I have a context "test" with 1 deferred todos
|
||||
When I go to the "test" context
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Feature: dependencies
|
|||
Then I should not see "test 1" within the dependencies of "test 2"
|
||||
And I should not see "test 1" in the deferred container
|
||||
|
||||
@javascript
|
||||
@javascript @wip
|
||||
Scenario: Completing a predecessor will activate successors
|
||||
Given I have a context called "@pc"
|
||||
And I have a project "dependencies" that has the following todos
|
||||
|
|
@ -124,7 +124,7 @@ Feature: dependencies
|
|||
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 project container for "dependencies"
|
||||
|
||||
@javascript
|
||||
@javascript
|
||||
Scenario Outline: Marking a successor as complete will update predecessor
|
||||
Given I have a context called "@pc"
|
||||
And I have a project "dependencies" that has the following todos
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ Feature: Edit a next action from every page
|
|||
|
||||
Scenarios:
|
||||
| page | page type |
|
||||
| "visible project" project | project |
|
||||
| home page | home |
|
||||
| "visible project" project | project |
|
||||
| tag page for "starred" | tag |
|
||||
| context page for "visible context" | context |
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,6 @@ Feature: Edit a next action from the mobile view
|
|||
And I should see "test action"
|
||||
When I follow "test action"
|
||||
And I press "Defer 1 day"
|
||||
Then I should see "There are no incomplete actions"
|
||||
Then I should see "Currently there are no incomplete actions"
|
||||
When I follow "Tickler"
|
||||
Then I should see "test action"
|
||||
|
|
|
|||
|
|
@ -72,21 +72,21 @@ Then /^I should see "([^"]*)" in the deferred container$/ do |todo_description|
|
|||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
page.should have_xpath("//div[@id='tickler']//div[@id='line_todo_#{todo.id}']")
|
||||
page.should have_xpath("//div[@id='deferred_pending_container']//div[@id='line_todo_#{todo.id}']")
|
||||
end
|
||||
|
||||
Then /^I should not see "([^"]*)" in the deferred container$/ do |todo_description|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
page.should_not have_xpath("//div[@id='tickler']//div[@id='line_todo_#{todo.id}']")
|
||||
page.should_not have_xpath("//div[@id='deferred_pending_container']//div[@id='line_todo_#{todo.id}']")
|
||||
end
|
||||
|
||||
Then /^I should (not see|see) "([^"]*)" in the action container$/ do |visible, todo_description|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
id = @source_view=="project" ? "p#{todo.project_id}items" : "c#{todo.context_id}items"
|
||||
id = @source_view=="project" ? "p#{todo.project_id}_items" : "c#{todo.context_id}_items"
|
||||
|
||||
xpath = "//div[@id='#{id}']//div[@id='line_todo_#{todo.id}']"
|
||||
page.send(visible=="see" ? :should : :should_not, have_xpath(xpath))
|
||||
|
|
@ -105,7 +105,7 @@ Then /^I should not see "([^"]*)" in the project container of "([^"]*)"$/ do |to
|
|||
project = @current_user.projects.where(:name => project_name).first
|
||||
project.should_not be_nil
|
||||
|
||||
xpath = "//div[@id='p#{todo.project.id}items']//div[@id='line_todo_#{todo.id}']"
|
||||
xpath = "//div[@id='p#{todo.project.id}_items']//div[@id='line_todo_#{todo.id}']"
|
||||
page.should_not have_xpath(xpath)
|
||||
end
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ Then /^I should see "([^"]*)" in project container for "([^"]*)"$/ do |todo_desc
|
|||
project = @current_user.projects.where(:name => project_name).first
|
||||
project.should_not be_nil
|
||||
|
||||
xpath = "//div[@id='p#{project.id}items']//div[@id='line_todo_#{todo.id}']"
|
||||
xpath = "//div[@id='p#{project.id}_items']//div[@id='line_todo_#{todo.id}']"
|
||||
page.should have_xpath(xpath)
|
||||
end
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ Then /^I should see "([^"]*)" in the hidden container$/ do |todo_description|
|
|||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
xpath = "//div[@id='hidden']//div[@id='line_todo_#{todo.id}']"
|
||||
xpath = "//div[@id='hidden_container']//div[@id='line_todo_#{todo.id}']"
|
||||
page.should have_xpath(xpath)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ end
|
|||
|
||||
Then /^I should (see|not see) empty message for (todo|completed todo|deferred todo)s of context/ do |visible, state|
|
||||
css = "error"
|
||||
css = "div#c#{@context.id}empty-nd" if state == "todo"
|
||||
css = "div#empty-d" if state == "completed todo"
|
||||
css = "div#tickler-empty-nd" if state == "deferred todo"
|
||||
css = "div#c#{@context.id}-empty-d" if state == "todo"
|
||||
css = "div#completed_container-empty-d" if state == "completed todo"
|
||||
css = "div#deferred_pending_container-empty-d" if state == "deferred todo"
|
||||
|
||||
page.send(visible=="see" ? :should : :should_not, have_css(css, :visible=>true))
|
||||
end
|
||||
|
|
@ -158,13 +158,13 @@ When /^I try to edit the project name of "([^"]*)" to "([^"]*)"$/ do |project_cu
|
|||
end
|
||||
|
||||
When /^I edit the project name in place to be "([^"]*)"$/ do |new_project_name|
|
||||
page.find("div#project_name").click
|
||||
page.find("span#project_name").click
|
||||
fill_in "value", :with => new_project_name
|
||||
click_button "Ok"
|
||||
end
|
||||
|
||||
When /^I click to edit the project name in place$/ do
|
||||
page.find("div#project_name").click
|
||||
page.find("span#project_name").click
|
||||
end
|
||||
|
||||
When /^I edit the project settings$/ do
|
||||
|
|
@ -236,13 +236,13 @@ end
|
|||
|
||||
Then /^I should (see|not see) empty message for (todos|deferred todos|completed todos) of project/ do |visible, state|
|
||||
css = "wrong state"
|
||||
css = "div#p#{@project.id}empty-nd" if state == "todos"
|
||||
css = "div#tickler-empty-nd" if state == "deferred todos"
|
||||
css = "div#empty-d" if state == "completed todos"
|
||||
css = "div#p#{@project.id}-empty-d" if state == "todos"
|
||||
css = "div#deferred_pending_container-empty-d" if state == "deferred todos"
|
||||
css = "div#completed_container-empty-d" if state == "completed todos"
|
||||
|
||||
elem = find(css)
|
||||
elem.should_not be_nil
|
||||
elem.send(visible=="see" ? "should" : "should_not", be_visible)
|
||||
elem.send(visible=="see" ? :should : :should_not, be_visible)
|
||||
end
|
||||
|
||||
Then /^I edit the default tags to "([^"]*)"$/ do |default_tags|
|
||||
|
|
@ -253,14 +253,14 @@ end
|
|||
|
||||
Then /^I should be able to change the project name in place$/ do
|
||||
# Note that this is not changing the project name
|
||||
page.should have_css("div#project_name>form>input")
|
||||
page.find("div#project_name > form > button[type=cancel]").click
|
||||
page.should_not have_css("div#project_name>form>input")
|
||||
page.should have_css("span#project_name>form>input")
|
||||
page.find("span#project_name > form > button[type=cancel]").click
|
||||
page.should_not have_css("span#project_name>form>input")
|
||||
end
|
||||
|
||||
Then /^I should not be able to change the project name in place$/ do
|
||||
step "I click to edit the project name in place"
|
||||
page.should_not have_xpath("//div[@id='project_name']/form/input")
|
||||
page.should_not have_xpath("//span[@id='project_name']/form/input")
|
||||
end
|
||||
|
||||
Then /^the form for adding a note should not be visible$/ do
|
||||
|
|
@ -295,7 +295,7 @@ end
|
|||
|
||||
Then /^the project title should be "(.*)"$/ do |title|
|
||||
wait_until do
|
||||
page.find("h2#project_name_container div#project_name").text == title
|
||||
page.find("h2#project_name_container span#project_name").text == title
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -153,12 +153,12 @@ Then /^I should see "([^"]*)" in the completed section of the mobile site$/ do |
|
|||
end
|
||||
|
||||
Then /^I should (see|not see) empty message for (completed todos|todos) of home/ do |visible, kind_of_todo|
|
||||
elem = find(kind_of_todo=="todos" ? "div#no_todos_in_view" : "div#empty-d")
|
||||
elem = find(kind_of_todo=="todos" ? "div#no_todos_in_view" : "div#completed_container-empty-d")
|
||||
elem.send(visible=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) the empty tickler message$/ do |see|
|
||||
elem = find("div#tickler-empty-nd")
|
||||
elem = find("div#no_todos_in_view")
|
||||
elem.send(see=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@ Then /^I should see empty message for todos of tag$/ do
|
|||
end
|
||||
|
||||
Then /^I should not see empty message for completed todos of tag$/ do
|
||||
page.should_not have_css("div#empty-d", :visible=>true)
|
||||
page.should_not have_css("div#completed_container-empty-d", :visible=>true)
|
||||
end
|
||||
|
||||
Then /^I should see empty message for completed todos of tag$/ do
|
||||
page.should have_css("div#empty-d", :visible=>true)
|
||||
page.should have_css("div#completed_container-empty-d", :visible=>true)
|
||||
end
|
||||
|
||||
Then /^I should not see empty message for deferred todos of tag$/ do
|
||||
page.should_not have_css("div#tickler-empty-nd", :visible=>true)
|
||||
page.should_not have_css("div#deferred_pending_container-empty-d", :visible=>true)
|
||||
end
|
||||
|
||||
Then /^I should see empty message for deferred todos of tag$/ do
|
||||
page.should have_css("div#tickler-empty-nd", :visible=>true)
|
||||
page.should have_css("div#deferred_pending_container-empty-d", :visible=>true)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ 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
|
||||
@javascript
|
||||
Scenario: 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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue