diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-07-03 21:01:36 +0100 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-06 08:29:57 +0200 |
commit | 50dfdf0296ae307d0b22ae8bbd1b52dca9fbaea9 (patch) | |
tree | 00ba546b756f5446124baa8ce62204e9a15bc6d4 /features | |
parent | 914bb05d282bca9c4509d56c1be409a5889e57b8 (diff) | |
download | gitlab-ce-50dfdf0296ae307d0b22ae8bbd1b52dca9fbaea9.tar.gz |
fix up tests
Added more exceptions
Added handling inline view type
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/shared/diff_note.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb index 8dc461bdd95..146cbcfad5e 100644 --- a/features/steps/shared/diff_note.rb +++ b/features/steps/shared/diff_note.rb @@ -25,8 +25,7 @@ module SharedDiffNote page.within("form[id$='#{sample_commit.line_code}-true']") do fill_in "note[note]", with: "Typo, please fix" - find(".js-comment-button").trigger("click") - sleep 0.05 + find(".js-comment-button").click end end end @@ -35,7 +34,7 @@ module SharedDiffNote click_parallel_diff_line(sample_commit.del_line_code, 'old') page.within("#{diff_file_selector} form[id$='#{sample_commit.del_line_code}-true']") do fill_in "note[note]", with: "Old comment" - find(".js-comment-button").trigger("click") + find(".js-comment-button").click end end @@ -43,7 +42,7 @@ module SharedDiffNote click_parallel_diff_line(sample_commit.line_code, 'new') page.within("#{diff_file_selector} form[id$='#{sample_commit.line_code}-true']") do fill_in "note[note]", with: "New comment" - find(".js-comment-button").trigger("click") + find(".js-comment-button").click end end @@ -211,7 +210,7 @@ module SharedDiffNote end step 'I click side-by-side diff button' do - find('#parallel-diff-btn').trigger('click') + find('#parallel-diff-btn').click end step 'I see side-by-side diff button' do @@ -223,12 +222,12 @@ module SharedDiffNote end def click_diff_line(code) - find(".line_holder[id='#{code}'] td:nth-of-type(1)").hover - find(".line_holder[id='#{code}'] button").trigger('click') + find(".line_holder[id='#{code}'] td:nth-of-type(1)").trigger 'mouseover' + find(".line_holder[id='#{code}'] button").trigger 'click' end def click_parallel_diff_line(code, line_type) - find(".line_content.parallel.#{line_type}[data-line-code='#{code}']").trigger('mouseover') - find(".line_holder.parallel button[data-line-code='#{code}']").trigger('click') + find(".line_content.parallel.#{line_type}[data-line-code='#{code}']").trigger 'mouseover' + find(".line_holder.parallel button[data-line-code='#{code}']").trigger 'click' end end |