Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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.rb40
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