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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-10 03:07:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-10 03:07:23 +0300
commitc1924278d0c49e43e8a9ad7910f267007f24669d (patch)
tree7ca946598a6c3702ff3655463f1d8e40afd2f2ca /spec
parente374f6b2297582fde956350e92c19d1ae93ddfc8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/features/admin/admin_appearance_spec.rb4
-rw-r--r--spec/features/file_uploads/user_avatar_spec.rb1
-rw-r--r--spec/features/profiles/user_edit_profile_spec.rb1
-rw-r--r--spec/features/profiles/user_search_settings_spec.rb1
-rw-r--r--spec/features/profiles/user_visits_profile_spec.rb1
-rw-r--r--spec/features/uploads/user_uploads_avatar_to_profile_spec.rb1
-rw-r--r--spec/frontend/environments/kubernetes_overview_spec.js1
-rw-r--r--spec/frontend/invite_members/components/members_token_select_spec.js12
-rw-r--r--spec/views/profiles/show.html.haml_spec.rb1
9 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb
index db0ae79c9c4..71c904b3a19 100644
--- a/spec/features/admin/admin_appearance_spec.rb
+++ b/spec/features/admin/admin_appearance_spec.rb
@@ -6,6 +6,10 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
let!(:appearance) { create(:appearance) }
let(:admin) { create(:admin) }
+ before do
+ stub_feature_flags(edit_user_profile_vue: false)
+ end
+
flag_values = [true, false]
flag_values.each do |val|
context "with #{val}" do
diff --git a/spec/features/file_uploads/user_avatar_spec.rb b/spec/features/file_uploads/user_avatar_spec.rb
index 062c47d5310..3f7d69afa0b 100644
--- a/spec/features/file_uploads/user_avatar_spec.rb
+++ b/spec/features/file_uploads/user_avatar_spec.rb
@@ -8,6 +8,7 @@ RSpec.describe 'Upload a user avatar', :js, feature_category: :user_profile do
let(:file) { fixture_file_upload('spec/fixtures/banana_sample.gif') }
before do
+ stub_feature_flags(edit_user_profile_vue: false)
sign_in(user)
visit(profile_path)
attach_file('user_avatar-trigger', file.path, make_visible: true)
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb
index 3ce1c3a33a0..de8719630ee 100644
--- a/spec/features/profiles/user_edit_profile_spec.rb
+++ b/spec/features/profiles/user_edit_profile_spec.rb
@@ -8,6 +8,7 @@ RSpec.describe 'User edit profile', feature_category: :user_profile do
let_it_be(:user) { create(:user) }
before do
+ stub_feature_flags(edit_user_profile_vue: false)
sign_in(user)
visit(profile_path)
end
diff --git a/spec/features/profiles/user_search_settings_spec.rb b/spec/features/profiles/user_search_settings_spec.rb
index 932ea11075a..96fe01cd0c2 100644
--- a/spec/features/profiles/user_search_settings_spec.rb
+++ b/spec/features/profiles/user_search_settings_spec.rb
@@ -7,6 +7,7 @@ RSpec.describe 'User searches their settings', :js, feature_category: :user_prof
before do
sign_in(user)
+ stub_feature_flags(edit_user_profile_vue: false)
end
context 'in profile page' do
diff --git a/spec/features/profiles/user_visits_profile_spec.rb b/spec/features/profiles/user_visits_profile_spec.rb
index ad265fbae9e..578025e1494 100644
--- a/spec/features/profiles/user_visits_profile_spec.rb
+++ b/spec/features/profiles/user_visits_profile_spec.rb
@@ -7,6 +7,7 @@ RSpec.describe 'User visits their profile', feature_category: :user_profile do
before do
stub_feature_flags(profile_tabs_vue: false)
+ stub_feature_flags(edit_user_profile_vue: false)
sign_in(user)
end
diff --git a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
index f1023f17d3e..03b072ea417 100644
--- a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
+++ b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
@@ -7,6 +7,7 @@ RSpec.describe 'User uploads avatar to profile', feature_category: :user_profile
let(:avatar_file_path) { Rails.root.join('spec', 'fixtures', 'dk.png') }
before do
+ stub_feature_flags(edit_user_profile_vue: false)
sign_in user
visit profile_path
end
diff --git a/spec/frontend/environments/kubernetes_overview_spec.js b/spec/frontend/environments/kubernetes_overview_spec.js
index b9eff2f79c5..1c7ace00f48 100644
--- a/spec/frontend/environments/kubernetes_overview_spec.js
+++ b/spec/frontend/environments/kubernetes_overview_spec.js
@@ -22,6 +22,7 @@ const configuration = {
basePath: provide.kasTunnelUrl.replace(/\/$/, ''),
baseOptions: {
headers: { 'GitLab-Agent-Id': '1' },
+ withCredentials: true,
},
};
diff --git a/spec/frontend/invite_members/components/members_token_select_spec.js b/spec/frontend/invite_members/components/members_token_select_spec.js
index c7e9905dee3..ff0313cc49e 100644
--- a/spec/frontend/invite_members/components/members_token_select_spec.js
+++ b/spec/frontend/invite_members/components/members_token_select_spec.js
@@ -130,6 +130,18 @@ describe('MembersTokenSelect', () => {
expect(tokenSelector.props('hideDropdownWithNoItems')).toBe(false);
});
+ it('calls the API with search parameter with whitespaces and is trimmed', async () => {
+ tokenSelector.vm.$emit('text-input', ' foo@bar.com ');
+
+ await waitForPromises();
+
+ expect(UserApi.getUsers).toHaveBeenCalledWith('foo@bar.com', {
+ active: true,
+ without_project_bots: true,
+ });
+ expect(tokenSelector.props('hideDropdownWithNoItems')).toBe(false);
+ });
+
describe('when input text is an email', () => {
it('allows user defined tokens', async () => {
tokenSelector.vm.$emit('text-input', 'foo@bar.com');
diff --git a/spec/views/profiles/show.html.haml_spec.rb b/spec/views/profiles/show.html.haml_spec.rb
index d5cb5694031..ea0a9ebb02c 100644
--- a/spec/views/profiles/show.html.haml_spec.rb
+++ b/spec/views/profiles/show.html.haml_spec.rb
@@ -10,6 +10,7 @@ RSpec.describe 'profiles/show' do
assign(:user, user)
allow(controller).to receive(:current_user).and_return(user)
allow(view).to receive(:experiment_enabled?)
+ stub_feature_flags(edit_user_profile_vue: false)
end
context 'when the profile page is opened' do