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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/features/projects/show
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/features/projects/show')
-rw-r--r--spec/features/projects/show/no_password_spec.rb11
-rw-r--r--spec/features/projects/show/user_uploads_files_spec.rb28
2 files changed, 21 insertions, 18 deletions
diff --git a/spec/features/projects/show/no_password_spec.rb b/spec/features/projects/show/no_password_spec.rb
index d18ff75b324..ed06f4e14d3 100644
--- a/spec/features/projects/show/no_password_spec.rb
+++ b/spec/features/projects/show/no_password_spec.rb
@@ -3,6 +3,9 @@
require 'spec_helper'
RSpec.describe 'No Password Alert' do
+ let_it_be(:message_password_auth_enabled) { 'Your account is authenticated with SSO or SAML. To push and pull over HTTP with Git using this account, you must set a password or set up a Personal Access Token to use instead of a password. For more information, see Clone with HTTPS.' }
+ let_it_be(:message_password_auth_disabled) { 'Your account is authenticated with SSO or SAML. To push and pull over HTTP with Git using this account, you must set up a Personal Access Token to use instead of a password. For more information, see Clone with HTTPS.' }
+
let(:project) { create(:project, :repository, namespace: user.namespace) }
context 'with internal auth enabled' do
@@ -15,7 +18,7 @@ RSpec.describe 'No Password Alert' do
let(:user) { create(:user) }
it 'shows no alert' do
- expect(page).not_to have_content "You won't be able to pull or push repositories via HTTP until you set a password on your account"
+ expect(page).not_to have_content message_password_auth_enabled
end
end
@@ -23,7 +26,7 @@ RSpec.describe 'No Password Alert' do
let(:user) { create(:user, password_automatically_set: true) }
it 'shows a password alert' do
- expect(page).to have_content "You won't be able to pull or push repositories via HTTP until you set a password on your account"
+ expect(page).to have_content message_password_auth_enabled
end
end
end
@@ -41,7 +44,7 @@ RSpec.describe 'No Password Alert' do
gitlab_sign_in_via('saml', user, 'my-uid')
visit project_path(project)
- expect(page).to have_content "You won't be able to pull or push repositories via HTTP until you create a personal access token on your account"
+ expect(page).to have_content message_password_auth_disabled
end
end
@@ -51,7 +54,7 @@ RSpec.describe 'No Password Alert' do
gitlab_sign_in_via('saml', user, 'my-uid')
visit project_path(project)
- expect(page).not_to have_content "You won't be able to pull or push repositories via HTTP until you create a personal access token on your account"
+ expect(page).not_to have_content message_password_auth_disabled
end
end
end
diff --git a/spec/features/projects/show/user_uploads_files_spec.rb b/spec/features/projects/show/user_uploads_files_spec.rb
index 51e41397439..92b54d83ef3 100644
--- a/spec/features/projects/show/user_uploads_files_spec.rb
+++ b/spec/features/projects/show/user_uploads_files_spec.rb
@@ -44,27 +44,27 @@ RSpec.describe 'Projects > Show > User uploads files' do
end
end
- context 'when in the empty_repo_upload experiment' do
- before do
- stub_experiments(empty_repo_upload: :candidate)
+ context 'with an empty repo' do
+ let(:project) { create(:project, :empty_repo, creator: user) }
+ before do
visit(project_path(project))
end
- context 'with an empty repo' do
- let(:project) { create(:project, :empty_repo, creator: user) }
-
- [true, false].each do |value|
- include_examples 'uploads and commits a new text file via "upload file" button', drop: value
- end
+ [true, false].each do |value|
+ include_examples 'uploads and commits a new text file via "upload file" button', drop: value
end
+ end
- context 'with a nonempty repo' do
- let(:project) { create(:project, :repository, creator: user) }
+ context 'with a nonempty repo' do
+ let(:project) { create(:project, :repository, creator: user) }
- [true, false].each do |value|
- include_examples 'uploads and commits a new text file via "upload file" button', drop: value
- end
+ before do
+ visit(project_path(project))
+ end
+
+ [true, false].each do |value|
+ include_examples 'uploads and commits a new text file via "upload file" button', drop: value
end
end
end