mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-28 21:08:48 +01:00
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:
parent
6e65435895
commit
10fecaca38
1 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue