summaryrefslogtreecommitdiff
path: root/spec/features/projects/files
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/features/projects/files
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/features/projects/files')
-rw-r--r--spec/features/projects/files/gitlab_ci_syntax_yml_dropdown_spec.rb69
-rw-r--r--spec/features/projects/files/user_edits_files_spec.rb4
2 files changed, 2 insertions, 71 deletions
diff --git a/spec/features/projects/files/gitlab_ci_syntax_yml_dropdown_spec.rb b/spec/features/projects/files/gitlab_ci_syntax_yml_dropdown_spec.rb
deleted file mode 100644
index cd796d45aba..00000000000
--- a/spec/features/projects/files/gitlab_ci_syntax_yml_dropdown_spec.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'Projects > Files > User wants to add a .gitlab-ci.yml file' do
- include Spec::Support::Helpers::Features::EditorLiteSpecHelpers
-
- let_it_be(:namespace) { create(:namespace) }
- let(:project) { create(:project, :repository, namespace: namespace) }
-
- before do
- sign_in project.owner
- stub_experiment(ci_syntax_templates_b: experiment_active)
- stub_experiment_for_subject(ci_syntax_templates_b: in_experiment_group)
-
- visit project_new_blob_path(project, 'master', file_name: '.gitlab-ci.yml')
- end
-
- context 'when experiment is not active' do
- let(:experiment_active) { false }
- let(:in_experiment_group) { false }
-
- it 'does not show the "Learn CI/CD syntax" template dropdown' do
- expect(page).not_to have_css('.gitlab-ci-syntax-yml-selector')
- end
- end
-
- context 'when experiment is active' do
- let(:experiment_active) { true }
-
- context 'when the user is in the control group' do
- let(:in_experiment_group) { false }
-
- it 'does not show the "Learn CI/CD syntax" template dropdown' do
- expect(page).not_to have_css('.gitlab-ci-syntax-yml-selector')
- end
- end
-
- context 'when the user is in the experimental group' do
- let(:in_experiment_group) { true }
-
- it 'allows the user to pick a "Learn CI/CD syntax" template from the dropdown', :js do
- expect(page).to have_css('.gitlab-ci-syntax-yml-selector')
-
- find('.js-gitlab-ci-syntax-yml-selector').click
-
- wait_for_requests
-
- within '.gitlab-ci-syntax-yml-selector' do
- find('.dropdown-input-field').set('Artifacts example')
- find('.dropdown-content .is-focused', text: 'Artifacts example').click
- end
-
- wait_for_requests
-
- expect(page).to have_css('.gitlab-ci-syntax-yml-selector .dropdown-toggle-text', text: 'Learn CI/CD syntax')
- expect(editor_get_value).to have_content('You can use artifacts to pass data to jobs in later stages.')
- end
-
- context 'when the group is created longer than 90 days ago' do
- let(:namespace) { create(:namespace, created_at: 91.days.ago) }
-
- it 'does not show the "Learn CI/CD syntax" template dropdown' do
- expect(page).not_to have_css('.gitlab-ci-syntax-yml-selector')
- end
- end
- end
- end
-end
diff --git a/spec/features/projects/files/user_edits_files_spec.rb b/spec/features/projects/files/user_edits_files_spec.rb
index c18ff9ddbbc..453cc14c267 100644
--- a/spec/features/projects/files/user_edits_files_spec.rb
+++ b/spec/features/projects/files/user_edits_files_spec.rb
@@ -131,8 +131,8 @@ RSpec.describe 'Projects > Files > User edits files', :js do
expect(page).to have_selector(:link_or_button, 'Fork')
expect(page).to have_selector(:link_or_button, 'Cancel')
expect(page).to have_content(
- "You're not allowed to edit files in this project directly. "\
- "Please fork this project, make your changes there, and submit a merge request."
+ "You can’t edit files directly in this project. "\
+ "Fork this project and submit a merge request with your changes."
)
end