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-13 09:08:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-13 09:08:08 +0300
commit1cd5d53f92b07b0be71b6c2d9fdfa7cf07221890 (patch)
tree95e12ad9b7b43fd9fe2b3b4ba121bb4d0b6c9a0c /spec
parent0f5d9f4ba36dc94ebb547e28ffb6f56611bd3004 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/users.rb2
-rw-r--r--spec/frontend/super_sidebar/components/help_center_spec.js2
-rw-r--r--spec/migrations/20230608071301_requeue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb (renamed from spec/migrations/20230510062502_queue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb)5
-rw-r--r--spec/support/shared_examples/features/work_items_shared_examples.rb13
-rw-r--r--spec/tasks/gitlab/db_rake_spec.rb8
5 files changed, 22 insertions, 8 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index 9040cd754b3..a9d5da93bc5 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -65,7 +65,9 @@ FactoryBot.define do
end
trait :service_account do
+ name { 'Service account user' }
user_type { :service_account }
+ skip_confirmation { true }
end
trait :migration_bot do
diff --git a/spec/frontend/super_sidebar/components/help_center_spec.js b/spec/frontend/super_sidebar/components/help_center_spec.js
index 23903627f0a..6af1172e4d8 100644
--- a/spec/frontend/super_sidebar/components/help_center_spec.js
+++ b/spec/frontend/super_sidebar/components/help_center_spec.js
@@ -107,7 +107,7 @@ describe('HelpCenter component', () => {
it('shows Ask GitLab Chat with the help items', () => {
expect(findDropdownGroup(0).props('group').items).toEqual([
expect.objectContaining({
- icon: 'tanuki',
+ icon: 'tanuki-ai',
text: HelpCenter.i18n.chat,
extraAttrs: trackingAttrs('tanuki_bot_help_dropdown'),
}),
diff --git a/spec/migrations/20230510062502_queue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb b/spec/migrations/20230608071301_requeue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb
index 45ef85a49cf..3d7beaebabf 100644
--- a/spec/migrations/20230510062502_queue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb
+++ b/spec/migrations/20230608071301_requeue_cleanup_personal_access_tokens_with_nil_expires_at_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
require_migration!
-RSpec.describe QueueCleanupPersonalAccessTokensWithNilExpiresAt, feature_category: :system_access do
+RSpec.describe RequeueCleanupPersonalAccessTokensWithNilExpiresAt, feature_category: :system_access do
let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do
@@ -17,8 +17,7 @@ RSpec.describe QueueCleanupPersonalAccessTokensWithNilExpiresAt, feature_categor
table_name: :personal_access_tokens,
column_name: :id,
interval: described_class::DELAY_INTERVAL,
- batch_size: described_class::BATCH_SIZE,
- sub_batch_size: described_class::SUB_BATCH_SIZE
+ batch_size: described_class::BATCH_SIZE
)
}
end
diff --git a/spec/support/shared_examples/features/work_items_shared_examples.rb b/spec/support/shared_examples/features/work_items_shared_examples.rb
index c59e0ace279..ab57f4e2c55 100644
--- a/spec/support/shared_examples/features/work_items_shared_examples.rb
+++ b/spec/support/shared_examples/features/work_items_shared_examples.rb
@@ -71,6 +71,12 @@ RSpec.shared_examples 'work items comments' do |type|
end
context 'for work item note actions signed in user with developer role' do
+ let_it_be(:owner) { create(:user) }
+
+ before do
+ project.add_owner(owner)
+ end
+
it 'shows work item note actions' do
set_comment
@@ -78,13 +84,15 @@ RSpec.shared_examples 'work items comments' do |type|
wait_for_requests
- page.within(".main-notes-list") do
+ page.within('.timeline-entry.note.note-wrapper.note-comment:last-child') do
expect(page).to have_selector('[data-testid="work-item-note-actions"]')
- find('[data-testid="work-item-note-actions"]', match: :first).click
+ find('[data-testid="work-item-note-actions"]').click
expect(page).to have_selector('[data-testid="copy-link-action"]')
expect(page).to have_selector('[data-testid="assign-note-action"]')
+ expect(page).to have_selector('[data-testid="delete-note-action"]')
+ expect(page).to have_selector('[data-testid="edit-work-item-note"]')
end
end
end
@@ -295,7 +303,6 @@ RSpec.shared_examples 'work items comment actions for guest users' do
expect(page).to have_selector('[data-testid="work-item-note-actions"]')
find('[data-testid="work-item-note-actions"]', match: :first).click
-
expect(page).to have_selector('[data-testid="copy-link-action"]')
expect(page).not_to have_selector('[data-testid="assign-note-action"]')
end
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb
index bc2fd0b22eb..14bc6095b85 100644
--- a/spec/tasks/gitlab/db_rake_spec.rb
+++ b/spec/tasks/gitlab/db_rake_spec.rb
@@ -445,6 +445,12 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor
end
end
+ let(:table_without_model) do
+ Class.new(Gitlab::Database::Partitioning::TableWithoutModel) do
+ self.table_name = 'table1'
+ end
+ end
+
table_metadata = {
'table_name' => 'table1',
'classes' => ['TableClass'],
@@ -470,7 +476,7 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor
File.write(table_file_path, table_metadata.to_yaml)
File.write(view_file_path, view_metadata.to_yaml)
- allow(model).to receive(:descendants).and_return([table_class, migration_table_class, view_class])
+ allow(model).to receive(:descendants).and_return([table_class, migration_table_class, view_class, table_without_model])
end
it 'appends new classes to the dictionary' do