diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-28 00:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-28 00:09:14 +0300 |
commit | bb6a90e97eafc246b015c3e943f3b73b0f429157 (patch) | |
tree | b31b202ecaf77be0bee510bace6f370dc5dc420f /spec/features/issuables | |
parent | 28f1931ae84034333abf651ecde369683697ddaf (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 | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/features/issuables/close_reopen_report_toggle_spec.rb b/spec/features/issuables/close_reopen_report_toggle_spec.rb index 37381702b62..30cabce8fa2 100644 --- a/spec/features/issuables/close_reopen_report_toggle_spec.rb +++ b/spec/features/issuables/close_reopen_report_toggle_spec.rb @@ -7,10 +7,6 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:user) { create(:user) } - before do - stub_feature_flags(vue_issue_header: false) - end - shared_examples 'an issuable close/reopen/report toggle' do let(:container) { find('.issuable-close-dropdown') } let(:human_model_name) { issuable.model_name.human.downcase } @@ -49,61 +45,6 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do end end - context 'on an issue' do - let(:project) { create(:project) } - let(:issuable) { create(:issue, project: project) } - - before do - project.add_maintainer(user) - login_as user - end - - context 'when user has permission to update', :js do - before do - visit project_issue_path(project, issuable) - end - - it_behaves_like 'an issuable close/reopen/report toggle' - - context 'when the issue is closed and locked' do - let(:issuable) { create(:issue, :closed, :locked, project: project) } - - it 'hides the reopen button' do - expect(page).not_to have_button('Reopen issue') - end - - context 'when the issue author is the current user' do - before do - issuable.update(author: user) - end - - it 'hides the reopen button' do - expect(page).not_to have_button('Reopen issue') - end - end - end - end - - context 'when user doesnt have permission to update' do - let(:cant_project) { create(:project) } - let(:cant_issuable) { create(:issue, project: cant_project) } - - before do - cant_project.add_guest(user) - - visit project_issue_path(cant_project, cant_issuable) - end - - 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_button('Close issue') - expect(page).not_to have_button('Reopen issue') - expect(page).not_to have_link(title: 'Edit title and description') - end - end - end - context 'on a merge request' do let(:container) { find('.detail-page-header-actions') } let(:project) { create(:project, :repository) } |