diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 15:10:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 15:10:14 +0300 |
commit | a27b8a5c104f492e4b0abac4c84385a615c4f6ba (patch) | |
tree | 3ec1a2cc06312b1999ce405905ab7881f68927d2 /spec/features/issuables | |
parent | 635d82b15d83a88a2d073fbf3bb56f6ff626020f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/issuables')
-rw-r--r-- | spec/features/issuables/close_reopen_report_toggle_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/features/issuables/close_reopen_report_toggle_spec.rb b/spec/features/issuables/close_reopen_report_toggle_spec.rb index 5ea89a7984f..6e99cfb3293 100644 --- a/spec/features/issuables/close_reopen_report_toggle_spec.rb +++ b/spec/features/issuables/close_reopen_report_toggle_spec.rb @@ -23,7 +23,15 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do expect(container).to have_content("Close #{human_model_name}") expect(container).to have_content('Report abuse') expect(container).to have_content("Report #{human_model_name.pluralize} that are abusive, inappropriate or spam.") - expect(container).to have_selector('.close-item.droplab-item-selected') + + if issuable.is_a?(MergeRequest) + page.within('.js-issuable-close-dropdown') do + expect(page).to have_link('Close merge request') + end + else + expect(container).to have_selector('.close-item.droplab-item-selected') + end + expect(container).to have_selector('.report-item') expect(container).not_to have_selector('.report-item.droplab-item-selected') expect(container).not_to have_selector('.reopen-item') @@ -123,7 +131,7 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do it 'shows only the `Edit` button' do expect(page).to have_link('Edit') - expect(page).not_to have_link('Report abuse') + expect(page).to have_link('Report abuse') expect(page).not_to have_button('Close merge request') expect(page).not_to have_button('Reopen merge request') end |