Fix failing note deletion tests

Text will remain present because the raw source isn't generated from the
modified DOM.

Also, there were some hard-coded id's in there that have changed.

All Cucumber Selenium tests are now passing.
This commit is contained in:
Eric Allen 2010-04-10 15:22:22 -04:00
parent 6e65435895
commit 10fecaca38

View file

@ -26,8 +26,10 @@ When /^I add note "([^\"]*)" from the "([^\"]*)" project page$/ do |note, projec
end
When /^I delete the first note$/ do
title = selenium.get_text("css=div.container h2")
id = title.split(' ').last
click_link "delete note"
selenium.get_confirmation.should == "Are you sure that you want to delete the note '1'?"
selenium.get_confirmation.should == "Are you sure that you want to delete the note '#{id}'?"
end
When /^I click the icon next to the note$/ do
@ -53,8 +55,11 @@ Then /^I should see note "([^\"]*)" on the notes page$/ do |note|
end
Then /^the first note should disappear$/ do
# the first note contains "A note 1", generated by the Given def above
Then "I should not see \"A note 1\""
title = selenium.get_text("css=div.container h2")
id = title.split(' ').last
wait_for :timeout => 15 do
!selenium.is_visible("note_#{id}")
end
end