diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/features/issuables | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/features/issuables')
-rw-r--r-- | spec/features/issuables/close_reopen_report_toggle_spec.rb | 22 | ||||
-rw-r--r-- | spec/features/issuables/issuable_list_spec.rb | 10 | ||||
-rw-r--r-- | spec/features/issuables/sorting_list_spec.rb | 4 |
3 files changed, 21 insertions, 15 deletions
diff --git a/spec/features/issuables/close_reopen_report_toggle_spec.rb b/spec/features/issuables/close_reopen_report_toggle_spec.rb index cf3028ec4c9..f442b25f593 100644 --- a/spec/features/issuables/close_reopen_report_toggle_spec.rb +++ b/spec/features/issuables/close_reopen_report_toggle_spec.rb @@ -10,7 +10,7 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:human_model_name) { issuable.model_name.human.downcase } it 'shows toggle' do - expect(page).to have_link("Close #{human_model_name}") + expect(page).to have_button("Close #{human_model_name}") expect(page).to have_selector('.issuable-close-dropdown') end @@ -63,7 +63,7 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:issuable) { create(:issue, :closed, :locked, project: project) } it 'hides the reopen button' do - expect(page).not_to have_link('Reopen issue') + expect(page).not_to have_button('Reopen issue') end context 'when the issue author is the current user' do @@ -72,7 +72,7 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do end it 'hides the reopen button' do - expect(page).not_to have_link('Reopen issue') + expect(page).not_to have_button('Reopen issue') end end end @@ -91,8 +91,8 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do it 'only shows the `Report abuse` and `New issue` buttons' do expect(page).to have_link('Report abuse') expect(page).to have_link('New issue') - expect(page).not_to have_link('Close issue') - expect(page).not_to have_link('Reopen issue') + expect(page).not_to have_button('Close issue') + expect(page).not_to have_button('Reopen issue') expect(page).not_to have_link('Edit') end end @@ -120,8 +120,8 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do it 'shows only the `Report abuse` and `Edit` button' do expect(page).to have_link('Report abuse') expect(page).to have_link('Edit') - expect(page).not_to have_link('Close merge request') - expect(page).not_to have_link('Reopen merge request') + expect(page).not_to have_button('Close merge request') + expect(page).not_to have_button('Reopen merge request') end context 'when the merge request author is the current user' do @@ -130,8 +130,8 @@ 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).not_to have_link('Close merge request') - expect(page).not_to have_link('Reopen merge request') + expect(page).not_to have_button('Close merge request') + expect(page).not_to have_button('Reopen merge request') end end end @@ -149,8 +149,8 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do it 'only shows a `Report abuse` button' do expect(page).to have_link('Report abuse') - expect(page).not_to have_link('Close merge request') - expect(page).not_to have_link('Reopen merge request') + expect(page).not_to have_button('Close merge request') + expect(page).not_to have_button('Reopen merge request') expect(page).not_to have_link('Edit') end end diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index 382a7a9321c..259c09b9d11 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -2,13 +2,15 @@ require 'spec_helper' -RSpec.describe 'issuable list' do +RSpec.describe 'issuable list', :js do let(:project) { create(:project) } let(:user) { create(:user) } issuable_types = [:issue, :merge_request] before do + stub_feature_flags(vue_issuables_list: false) + # something is going on project.add_user(user, :developer) sign_in(user) issuable_types.each { |type| create_issuables(type) } @@ -26,9 +28,9 @@ RSpec.describe 'issuable list' do it "counts upvotes, downvotes and notes count for each #{issuable_type.to_s.humanize}" do visit_issuable_list(issuable_type) - expect(first('.fa-thumbs-up').find(:xpath, '..')).to have_content(1) - expect(first('.fa-thumbs-down').find(:xpath, '..')).to have_content(1) - expect(first('.fa-comments').find(:xpath, '..')).to have_content(2) + expect(first('.issuable-upvotes')).to have_content(1) + expect(first('.issuable-downvotes')).to have_content(1) + expect(first('.issuable-comments')).to have_content(2) end it 'sorts labels alphabetically' do diff --git a/spec/features/issuables/sorting_list_spec.rb b/spec/features/issuables/sorting_list_spec.rb index 59518723740..ff92fe369d4 100644 --- a/spec/features/issuables/sorting_list_spec.rb +++ b/spec/features/issuables/sorting_list_spec.rb @@ -10,6 +10,10 @@ RSpec.describe 'Sort Issuable List' do let(:first_updated_issuable) { issuables.order_updated_asc.first } let(:last_updated_issuable) { issuables.order_updated_desc.first } + before do + stub_feature_flags(vue_issuables_list: false) + end + context 'for merge requests' do include MergeRequestHelpers |