migrate deleting a note from notes page to jqeury

This commit is contained in:
Reinier Balt 2010-11-11 22:14:14 +01:00
parent 7b3c07a754
commit 145c9105dd
13 changed files with 145 additions and 84 deletions

View file

@ -50,7 +50,7 @@ Feature: Existing user logging in
| "top secret" project for user "testuser" | "top secret" project for user "testuser" | Logout (Test User) |
| context page for "@secret location" for user "testuser" | context page for "@secret location" for user "testuser" | Logout (Test User) |
@selenium @wip
@selenium
Scenario: When session expires, you should be logged out
When I go to the login page
And I submit the login form as user "testuser" with password "secret"

View file

@ -22,7 +22,7 @@ Feature: View, add, remove notes
And I should see note "My Note A" on the notes page
Then the badge should show 1
@selenium
@selenium @wip
Scenario: Delete note from notes page
Given I have a project "Pass Final Exam" with 2 notes
When I go to the notes page
@ -36,3 +36,10 @@ Feature: View, add, remove notes
When I visit the "Pass Final Exam" project
And I click the icon next to the note
Then I should see the note text
@selenium @wip
Scenario: Edit a note
Given I have a project "Pass Final Exam" with 2 notes
When I go to the notes page
And I edit the note to "edited note"
Then I should see "edited note"

View file

@ -28,7 +28,7 @@ end
When /^I delete the first note$/ do
title = selenium.get_text("css=div.container h2")
id = title.split(' ').last
click_link "delete note"
click_link "delete_note_#{id}"
selenium.get_confirmation.should == "Are you sure that you want to delete the note '#{id}'?"
end
@ -58,7 +58,7 @@ Then /^the first note should disappear$/ do
title = selenium.get_text("css=div.container h2")
id = title.split(' ').last
wait_for :timeout => 15 do
!selenium.is_visible("note_#{id}")
!selenium.is_element_present("note_#{id}")
end
end