fix dependency features

This commit is contained in:
Reinier Balt 2012-12-25 15:46:26 +01:00
parent fbe69a9a55
commit 2acfbd8f00
5 changed files with 14 additions and 6 deletions

View file

@ -43,10 +43,10 @@ When /^I edit the dependency of "([^"]*)" to add "([^"]*)" as predecessor$/ do |
page.execute_script %Q{$("#{form_css}").find('input[id$="predecessor_input"]').autocomplete('search')} if Capybara.javascript_driver == :webkit
# wait for auto complete
page.should have_css("a#ui-active-menuitem")
page.should have_css("a.ui-state-focus")
# click first line
page.find(:xpath, "//ul/li[1]/a[@id='ui-active-menuitem']").click
page.find(:css, "ul li a.ui-state-focus").click
# wait for the new dependency to be added to the list
page.should have_css("li#pred_#{predecessor.id}")
@ -97,6 +97,13 @@ Then /^I should see "([^\"]*)" within the dependencies of "([^\"]*)"$/ do |succe
todo = @current_user.todos.find_by_description(todo_description)
todo.should_not be_nil
# open successors
within "div#line_todo_#{todo.id}" do
if !find(:css, "div#successors_todo_#{todo.id}").visible?
find(:css, "a.show_successors").click
end
end
step "I should see \"#{successor_description}\" within \"div#line_todo_#{todo.id}\""
end

View file

@ -15,7 +15,8 @@ When /^I delete the action "([^"]*)"$/ do |action_description|
get_confirm_text.should == "Are you sure that you want to delete the action '#{todo.description}'?"
wait_for_ajax
wait_for_animations_to_end
# commented out: the notice is gone if you want to check for it
# wait_for_animations_to_end
end
When /^I delete the todo "([^"]*)"$/ do |action_description|