Commit 953db8477e301d6cbd9ddf560264da708cd92aba
1 parent
211c06e4
Exists in
master
and in
4 other branches
More fixes for test
Showing
3 changed files
with
12 additions
and
8 deletions
Show diff stats
features/steps/project/project_merge_requests.rb
| ... | ... | @@ -103,21 +103,19 @@ class ProjectMergeRequests < Spinach::FeatureSteps |
| 103 | 103 | end |
| 104 | 104 | |
| 105 | 105 | And 'I leave a comment on the diff page' do |
| 106 | - within(:xpath, "//div[@class='note-form-holder']") do | |
| 106 | + within('.js-temp-notes-holder') do | |
| 107 | 107 | fill_in "note_note", with: "One comment to rule them all" |
| 108 | 108 | click_button "Add Comment" |
| 109 | 109 | end |
| 110 | 110 | end |
| 111 | 111 | |
| 112 | 112 | And 'I leave a comment like "Line is wrong" on line 185 of the first file' do |
| 113 | - save_and_open_page | |
| 114 | - within(:xpath, "//div[@class='diff_file'][1]") do | |
| 115 | - click_link "add-diff-line-note-0_185_185" | |
| 116 | - end | |
| 113 | + find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click | |
| 117 | 114 | |
| 118 | - within(:xpath, "//div[@class='line-note-form-holder']") do | |
| 115 | + within(".js-temp-notes-holder") do | |
| 119 | 116 | fill_in "note_note", with: "Line is wrong" |
| 120 | 117 | click_button "Add Comment" |
| 118 | + sleep 0.05 | |
| 121 | 119 | end |
| 122 | 120 | end |
| 123 | 121 | ... | ... |
features/steps/shared/diff_note.rb
| ... | ... | @@ -8,6 +8,7 @@ module SharedDiffNote |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | 10 | Given 'I delete a diff comment' do |
| 11 | + sleep 1 | |
| 11 | 12 | within(".diff_file") do |
| 12 | 13 | first(".js-note-delete").trigger("click") |
| 13 | 14 | end |
| ... | ... | @@ -25,6 +26,7 @@ module SharedDiffNote |
| 25 | 26 | fill_in "note[note]", with: "Typo, please fix" |
| 26 | 27 | #click_button("Add Comment") |
| 27 | 28 | find(".js-comment-button").trigger("click") |
| 29 | + sleep 0.05 | |
| 28 | 30 | end |
| 29 | 31 | end |
| 30 | 32 | ... | ... |
features/steps/shared/note.rb
| ... | ... | @@ -39,8 +39,6 @@ module SharedNote |
| 39 | 39 | end |
| 40 | 40 | end |
| 41 | 41 | |
| 42 | - | |
| 43 | - | |
| 44 | 42 | Then 'I should not see a comment saying "XML attached"' do |
| 45 | 43 | page.should_not have_css(".note") |
| 46 | 44 | end |
| ... | ... | @@ -113,4 +111,10 @@ module SharedNote |
| 113 | 111 | Then 'I should see project wall note "my special test message"' do |
| 114 | 112 | page.should have_content "my special test message" |
| 115 | 113 | end |
| 114 | + | |
| 115 | + Then 'I should see comment "XML attached"' do | |
| 116 | + within(".note") do | |
| 117 | + page.should have_content("XML attached") | |
| 118 | + end | |
| 119 | + end | |
| 116 | 120 | end | ... | ... |