diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/merge_requests.feature | 9 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 14 |
2 files changed, 12 insertions, 11 deletions
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 21768c15c17..c1d4ec822eb 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -194,7 +194,7 @@ Feature: Project Merge Requests And I visit merge request page "Bug NS-05" And I click on the Changes tab And I leave a comment like "Line is wrong" on line 39 of the third file - And I click link "Hide inline discussion" of the third file + And I click link "Hide inline discussion" button Then I should not see a comment like "Line is wrong here" in the third file @javascript @@ -212,9 +212,8 @@ Feature: Project Merge Requests And I click on the Changes tab And I leave a comment like "Line is correct" on line 12 of the second file And I leave a comment like "Line is wrong" on line 39 of the third file - And I click link "Hide inline discussion" of the third file + And I click link "Hide inline discussion" button Then I should not see a comment like "Line is wrong here" in the third file - And I should still see a comment like "Line is correct" in the second file @javascript Scenario: I show comments on a merge request diff with comments in multiple files @@ -223,8 +222,8 @@ Feature: Project Merge Requests And I click on the Changes tab And I leave a comment like "Line is correct" on line 12 of the second file And I leave a comment like "Line is wrong" on line 39 of the third file - And I click link "Hide inline discussion" of the third file - And I click link "Show inline discussion" of the third file + And I click link "Hide inline discussion" button + And I click link "Show inline discussion" button Then I should see a comment like "Line is wrong" in the third file And I should still see a comment like "Line is correct" in the second file diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index da848afd48e..77602646d06 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -401,15 +401,17 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end end - step 'I click link "Hide inline discussion" of the third file' do - page.within '.files [id^=diff]:nth-child(3)' do - find('.js-toggle-diff-comments').trigger('click') + step 'I click link "Hide inline discussion" button' do + page.within '#diffs' do + find('.inline-parallel-buttons [data-toggle=dropdown]').trigger('click') + find('.js-diff-comments-button').trigger('click') end end - step 'I click link "Show inline discussion" of the third file' do - page.within '.files [id^=diff]:nth-child(3)' do - find('.js-toggle-diff-comments').trigger('click') + step 'I click link "Show inline discussion" button' do + page.within '#diffs' do + find('.inline-parallel-buttons [data-toggle=dropdown]').trigger('click') + find('.js-diff-comments-button').trigger('click') end end |