diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /spec/features/merge_request/user_sees_suggest_pipeline_spec.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/features/merge_request/user_sees_suggest_pipeline_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_sees_suggest_pipeline_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/features/merge_request/user_sees_suggest_pipeline_spec.rb b/spec/features/merge_request/user_sees_suggest_pipeline_spec.rb new file mode 100644 index 00000000000..93807512d9c --- /dev/null +++ b/spec/features/merge_request/user_sees_suggest_pipeline_spec.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Merge request > User sees suggest pipeline', :js do + let(:merge_request) { create(:merge_request) } + let(:project) { merge_request.source_project } + let(:user) { project.creator } + + before do + stub_application_setting(auto_devops_enabled: false) + stub_experiment(suggest_pipeline: true) + stub_experiment_for_user(suggest_pipeline: true) + project.add_maintainer(user) + sign_in(user) + visit project_merge_request_path(project, merge_request) + end + + it 'shows the suggest pipeline widget and then allows dismissal correctly' do + expect(page).to have_content('Are you adding technical debt or code vulnerabilities?') + + page.within '.mr-pipeline-suggest' do + find('[data-testid="close"]').click + end + + wait_for_requests + + expect(page).not_to have_content('Are you adding technical debt or code vulnerabilities?') + + # Reload so we know the user callout was registered + visit page.current_url + + expect(page).not_to have_content('Are you adding technical debt or code vulnerabilities?') + end +end |