diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/features/merge_request/user_sees_suggest_pipeline_spec.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.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 | 40 |
1 files changed, 12 insertions, 28 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 index 3893a9cdf28..2191849edd9 100644 --- a/spec/features/merge_request/user_sees_suggest_pipeline_spec.rb +++ b/spec/features/merge_request/user_sees_suggest_pipeline_spec.rb @@ -16,7 +16,8 @@ RSpec.describe 'Merge request > User sees suggest pipeline', :js do 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?') + content = 'GitLab CI/CD can automatically build, test, and deploy your application' + expect(page).to have_content(content) page.within '.mr-pipeline-suggest' do find('[data-testid="close"]').click @@ -24,17 +25,16 @@ RSpec.describe 'Merge request > User sees suggest pipeline', :js do wait_for_requests - expect(page).not_to have_content('Are you adding technical debt or code vulnerabilities?') + expect(page).not_to have_content(content) # 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?') + expect(page).not_to have_content(content) end - it 'runs tour from start to finish ensuring all nudges are executed' do - # nudge 1 - expect(page).to have_content('Are you adding technical debt or code vulnerabilities?') + it 'takes the user to the pipeline editor with a pre-filled CI config file form' do + expect(page).to have_content('GitLab CI/CD can automatically build, test, and deploy your application') page.within '.mr-pipeline-suggest' do find('[data-testid="ok"]').click @@ -42,30 +42,14 @@ RSpec.describe 'Merge request > User sees suggest pipeline', :js do wait_for_requests - # nudge 2 - expect(page).to have_content('Choose Code Quality to add a pipeline that tests the quality of your code.') + # Drawer is open + expect(page).to have_content('This template creates a simple test pipeline. To use it:') - find('.js-gitlab-ci-yml-selector').click + # Editor shows template + expect(page).to have_content('This file is a template, and might need editing before it works on your project.') - wait_for_requests - - within '.gitlab-ci-yml-selector' do - find('.dropdown-input-field').set('Jekyll') - find('.dropdown-content li', text: 'Jekyll').click - end - - wait_for_requests - - expect(page).not_to have_content('Choose Code Quality to add a pipeline that tests the quality of your code.') - # nudge 3 - expect(page).to have_content('The template is ready!') - - find('#commit-changes').click - - wait_for_requests - - # nudge 4 - expect(page).to have_content("That's it, well done!") + # Commit form is shown + expect(page).to have_button('Commit changes') end context 'when feature setting is disabled' do |