mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 01:08:50 +01:00
consume confirmation dialog when deleting note
This commit is contained in:
parent
8f349d3b6b
commit
226d902127
3 changed files with 8 additions and 10 deletions
|
|
@ -8,17 +8,16 @@ Feature: View, add, remove notes
|
|||
Given the following user record
|
||||
| login | password | is_admin |
|
||||
| testuser | secret | false |
|
||||
And I have logged in as "testuser" with password "secret"
|
||||
|
||||
Scenario: View notes
|
||||
Given I have logged in as "testuser" with password "secret"
|
||||
And I have two projects with one note each
|
||||
Given I have two projects with one note each
|
||||
When I go to the notes page
|
||||
Then 2 notes should be visible
|
||||
And the badge should show 2
|
||||
|
||||
Scenario: Add a new note
|
||||
Given I have logged in as "testuser" with password "secret"
|
||||
And I have one project "Pass Final Exam" with no notes
|
||||
Given I have one project "Pass Final Exam" with no notes
|
||||
When I add note "My Note A" from the "Pass Final Exam" project page
|
||||
Then I should see note "My Note A" on the "Pass Final Exam" project page
|
||||
And I should see note "My Note A" on the notes page
|
||||
|
|
@ -26,8 +25,7 @@ Feature: View, add, remove notes
|
|||
|
||||
@selenium
|
||||
Scenario: Delete note from notes page
|
||||
Given I have logged in as "testuser" with password "secret"
|
||||
And I have a project "Pass Final Exam" with 2 notes
|
||||
Given I have a project "Pass Final Exam" with 2 notes
|
||||
When I go to the notes page
|
||||
And I delete the first note
|
||||
Then the first note should disappear
|
||||
|
|
@ -35,16 +33,14 @@ Feature: View, add, remove notes
|
|||
|
||||
@selenium
|
||||
Scenario: Link to note
|
||||
Given I have logged in as "testuser" with password "secret"
|
||||
And I have a project "Pass Final Exam" with 1 note
|
||||
Given I have a project "Pass Final Exam" with 1 note
|
||||
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
|
||||
Scenario: Toggle notes
|
||||
Given I have logged in as "testuser" with password "secret"
|
||||
And I have two projects with one note each
|
||||
Given I have two projects with one note each
|
||||
When I go to the notes page
|
||||
And I click Toggle Notes
|
||||
Then I should see the body of the notes
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Then /the badge should show (.*)/ do |number|
|
||||
# puts response.body.inspect
|
||||
badge = -1
|
||||
response.should have_xpath("//span[@id='badge_count']") do |node|
|
||||
badge = node.first.content.to_i
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ end
|
|||
|
||||
When /^I delete the first note$/ do
|
||||
click_link "delete note"
|
||||
selenium.get_confirmation.should == "Are you sure that you want to delete the note '1'?"
|
||||
end
|
||||
|
||||
Then /^the first note should disappear$/ do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue