diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/features/merge_request | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/features/merge_request')
29 files changed, 278 insertions, 228 deletions
diff --git a/spec/features/merge_request/batch_comments_spec.rb b/spec/features/merge_request/batch_comments_spec.rb index eb98c7d5061..9b54d95be6b 100644 --- a/spec/features/merge_request/batch_comments_spec.rb +++ b/spec/features/merge_request/batch_comments_spec.rb @@ -146,6 +146,7 @@ RSpec.describe 'Merge request > Batch comments', :js do before do find('.js-show-diff-settings').click click_button 'Side-by-side' + find('.js-show-diff-settings').click end it 'adds draft comments to both sides' do @@ -171,9 +172,8 @@ RSpec.describe 'Merge request > Batch comments', :js do write_reply_to_discussion(button_text: 'Add comment now', resolve: true) - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -188,9 +188,8 @@ RSpec.describe 'Merge request > Batch comments', :js do wait_for_requests - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end end @@ -211,9 +210,8 @@ RSpec.describe 'Merge request > Batch comments', :js do write_reply_to_discussion(button_text: 'Add comment now', unresolve: true) - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') - expect(page).not_to have_selector('.line-resolve-btn.is-active') end end @@ -230,9 +228,8 @@ RSpec.describe 'Merge request > Batch comments', :js do wait_for_requests - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') - expect(page).not_to have_selector('.line-resolve-btn.is-active') end end end diff --git a/spec/features/merge_request/close_reopen_report_toggle_spec.rb b/spec/features/merge_request/close_reopen_report_toggle_spec.rb index 8a4277d87c9..dea9a10a4ec 100644 --- a/spec/features/merge_request/close_reopen_report_toggle_spec.rb +++ b/spec/features/merge_request/close_reopen_report_toggle_spec.rb @@ -28,7 +28,6 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do expect(container).to have_link("Close merge request") expect(container).to have_link('Report abuse') - expect(container).to have_text("Report merge requests that are abusive, inappropriate or spam.") end it 'links to Report Abuse' do @@ -43,10 +42,12 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:issuable) { create(:merge_request, :opened, source_project: project) } it 'shows the `Edit` and `Mark as draft` buttons' do + click_button 'Toggle dropdown' + expect(container).to have_link('Edit') expect(container).to have_link('Mark as draft') - expect(container).not_to have_button('Report abuse') - expect(container).not_to have_button('Close merge request') + expect(container).to have_link('Close merge request') + expect(container).to have_link('Report abuse') expect(container).not_to have_link('Reopen merge request') end end @@ -55,21 +56,24 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:issuable) { create(:merge_request, :closed, source_project: project) } it 'shows both the `Edit` and `Reopen` button' do + click_button 'Toggle dropdown' + expect(container).to have_link('Edit') - expect(container).not_to have_button('Report abuse') - expect(container).not_to have_button('Close merge request') + expect(container).to have_link('Report abuse') expect(container).to have_link('Reopen merge request') + expect(container).not_to have_link('Close merge request') end context 'when the merge request author is the current user' do let(:issuable) { create(:merge_request, :closed, source_project: project, author: user) } it 'shows both the `Edit` and `Reopen` button' do + click_button 'Toggle dropdown' + expect(container).to have_link('Edit') - expect(container).not_to have_link('Report abuse') - expect(container).not_to have_selector('button.dropdown-toggle') - expect(container).not_to have_button('Close merge request') expect(container).to have_link('Reopen merge request') + expect(container).not_to have_link('Close merge request') + expect(container).not_to have_link('Report abuse') end end end diff --git a/spec/features/merge_request/merge_request_discussion_lock_spec.rb b/spec/features/merge_request/merge_request_discussion_lock_spec.rb index 4e0265839f6..a7bc2a062af 100644 --- a/spec/features/merge_request/merge_request_discussion_lock_spec.rb +++ b/spec/features/merge_request/merge_request_discussion_lock_spec.rb @@ -8,59 +8,91 @@ RSpec.describe 'Merge Request Discussion Lock', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project, author: user) } + let(:moved_mr_sidebar_enabled) { false } before do + stub_feature_flags(moved_mr_sidebar: moved_mr_sidebar_enabled) sign_in(user) end - context 'when a user is a team member' do - before do - project.add_developer(user) - end + context 'moved sidebar flag disabled' do + context 'when a user is a team member' do + before do + project.add_developer(user) + end - context 'when the discussion is unlocked' do - it 'the user can lock the merge_request' do - visit project_merge_request_path(merge_request.project, merge_request) + context 'when the discussion is unlocked' do + it 'the user can lock the merge_request' do + visit project_merge_request_path(merge_request.project, merge_request) + + expect(find('.issuable-sidebar')).to have_content('Unlocked') - expect(find('.issuable-sidebar')).to have_content('Unlocked') + page.within('.issuable-sidebar') do + find('.lock-edit').click + click_button('Lock') + end - page.within('.issuable-sidebar') do - find('.lock-edit').click - click_button('Lock') + expect(find('[data-testid="lock-status"]')).to have_content('Locked') end + end + + context 'when the discussion is locked' do + before do + merge_request.update_attribute(:discussion_locked, true) + visit project_merge_request_path(merge_request.project, merge_request) + end + + it 'the user can unlock the merge_request' do + expect(find('.issuable-sidebar')).to have_content('Locked') - expect(find('[data-testid="lock-status"]')).to have_content('Locked') + page.within('.issuable-sidebar') do + find('.lock-edit').click + click_button('Unlock') + end + + expect(find('[data-testid="lock-status"]')).to have_content('Unlocked') + end end end - context 'when the discussion is locked' do - before do - merge_request.update_attribute(:discussion_locked, true) - visit project_merge_request_path(merge_request.project, merge_request) - end + context 'when a user is not a team member' do + context 'when the discussion is unlocked' do + before do + visit project_merge_request_path(merge_request.project, merge_request) + end - it 'the user can unlock the merge_request' do - expect(find('.issuable-sidebar')).to have_content('Locked') + it 'the user can not lock the merge_request' do + expect(find('.issuable-sidebar')).to have_content('Unlocked') + expect(find('.issuable-sidebar')).not_to have_selector('.lock-edit') + end + end - page.within('.issuable-sidebar') do - find('.lock-edit').click - click_button('Unlock') + context 'when the discussion is locked' do + before do + merge_request.update_attribute(:discussion_locked, true) + visit project_merge_request_path(merge_request.project, merge_request) end - expect(find('[data-testid="lock-status"]')).to have_content('Unlocked') + it 'the user can not unlock the merge_request' do + expect(find('.issuable-sidebar')).to have_content('Locked') + expect(find('.issuable-sidebar')).not_to have_selector('.lock-edit') + end end end end - context 'when a user is not a team member' do + context 'moved sidebar flag enabled' do + let(:moved_mr_sidebar_enabled) { true } + context 'when the discussion is unlocked' do before do visit project_merge_request_path(merge_request.project, merge_request) end - it 'the user can not lock the merge_request' do - expect(find('.issuable-sidebar')).to have_content('Unlocked') - expect(find('.issuable-sidebar')).not_to have_selector('.lock-edit') + it 'the user can lock the merge_request' do + click_button 'Toggle dropdown' + + expect(page).to have_content('Lock merge request') end end @@ -70,9 +102,10 @@ RSpec.describe 'Merge Request Discussion Lock', :js do visit project_merge_request_path(merge_request.project, merge_request) end - it 'the user can not unlock the merge_request' do - expect(find('.issuable-sidebar')).to have_content('Locked') - expect(find('.issuable-sidebar')).not_to have_selector('.lock-edit') + it 'the user can unlock the merge_request' do + click_button 'Toggle dropdown' + + expect(page).to have_content('Unlock merge request') end end end diff --git a/spec/features/merge_request/user_accepts_merge_request_spec.rb b/spec/features/merge_request/user_accepts_merge_request_spec.rb index d4b185a82e9..159306b28d8 100644 --- a/spec/features/merge_request/user_accepts_merge_request_spec.rb +++ b/spec/features/merge_request/user_accepts_merge_request_spec.rb @@ -18,7 +18,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli click_button('Merge') - expect(page).to have_content("The changes were merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") + expect(page).to have_content("Changes merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") end context 'when merge method is set to fast-forward merge' do @@ -31,7 +31,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli click_button('Merge') - expect(page).to have_content("The changes were merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") + expect(page).to have_content("Changes merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") end it 'accepts a merge request with squash and merge' do @@ -41,7 +41,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli click_button('Merge') - expect(page).to have_content("The changes were merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") + expect(page).to have_content("Changes merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") end end end @@ -55,7 +55,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli check('Delete source branch') click_button('Merge') - expect(page).to have_content('The changes were merged into') + expect(page).to have_content('Changes merged into') expect(page).not_to have_selector('.js-remove-branch-button') # Wait for View Resource requests to complete so they don't blow up if they are @@ -72,7 +72,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli it 'accepts a merge request' do click_button('Merge') - expect(page).to have_content('The changes were merged into') + expect(page).to have_content('Changes merged into') expect(page).to have_selector('.js-remove-branch-button') # Wait for View Resource requests to complete so they don't blow up if they are @@ -90,7 +90,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli check('Delete source branch') click_button('Merge') - expect(page).to have_content('The changes were merged into') + expect(page).to have_content('Changes merged into') expect(page).not_to have_selector('.js-remove-branch-button') # Wait for View Resource requests to complete so they don't blow up if they are @@ -107,14 +107,12 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli end it 'accepts a merge request' do - find('.js-mr-widget-commits-count').click + find('[data-testid="widget_edit_commit_message"]').click fill_in('merge-message-edit', with: 'wow such merge') click_button('Merge') - page.within('.status-box') do - expect(page).to have_content('Merged') - end + expect(page).to have_selector('.gl-badge', text: 'Merged') end end end diff --git a/spec/features/merge_request/user_assigns_themselves_spec.rb b/spec/features/merge_request/user_assigns_themselves_spec.rb index fc925781a3b..2aaddc7791b 100644 --- a/spec/features/merge_request/user_assigns_themselves_spec.rb +++ b/spec/features/merge_request/user_assigns_themselves_spec.rb @@ -30,12 +30,6 @@ RSpec.describe 'Merge request > User assigns themselves' do end.to change { merge_request.reload.updated_at } end - it 'returns user to the merge request', :js do - click_link 'Assign yourself to these issues' - - expect(page).to have_content merge_request.description - end - context 'when related issues are already assigned' do before do [issue1, issue2].each { |issue| issue.update!(assignees: [user]) } diff --git a/spec/features/merge_request/user_awards_emoji_spec.rb b/spec/features/merge_request/user_awards_emoji_spec.rb index 35eadb34799..81a88cad458 100644 --- a/spec/features/merge_request/user_awards_emoji_spec.rb +++ b/spec/features/merge_request/user_awards_emoji_spec.rb @@ -38,6 +38,10 @@ RSpec.describe 'Merge request > User awards emoji', :js do it 'adds awards to note' do page.within('.note-actions') do first('.note-emoji-button').click + + # make sure emoji popup is visible + execute_script("window.scrollBy(0, 200)") + find('gl-emoji[data-name="8ball"]').click end diff --git a/spec/features/merge_request/user_comments_on_diff_spec.rb b/spec/features/merge_request/user_comments_on_diff_spec.rb index c06019f6b77..99756da51e4 100644 --- a/spec/features/merge_request/user_comments_on_diff_spec.rb +++ b/spec/features/merge_request/user_comments_on_diff_spec.rb @@ -103,15 +103,22 @@ RSpec.describe 'User comments on a diff', :js do end # Check the same comments in the side-by-side view. + execute_script "window.scrollTo(0,0)" find('.js-show-diff-settings').click click_button 'Side-by-side' + second_line_element = find_by_scrolling("[id='#{sample_compare.changes[1][:line_code]}']") + second_root_element = second_line_element.ancestor('[data-path]') + wait_for_requests page.within(second_root_element) do expect(page).to have_content('Line is wrong') end + first_line_element = find_by_scrolling("[id='#{sample_compare.changes[0][:line_code]}']").find(:xpath, "..") + first_root_element = first_line_element.ancestor('[data-path]') + page.within(first_root_element) do expect(page).to have_content('Line is correct') end @@ -154,7 +161,7 @@ RSpec.describe 'User comments on a diff', :js do it 'allows comments on previously hidden lines the middle of a file' do # Click 27, expand up, select 18, add and verify comment page.within find_by_scrolling('[data-path="files/ruby/popen.rb"]') do - all('.js-unfold-all')[1].click + first('.js-unfold-all').click end click_diff_line(find('div[data-path="files/ruby/popen.rb"] .left-side a[data-linenumber="21"]').find(:xpath, '../..'), 'left') add_comment('18', '21') @@ -163,10 +170,10 @@ RSpec.describe 'User comments on a diff', :js do it 'allows comments on previously hidden lines at the bottom of a file' do # Click +28, expand down, select 37 add and verify comment page.within find_by_scrolling('[data-path="files/ruby/popen.rb"]') do - all('.js-unfold-down:not([disabled])')[1].click + first('.js-unfold-down').click end click_diff_line(find('div[data-path="files/ruby/popen.rb"] .left-side a[data-linenumber="30"]').find(:xpath, '../..'), 'left') - add_comment('+28', '37') + add_comment('+28', '30') end end diff --git a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb index 15f186b649a..bd5048374d5 100644 --- a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb +++ b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb @@ -258,7 +258,7 @@ RSpec.describe 'Merge request > User creates image diff notes', :js do end it 'resizes image' do - expect(find('.onion-skin-frame')['style']).to match('width: 228px; height: 240px;') + expect(find('.onion-skin-frame')['style']).to match('width: 198px; height: 210px;') end it_behaves_like 'onion skin' diff --git a/spec/features/merge_request/user_creates_merge_request_spec.rb b/spec/features/merge_request/user_creates_merge_request_spec.rb index 617aceae54c..a3dc3079374 100644 --- a/spec/features/merge_request/user_creates_merge_request_spec.rb +++ b/spec/features/merge_request/user_creates_merge_request_spec.rb @@ -15,28 +15,40 @@ RSpec.describe "User creates a merge request", :js do sign_in(user) end - it "creates a merge request" do - visit(project_new_merge_request_path(project)) + context 'when completed the compare branches form' do + before do + visit(project_new_merge_request_path(project)) - find(".js-source-branch").click - click_link("fix") + find(".js-source-branch").click + click_link("fix") - find(".js-target-branch").click - click_link("feature") + find(".js-target-branch").click + click_link("feature") - click_button("Compare branches") + click_button("Compare branches") + end - page.within('.merge-request-form') do - expect(page.find('#merge_request_title')['placeholder']).to eq 'Title' - expect(page.find('#merge_request_description')['placeholder']).to eq 'Describe the goal of the changes and what reviewers should be aware of.' + it "shows merge request form" do + page.within('.merge-request-form') do + expect(page.find('#merge_request_title')['placeholder']).to eq 'Title' + expect(page.find('#merge_request_description')['placeholder']).to eq 'Describe the goal of the changes and what reviewers should be aware of.' + end end - fill_in("Title", with: title) - click_button("Create merge request") + context "when completed the merge request form" do + before do + fill_in("Title", with: title) + click_button("Create merge request") + end - page.within(".merge-request") do - expect(page).to have_content(title) + it "creates a merge request" do + page.within(".merge-request") do + expect(page).to have_content(title) + end + end end + + it_behaves_like 'merge request author auto assign' end context "XSS branch name exists" do @@ -106,7 +118,7 @@ RSpec.describe "User creates a merge request", :js do click_button("Create merge request") - expect(page).to have_content(title).and have_content("Request to merge #{user.namespace.path}:#{source_branch} into master") + expect(page).to have_content(title).and have_content("requested to merge #{forked_project.full_path}:#{source_branch} into master") end end end diff --git a/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb b/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb index 67a232607cd..059e1eb89c5 100644 --- a/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb +++ b/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb @@ -41,7 +41,7 @@ RSpec.describe 'Merge request < User customizes merge commit message', :js do it 'has commit message without description' do expect(page).not_to have_selector('#merge-message-edit') - first('.js-mr-widget-commits-count').click + find('[data-testid="widget_edit_commit_message"]').click expect(merge_textbox).to be_visible expect(merge_textbox.value).to eq(default_merge_commit_message) end @@ -51,7 +51,7 @@ RSpec.describe 'Merge request < User customizes merge commit message', :js do it 'uses merge commit template' do expect(page).not_to have_selector('#merge-message-edit') - first('.js-mr-widget-commits-count').click + find('[data-testid="widget_edit_commit_message"]').click expect(merge_textbox).to be_visible expect(merge_textbox.value).to eq(merge_request.title) end @@ -62,7 +62,7 @@ RSpec.describe 'Merge request < User customizes merge commit message', :js do it 'has default message with merge request title' do expect(page).not_to have_selector('#squash-message-edit') - first('.js-mr-widget-commits-count').click + find('[data-testid="widget_edit_commit_message"]').click expect(squash_textbox).to be_visible expect(merge_textbox).to be_visible expect(squash_textbox.value).to eq(merge_request.title) @@ -74,7 +74,7 @@ RSpec.describe 'Merge request < User customizes merge commit message', :js do it 'uses squash commit template' do expect(page).not_to have_selector('#squash-message-edit') - first('.js-mr-widget-commits-count').click + find('[data-testid="widget_edit_commit_message"]').click expect(squash_textbox).to be_visible expect(merge_textbox).to be_visible expect(squash_textbox.value).to eq(merge_request.description) diff --git a/spec/features/merge_request/user_edits_merge_request_spec.rb b/spec/features/merge_request/user_edits_merge_request_spec.rb index 364af8d8a76..0b4b9d7452a 100644 --- a/spec/features/merge_request/user_edits_merge_request_spec.rb +++ b/spec/features/merge_request/user_edits_merge_request_spec.rb @@ -92,7 +92,7 @@ RSpec.describe 'User edits a merge request', :js do select2('merge-test', from: '#merge_request_target_branch') click_button('Save changes') - expect(page).to have_content("Request to merge #{merge_request.source_branch} into merge-test") + expect(page).to have_content("requested to merge #{merge_request.source_branch} into merge-test") expect(page).to have_content("changed target branch from #{merge_request.target_branch} to merge-test") end diff --git a/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb b/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb index 7d67cde4bbb..f5b5460769e 100644 --- a/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb +++ b/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb @@ -59,7 +59,6 @@ RSpec.describe 'Batch diffs', :js do # Confirm scrolled to correct UI element expect(get_first_diff.find('.discussion-notes .timeline-entry li.note[id]').obscured?).to be_falsey - expect(get_second_diff.find('.discussion-notes .timeline-entry li.note[id]').obscured?).to be_truthy end end diff --git a/spec/features/merge_request/user_manages_subscription_spec.rb b/spec/features/merge_request/user_manages_subscription_spec.rb index 3cdb22000f6..c64c761b8d1 100644 --- a/spec/features/merge_request/user_manages_subscription_spec.rb +++ b/spec/features/merge_request/user_manages_subscription_spec.rb @@ -6,29 +6,60 @@ RSpec.describe 'User manages subscription', :js do let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:user) { create(:user) } + let(:moved_mr_sidebar_enabled) { false } before do + stub_feature_flags(moved_mr_sidebar: moved_mr_sidebar_enabled) + project.add_maintainer(user) sign_in(user) visit(merge_request_path(merge_request)) end - it 'toggles subscription' do - page.within('[data-testid="subscription-toggle"]') do + context 'moved sidebar flag disabled' do + it 'toggles subscription' do + page.within('[data-testid="subscription-toggle"]') do + wait_for_requests + + expect(page).to have_css 'button:not(.is-checked)' + find('button:not(.is-checked)').click + + wait_for_requests + + expect(page).to have_css 'button.is-checked' + find('button.is-checked').click + + wait_for_requests + + expect(page).to have_css 'button:not(.is-checked)' + end + end + end + + context 'moved sidebar flag enabled' do + let(:moved_mr_sidebar_enabled) { true } + + it 'toggles subscription' do wait_for_requests - expect(page).to have_css 'button:not(.is-checked)' - find('button:not(.is-checked)').click + click_button 'Toggle dropdown' + + expect(page).to have_content('Turn on notifications') + click_button 'Turn on notifications' wait_for_requests - expect(page).to have_css 'button.is-checked' - find('button.is-checked').click + click_button 'Toggle dropdown' + + expect(page).to have_content('Turn off notifications') + click_button 'Turn off notifications' wait_for_requests - expect(page).to have_css 'button:not(.is-checked)' + click_button 'Toggle dropdown' + + expect(page).to have_content('Turn on notifications') end end end diff --git a/spec/features/merge_request/user_marks_merge_request_as_draft_spec.rb b/spec/features/merge_request/user_marks_merge_request_as_draft_spec.rb index f5bca7cf015..c3a61476442 100644 --- a/spec/features/merge_request/user_marks_merge_request_as_draft_spec.rb +++ b/spec/features/merge_request/user_marks_merge_request_as_draft_spec.rb @@ -16,10 +16,13 @@ RSpec.describe 'Merge request > User marks merge request as draft', :js do end it 'toggles draft status' do + click_button 'Toggle dropdown' click_link 'Mark as draft' expect(page).to have_content("Draft: #{merge_request.title}") + click_button 'Toggle dropdown' + page.within('.detail-page-header-actions') do click_link 'Mark as ready' end diff --git a/spec/features/merge_request/user_merges_immediately_spec.rb b/spec/features/merge_request/user_merges_immediately_spec.rb index 3a05f35a671..91327059e0f 100644 --- a/spec/features/merge_request/user_merges_immediately_spec.rb +++ b/spec/features/merge_request/user_merges_immediately_spec.rb @@ -30,17 +30,17 @@ RSpec.describe 'Merge requests > User merges immediately', :js do it 'enables merge immediately' do wait_for_requests - page.within '.mr-widget-body' do + page.within '[data-testid="ready_to_merge_state"]' do find('.dropdown-toggle').click Sidekiq::Testing.fake! do click_button 'Merge immediately' - - expect(find('.media-body h4')).to have_content('Merging!') - - wait_for_requests end end + + expect(find('.media-body h4')).to have_content('Merging!') + + wait_for_requests end end end diff --git a/spec/features/merge_request/user_merges_merge_request_spec.rb b/spec/features/merge_request/user_merges_merge_request_spec.rb index a861ca2eea5..6a9a30953df 100644 --- a/spec/features/merge_request/user_merges_merge_request_spec.rb +++ b/spec/features/merge_request/user_merges_merge_request_spec.rb @@ -17,9 +17,7 @@ RSpec.describe "User merges a merge request", :js do click_button("Merge") end - page.within(".status-box") do - expect(page).to have_content("Merged") - end + expect(page).to have_selector('.gl-badge', text: 'Merged') end end @@ -27,6 +25,7 @@ RSpec.describe "User merges a merge request", :js do let(:project) { create(:project, :public, :repository, merge_requests_ff_only_enabled: true) } before do + stub_feature_flags(restructured_mr_widget: false) visit(merge_request_path(merge_request)) end diff --git a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb index 4d7ee11e366..d6b132b18da 100644 --- a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb @@ -56,7 +56,7 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js do wait_for_requests - expect(page).to have_css('button[disabled="disabled"]', text: 'Merge') + expect(page).not_to have_button('Merge') expect(page).to have_content('Merge blocked: pipeline must succeed. Push a commit that fixes the failure, or learn about other solutions.') end end diff --git a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb index 9057b96bff0..21f96299958 100644 --- a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb @@ -36,7 +36,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do click_button "Merge when pipeline succeeds" expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds" - expect(page).to have_content "Does not delete the source branch" + expect(page).to have_content "Source branch will not be deleted" expect(page).to have_selector ".js-cancel-auto-merge" visit project_merge_request_path(project, merge_request) # Needed to refresh the page expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i @@ -64,6 +64,9 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do context 'when enabled after it was previously canceled' do before do click_button "Merge when pipeline succeeds" + + wait_for_requests + click_button "Cancel auto-merge" wait_for_requests @@ -123,12 +126,6 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do expect(page).to have_content "canceled the automatic merge" end - it 'allows to delete source branch' do - click_button "Delete source branch" - - expect(page).to have_content "Deletes the source branch" - end - context 'when pipeline succeeds' do before do build.success @@ -136,7 +133,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do end it 'merges merge request', :sidekiq_might_not_need_inline do - expect(page).to have_content 'The changes were merged' + expect(page).to have_content 'Changes merged' expect(merge_request.reload).to be_merged end end diff --git a/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb b/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb new file mode 100644 index 00000000000..4d2c59665bb --- /dev/null +++ b/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Merge request > User opens checkout branch modal', :js do + include ProjectForksHelper + + let(:project) { create(:project, :public, :repository) } + let(:user) { project.creator } + + before do + project.add_maintainer(user) + sign_in(user) + end + + describe 'for fork' do + let(:author) { create(:user) } + let(:source_project) { fork_project(project, author, repository: true) } + + let(:merge_request) do + create(:merge_request, + source_project: source_project, + target_project: project, + source_branch: 'fix', + target_branch: 'master', + author: author, + allow_collaboration: true) + end + + it 'shows instructions' do + visit project_merge_request_path(project, merge_request) + + click_button 'Code' + click_button 'Check out branch' + + expect(page).to have_content(source_project.http_url_to_repo) + end + end +end diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb index d803aec5895..64715f9234a 100644 --- a/spec/features/merge_request/user_posts_diff_notes_spec.rb +++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb @@ -239,7 +239,7 @@ RSpec.describe 'Merge request > User posts diff notes', :js do def should_allow_dismissing_a_comment(line_holder, diff_side = nil) write_comment_on_line(line_holder, diff_side) - accept_gl_confirm(s_('Notes|Are you sure you want to cancel creating this comment?')) do + accept_gl_confirm(s_('Notes|Are you sure you want to cancel creating this comment?'), button_text: _('Discard changes')) do find('.js-close-discussion-note-form').click end diff --git a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb index 231722c166d..e09ec11f095 100644 --- a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb +++ b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb @@ -38,7 +38,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do context 'single thread' do it 'shows text with how many threads' do - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -55,9 +55,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).to have_selector('.btn', text: 'Unresolve thread') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -72,9 +71,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).to have_selector('.line-resolve-btn.is-active') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -84,7 +82,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do click_button 'Unresolve thread' end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -155,7 +153,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do wait_for_requests end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') end end @@ -167,9 +165,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do wait_for_requests end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') - expect(page).not_to have_selector('.line-resolve-btn.is-active') end end @@ -184,7 +181,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do wait_for_requests end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -196,9 +193,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do find('button[data-qa-selector="resolve_discussion_button"]').click # rubocop:disable QA/SelectorUsage end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -213,14 +209,13 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do click_button 'Add comment now' end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end it 'allows user to quickly scroll to next unresolved thread' do - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do page.find('.discussion-next-btn').click end @@ -269,7 +264,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(first('.line-resolve-btn')['aria-label']).to eq("Resolved by #{user.name}") end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') end end @@ -286,7 +281,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(button['aria-label']).to eq("Resolved by #{user.name}") end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') end end @@ -299,7 +294,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do end it 'shows text with how many threads' do - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('2 unresolved threads') end end @@ -307,7 +302,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do it 'allows user to mark a single note as resolved' do click_button('Resolve thread', match: :first) - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -317,9 +312,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do btn.click end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -330,9 +324,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do end end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -341,7 +334,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do find('button[data-qa-selector="resolve_discussion_button"]').click # rubocop:disable QA/SelectorUsage end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do page.find('.discussion-next-btn').click end @@ -370,7 +363,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).not_to have_selector('.btn', text: 'Resolve thread') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do page.find('.discussion-next-btn').click end @@ -386,7 +379,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do context 'changes tab' do it 'shows text with how many threads' do - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -402,9 +395,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).to have_selector('.btn', text: 'Unresolve thread') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -417,9 +409,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).to have_selector('.line-resolve-btn.is-active') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -429,7 +420,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do click_button 'Unresolve thread' end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -445,9 +436,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do click_button 'Add comment now' end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end @@ -462,7 +452,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do click_button 'Add comment now' end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -485,7 +475,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).not_to have_selector('.line-resolve-btn') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end @@ -515,9 +505,8 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).to have_selector('.btn', text: 'Unresolve thread') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('All threads resolved') - expect(page).to have_selector('.line-resolve-btn.is-active') end end end @@ -534,32 +523,11 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do expect(page).not_to have_selector('.line-resolve-btn') end - page.within '.line-resolve-all-container' do + page.within '.discussions-counter' do expect(page).to have_content('1 unresolved thread') end end end - - context 'resolved comment' do - before do - note.resolve!(user) - visit_merge_request - end - - it 'shows resolved icon' do - expect(page).to have_content 'All threads resolved' - - click_button _('Show thread') - expect(page).to have_selector('.line-resolve-btn.is-active') - end - - it 'does not allow user to click resolve button' do - expect(page).to have_selector('.line-resolve-btn.is-active') - click_button _('Show thread') - - expect(page).to have_selector('.line-resolve-btn.is-active') - end - end end def visit_merge_request(mr = nil) diff --git a/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb index 38546fd629d..5827266d4b7 100644 --- a/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb +++ b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb @@ -11,6 +11,8 @@ RSpec.describe 'Merge request > User sees check out branch modal', :js do sign_in(user) visit project_merge_request_path(project, merge_request) wait_for_requests + + click_button 'Code' click_button('Check out branch') end diff --git a/spec/features/merge_request/user_sees_merge_widget_spec.rb b/spec/features/merge_request/user_sees_merge_widget_spec.rb index c9b21d4a4ae..2dafd66b406 100644 --- a/spec/features/merge_request/user_sees_merge_widget_spec.rb +++ b/spec/features/merge_request/user_sees_merge_widget_spec.rb @@ -20,6 +20,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do stub_feature_flags(refactor_mr_widgets_extensions: false) stub_feature_flags(refactor_mr_widgets_extensions_user: false) + stub_feature_flags(refactor_mr_widget_test_summary: false) end context 'new merge request', :sidekiq_might_not_need_inline do @@ -320,8 +321,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do # Wait for the `ci_status` and `merge_check` requests wait_for_requests - expect(page).to have_selector('.accept-merge-request') - expect(find('.accept-merge-request')['disabled']).not_to be(true) + expect(page).not_to have_selector('.accept-merge-request') end end @@ -384,9 +384,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do # Wait for the `ci_status` and `merge_check` requests wait_for_requests - page.within('.mr-widget-body') do - expect(page).to have_content('Merge Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.') - end + expect(page).to have_content('Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.') end end @@ -444,7 +442,6 @@ RSpec.describe 'Merge request > User sees merge widget', :js do it 'user cannot remove source branch', :sidekiq_might_not_need_inline do expect(page).not_to have_field('remove-source-branch-input') - expect(page).to have_content('Deletes the source branch') end end diff --git a/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb b/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb index 23b03e33f5d..03f9f6ef565 100644 --- a/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb +++ b/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb @@ -61,38 +61,6 @@ RSpec.describe 'Merge request < User sees mini pipeline graph', :js do wait_for_requests end - # Status icon button styles should update as described in - # https://gitlab.com/gitlab-org/gitlab-foss/issues/42769 - it 'has unique styles for default, :hover, :active, and :focus states' do - default_background_color, default_foreground_color, default_box_shadow = get_toggle_colors(dropdown_selector) - - toggle.hover - hover_background_color, hover_foreground_color, hover_box_shadow = get_toggle_colors(dropdown_selector) - - page.driver.browser.action.click_and_hold(toggle.native).perform - active_background_color, active_foreground_color, active_box_shadow = get_toggle_colors(dropdown_selector) - page.driver.browser.action.release(toggle.native).perform - - page.driver.browser.action.click(toggle.native).move_by(100, 100).perform - focus_background_color, focus_foreground_color, focus_box_shadow = get_toggle_colors(dropdown_selector) - - expect(default_background_color).not_to eq(hover_background_color) - expect(hover_background_color).not_to eq(active_background_color) - expect(default_background_color).not_to eq(active_background_color) - - expect(default_foreground_color).not_to eq(hover_foreground_color) - expect(hover_foreground_color).not_to eq(active_foreground_color) - expect(default_foreground_color).not_to eq(active_foreground_color) - - expect(focus_background_color).to eq(hover_background_color) - expect(focus_foreground_color).to eq(hover_foreground_color) - - expect(default_box_shadow).to eq('none') - expect(hover_box_shadow).to eq('none') - expect(active_box_shadow).not_to eq('none') - expect(focus_box_shadow).not_to eq('none') - end - it 'shows tooltip when hovered' do toggle.hover @@ -147,15 +115,4 @@ RSpec.describe 'Merge request < User sees mini pipeline graph', :js do end end end - - private - - def get_toggle_colors(selector) - find(selector) - [ - evaluate_script("$('#{selector} button:visible').css('background-color');"), - evaluate_script("$('#{selector} button:visible svg').css('fill');"), - evaluate_script("$('#{selector} button:visible').css('box-shadow');") - ] - end end diff --git a/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb b/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb index d2bde320c54..bcc6abd4f65 100644 --- a/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb +++ b/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb @@ -62,6 +62,7 @@ RSpec.describe 'Merge request > User selects branches for new MR', :js do fill_in "merge_request_title", with: "Orphaned MR test" click_button "Create merge request" + click_button 'Code' click_button "Check out branch" expect(page).to have_content 'git checkout -b \'orphaned-branch\' \'origin/orphaned-branch\'' diff --git a/spec/features/merge_request/user_squashes_merge_request_spec.rb b/spec/features/merge_request/user_squashes_merge_request_spec.rb index 2a48657ac4f..da0d4ca23d1 100644 --- a/spec/features/merge_request/user_squashes_merge_request_spec.rb +++ b/spec/features/merge_request/user_squashes_merge_request_spec.rb @@ -79,7 +79,7 @@ RSpec.describe 'User squashes a merge request', :js do context 'when squash message is the same as existing commit message' do before do - click_button("Modify commit messages") + find('[data-testid="widget_edit_commit_message"]').click fill_in('Squash commit message', with: project.commit(source_branch).safe_message) accept_mr end diff --git a/spec/features/merge_request/user_views_diffs_spec.rb b/spec/features/merge_request/user_views_diffs_spec.rb index 208ed1f01e7..894292c99eb 100644 --- a/spec/features/merge_request/user_views_diffs_spec.rb +++ b/spec/features/merge_request/user_views_diffs_spec.rb @@ -30,7 +30,7 @@ RSpec.describe 'User views diffs', :js do it 'unfolds diffs in the middle' do page.within('.file-holder[id="2f6fcd96b88b36ce98c38da085c795a27d92a3dd"]') do - all('.js-unfold-all')[1].click + first('.js-unfold-all').click expect(page).to have_selector('[data-interop-type="new"] [data-linenumber="24"]', count: 1) expect(page).not_to have_selector('[data-interop-type="new"] [data-linenumber="1"]') diff --git a/spec/features/merge_request/user_views_open_merge_request_spec.rb b/spec/features/merge_request/user_views_open_merge_request_spec.rb index a145bcb976b..1f4682b4a46 100644 --- a/spec/features/merge_request/user_views_open_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_open_merge_request_spec.rb @@ -71,13 +71,14 @@ RSpec.describe 'User views an open merge request' do let(:merge_request) { create(:merge_request, :rebased, source_project: project, target_project: project) } before do + project.add_maintainer(project.creator) + sign_in(project.creator) + visit(merge_request_path(merge_request)) end it 'does not show diverged commits count' do - page.within('.mr-source-target') do - expect(page).not_to have_content(/([0-9]+ commits? behind)/) - end + expect(page).not_to have_content(/([0-9]+ commits? behind)/) end end @@ -85,13 +86,14 @@ RSpec.describe 'User views an open merge request' do let(:merge_request) { create(:merge_request, :diverged, source_project: project, target_project: project) } before do + project.add_maintainer(project.creator) + sign_in(project.creator) + visit(merge_request_path(merge_request)) end it 'shows diverged commits count' do - page.within('.mr-source-target') do - expect(page).to have_content(/([0-9]+ commits behind)/) - end + expect(page).not_to have_content(/([0-9]+ commits? behind)/) end end @@ -117,6 +119,8 @@ RSpec.describe 'User views an open merge request' do let(:source_branch) { "'><iframe/srcdoc=''></iframe>" } before do + stub_feature_flags(moved_mr_sidebar: false) + project.repository.create_branch(source_branch, "master") mr = create(:merge_request, source_project: project, target_project: project, source_branch: source_branch) diff --git a/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb b/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb index a6de443e96f..f637186ec67 100644 --- a/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb @@ -11,6 +11,10 @@ RSpec.describe 'Project > Merge request > View user status' do subject { visit merge_request_path(merge_request) } describe 'the status of the merge request author' do + before do + stub_feature_flags(updated_mr_header: false) + end + it_behaves_like 'showing user status' do let(:user_with_status) { merge_request.author } end |