diff options
Diffstat (limited to 'spec/features/issuables/close_reopen_report_toggle_spec.rb')
-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 |