mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-24 16:14:07 +01:00
fix editing a note from the notes page
This commit is contained in:
parent
77e2ff0751
commit
94b5aa2346
10 changed files with 133 additions and 61 deletions
|
|
@ -37,9 +37,9 @@ Feature: View, add, remove notes
|
|||
And I click the icon next to the note
|
||||
Then I should see the note text
|
||||
|
||||
@selenium @wip
|
||||
@selenium
|
||||
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"
|
||||
And I edit the first note to "edited note"
|
||||
Then I should see "edited note"
|
||||
|
|
@ -62,3 +62,27 @@ Feature: Edit a project
|
|||
Then the badge should show 2 # "manage me" and "test"
|
||||
When I try to edit the project name of "manage me" to "test"
|
||||
Then I should see "Name already exists"
|
||||
|
||||
@selenium @wip
|
||||
Scenario: I can go to the note of a project
|
||||
Given I have a project "test" with 2 note
|
||||
When I visit the "test" project
|
||||
Then I should see 2 notes
|
||||
When I click on the first note icon
|
||||
Then I should go to that note page
|
||||
|
||||
@selenium @wip
|
||||
Scenario: I can add a note to the project
|
||||
Given I have a project "test"
|
||||
When I visit the "test" project
|
||||
And I add a note "hello I'm testing"
|
||||
Then I should see one note
|
||||
|
||||
@selenium @wip
|
||||
Scenario: Long notes in a project are shown cut off
|
||||
Given I have a project "test"
|
||||
When I visit the "test" project
|
||||
And I add a note "test 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234 TOO LONG"
|
||||
Then I should not see "test 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234 TOO LONG"
|
||||
And I should see "test 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234"
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,12 @@ When /^I click the icon next to the note$/ do
|
|||
click_link "Show note"
|
||||
end
|
||||
|
||||
When /^I edit the note to "([^"]*)"$/ do |note_content|
|
||||
pending # express the regexp above with the code you wish you had
|
||||
When /^I edit the first note to "([^"]*)"$/ do |note_body|
|
||||
title = selenium.get_text("css=div.container h2")
|
||||
id = title.split(' ').last
|
||||
click_link "link_edit_note_#{id}"
|
||||
fill_in "note[body]", :with => note_body
|
||||
click_button "submit_note_#{id}"
|
||||
end
|
||||
|
||||
Then /^(.*) notes should be visible$/ do |number|
|
||||
|
|
@ -68,4 +72,4 @@ end
|
|||
|
||||
Then /^I should see the note text$/ do
|
||||
Then "I should see \"after 50 characters\""
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue