fix #1098 where adding a todo to a hidden context in that hidden context page would not show the todo

This commit is contained in:
Reinier Balt 2011-02-08 17:37:14 +01:00
parent 97fae98791
commit 83b5717460
3 changed files with 20 additions and 13 deletions

View file

@ -141,7 +141,7 @@ Feature: Add new next action from every page
| visit | context page for "test context" | action | 1 | not be visible |
| go to | tag page for "starred" | action | 1 | be visible |
@selenium @wip
@selenium
Scenario Outline: Adding a todo to a hidden project does not show the todo
Given I have a hidden project called "hidden project"
And I have a project called "visible project"
@ -165,7 +165,7 @@ Feature: Add new next action from every page
| tag page for "test" | see | see |
@selenium
Scenario: Adding a todo to a hidden context does not show the todo
Scenario: Adding a todo to a hidden context from home page does not show the todo
Given I have a context called "visible context"
And I have a hidden context called "hidden context"
When I go to the home page
@ -174,6 +174,17 @@ Feature: Add new next action from every page
When I submit a new action with description "another new todo" in the context "hidden context"
Then I should not see "another new todo"
@selenium
Scenario: Adding a todo to a context show the todo in that context page
Given I have a context called "visible context"
And I have a hidden context called "hidden context"
When I go to the context page for "visible context"
And I submit a new action with description "a new todo" in the context "visible context"
Then I should see "a new todo"
When I go to the context page for "hidden context"
And I submit a new action with description "another new todo" in the context "hidden context"
Then I should see "another new todo"
@selenium
Scenario: Adding a todo to an empty container hides the empty message # TODO: make outline
And I have a context called "visible context"
@ -191,7 +202,7 @@ Feature: Add new next action from every page
When I go to the home page
And I follow "Add multiple next actions"
And I fill the multiple actions form with "", "a next project", "@anywhere", "new tag"
And I submit the new multiple actions form with
And I submit the new multiple actions form with
"""
a
@ -220,4 +231,4 @@ Feature: Add new next action from every page
"""
Then I should see "You need to submit at least one next action"
Then I should see "You need to submit at least one next action"

View file

@ -90,7 +90,6 @@ end
When /^I submit a new action with description "([^"]*)"$/ do |description|
fill_in "todo[description]", :with => description
submit_next_action_form
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
end
When /^I submit a new action with description "([^"]*)" and the tags "([^"]*)" in the context "([^"]*)"$/ do |description, tags, context_name|
@ -101,19 +100,17 @@ When /^I submit a new action with description "([^"]*)" and the tags "([^"]*)" i
clear_context_name_from_next_action_form
fill_in "todo_context_name", :with => context_name
submit_next_action_form
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
end
When /^I submit a new deferred action with description "([^"]*)" and the tags "([^"]*)" in the context "([^"]*)"$/ do |description, tags, context_name|
fill_in "todo[description]", :with => description
clear_context_name_from_next_action_form
fill_in "context_name", :with => context_name
fill_in "todo_context_name", :with => context_name
fill_in "tag_list", :with => tags
fill_in "todo[show_from]", :with => format_date(@current_user.time + 1.week)
submit_next_action_form
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
end
When /^I submit a new action with description "([^"]*)" to project "([^"]*)" with tags "([^"]*)" in the context "([^"]*)"$/ do |description, project_name, tags, context_name|
@ -123,21 +120,19 @@ When /^I submit a new action with description "([^"]*)" to project "([^"]*)" wit
clear_context_name_from_next_action_form
fill_in "todo_project_name", :with => project_name
fill_in "context_name", :with => context_name
fill_in "todo_context_name", :with => context_name
fill_in "tag_list", :with => tags
submit_next_action_form
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
end
When /^I submit a new action with description "([^"]*)" in the context "([^"]*)"$/ do |description, context_name|
fill_in "todo[description]", :with => description
clear_context_name_from_next_action_form
fill_in "context_name", :with => context_name
fill_in "todo_context_name", :with => context_name
submit_next_action_form
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
end
When /^I submit multiple actions with using$/ do |multiple_actions|