summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 03:09:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 03:09:17 +0000
commit1bcf63a9b247bb8801bb0c39e764c1ef7f2df2dd (patch)
treecc7813ad474a4e7fc58f32cf88e4766957947b91
parenta110ab2161a3b86956ebd8bf1af452c8f22627db (diff)
downloadgitlab-ce-1bcf63a9b247bb8801bb0c39e764c1ef7f2df2dd.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo/lint/unused_block_argument.yml1
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.checksum2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/controllers/concerns/registrations_tracking.rb17
-rw-r--r--app/controllers/registrations/welcome_controller.rb8
-rw-r--r--app/controllers/registrations_controller.rb9
-rw-r--r--app/models/namespace/root_storage_statistics.rb2
-rw-r--r--app/views/devise/registrations/new.html.haml2
-rw-r--r--app/views/registrations/welcome/show.html.haml2
-rw-r--r--doc/administration/audit_events.md164
-rw-r--r--doc/topics/data_seeder.md (renamed from doc/topics/awesome_co.md)20
-rw-r--r--package.json2
-rw-r--r--spec/controllers/registrations/welcome_controller_spec.rb10
-rw-r--r--spec/controllers/registrations_controller_spec.rb12
-rw-r--r--spec/frontend/oauth_remember_me_spec.js5
-rw-r--r--spec/support/helpers/callouts_test_helper.rb9
-rw-r--r--spec/support/shared_examples/db/seeds/data_seeder_shared_examples.rb (renamed from spec/support/shared_examples/db/seeds/awesome_co_shared_examples.rb)2
-rw-r--r--spec/views/registrations/welcome/show.html.haml_spec.rb2
-rw-r--r--yarn.lock8
20 files changed, 151 insertions, 132 deletions
diff --git a/.rubocop_todo/lint/unused_block_argument.yml b/.rubocop_todo/lint/unused_block_argument.yml
index 59e89969751..7676faf0275 100644
--- a/.rubocop_todo/lint/unused_block_argument.yml
+++ b/.rubocop_todo/lint/unused_block_argument.yml
@@ -37,7 +37,6 @@ Lint/UnusedBlockArgument:
- 'app/models/customer_relations/organization.rb'
- 'app/models/integration.rb'
- 'app/models/merge_request.rb'
- - 'app/models/namespace/root_storage_statistics.rb'
- 'app/models/project.rb'
- 'app/models/projects/build_artifacts_size_refresh.rb'
- 'app/models/service_desk_setting.rb'
diff --git a/Gemfile b/Gemfile
index c95555ab707..fd447d3e3e2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -482,7 +482,7 @@ gem 'gitlab-mail_room', '~> 0.0.23', require: 'mail_room'
gem 'email_reply_trimmer', '~> 0.1'
gem 'html2text'
-gem 'stackprof', '~> 0.2.23', require: false
+gem 'stackprof', '~> 0.2.25', require: false
gem 'rbtrace', '~> 0.4', require: false
gem 'memory_profiler', '~> 1.0', require: false
gem 'activerecord-explain-analyze', '~> 0.1', require: false
diff --git a/Gemfile.checksum b/Gemfile.checksum
index f0c905fb063..822ca2aa076 100644
--- a/Gemfile.checksum
+++ b/Gemfile.checksum
@@ -607,7 +607,7 @@
{"name":"sqlite3","version":"1.6.0","platform":"x86_64-linux","checksum":"a2488dcf0e72928bab2b15b934113ce8d7a3b4031277e362d66e40956d5c709e"},
{"name":"ssh_data","version":"1.3.0","platform":"ruby","checksum":"ec7c1e95a3aebeee412147998f4c147b4b05da6ed0aafda6083f9449318eaac0"},
{"name":"ssrf_filter","version":"1.0.8","platform":"ruby","checksum":"03f49f54837e407d43ee93ec733a8a94dc1bcf8185647ac61606e63aaedaa0db"},
-{"name":"stackprof","version":"0.2.23","platform":"ruby","checksum":"5c930b229c27bc64a2a0eb5e7203d76756ba0567bad7bf5290921ee1ed50230b"},
+{"name":"stackprof","version":"0.2.25","platform":"ruby","checksum":"28db0e2d22b817ae35def7163822505a04a026b02ef119b6aa89d70b967b0d2e"},
{"name":"state_machines","version":"0.5.0","platform":"ruby","checksum":"23e6249d374a920b528dccade403518b4abbd83841a3e2c9ef13e6f1a009b102"},
{"name":"state_machines-activemodel","version":"0.8.0","platform":"ruby","checksum":"e932dab190d4be044fb5f9cab01a3ea0b092c5f113d4676c6c0a0d49bf738d2c"},
{"name":"state_machines-activerecord","version":"0.8.0","platform":"ruby","checksum":"072fb701b8ab03de0608297f6c55dc34ed096e556fa8f77e556f3c461c71aab6"},
diff --git a/Gemfile.lock b/Gemfile.lock
index a523cffd594..722bca18861 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1490,7 +1490,7 @@ GEM
mini_portile2 (~> 2.8.0)
ssh_data (1.3.0)
ssrf_filter (1.0.8)
- stackprof (0.2.23)
+ stackprof (0.2.25)
state_machines (0.5.0)
state_machines-activemodel (0.8.0)
activemodel (>= 5.1)
@@ -1941,7 +1941,7 @@ DEPENDENCIES
sprite-factory (~> 1.7)
sprockets (~> 3.7.0)
ssh_data (~> 1.3)
- stackprof (~> 0.2.23)
+ stackprof (~> 0.2.25)
state_machines-activerecord (~> 0.8.0)
sys-filesystem (~> 1.4.3)
tanuki_emoji (~> 0.6)
diff --git a/app/controllers/concerns/registrations_tracking.rb b/app/controllers/concerns/registrations_tracking.rb
deleted file mode 100644
index 6c83c57d9dd..00000000000
--- a/app/controllers/concerns/registrations_tracking.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-module RegistrationsTracking
- extend ActiveSupport::Concern
-
- included do
- helper_method :glm_tracking_params
- end
-
- private
-
- def glm_tracking_params
- params.permit(:glm_source, :glm_content)
- end
-end
-
-RegistrationsTracking.prepend_mod
diff --git a/app/controllers/registrations/welcome_controller.rb b/app/controllers/registrations/welcome_controller.rb
index 87fcb499d21..158536b6ba1 100644
--- a/app/controllers/registrations/welcome_controller.rb
+++ b/app/controllers/registrations/welcome_controller.rb
@@ -4,12 +4,13 @@ module Registrations
class WelcomeController < ApplicationController
include OneTrustCSP
include GoogleAnalyticsCSP
- include RegistrationsTracking
layout 'minimal'
skip_before_action :authenticate_user!, :required_signup_info, :check_two_factor_requirement, only: [:show, :update]
before_action :require_current_user
+ helper_method :welcome_update_params
+
feature_category :user_management
def show
@@ -98,6 +99,11 @@ module Registrations
# overridden in EE
def track_event(action); end
+
+ # overridden in EE
+ def welcome_update_params
+ {}
+ end
end
end
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 5c67e056d66..9a1f1532d7f 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -9,7 +9,6 @@ class RegistrationsController < Devise::RegistrationsController
include BizibleCSP
include GoogleAnalyticsCSP
include PreferredLanguageSwitcher
- include RegistrationsTracking
include Gitlab::Tracking::Helpers::WeakPasswordErrorEvent
layout 'devise'
@@ -30,6 +29,7 @@ class RegistrationsController < Devise::RegistrationsController
feature_category :user_management
helper_method :arkose_labs_enabled?
+ helper_method :registration_path_params
def new
@resource = build_resource
@@ -150,7 +150,12 @@ class RegistrationsController < Devise::RegistrationsController
private
def after_sign_up_path
- users_sign_up_welcome_path(glm_tracking_params)
+ users_sign_up_welcome_path
+ end
+
+ # overridden in EE
+ def registration_path_params
+ {}
end
def track_creation(user:)
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb
index 6a932939ae9..0443e1d9231 100644
--- a/app/models/namespace/root_storage_statistics.rb
+++ b/app/models/namespace/root_storage_statistics.rb
@@ -47,7 +47,7 @@ class Namespace::RootStorageStatistics < ApplicationRecord
attributes_from_namespace_statistics,
attributes_for_container_registry_size,
attributes_for_forks_statistics
- ) { |key, v1, v2| v1 + v2 }
+ ) { |_, v1, v2| v1 + v2 }
end
def attributes_for_container_registry_size
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 3bd7147f195..e75449bf320 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -9,7 +9,7 @@
.signup-page
= render signup_box_template,
- url: registration_path(resource_name, glm_tracking_params.to_hash),
+ url: registration_path(resource_name, registration_path_params),
button_text: _('Register'),
borderless: Feature.enabled?(:restyle_login_page, @project),
show_omniauth_providers: omniauth_enabled? && button_based_providers_enabled?
diff --git a/app/views/registrations/welcome/show.html.haml b/app/views/registrations/welcome/show.html.haml
index 45c23aa7190..f99485ad1eb 100644
--- a/app/views/registrations/welcome/show.html.haml
+++ b/app/views/registrations/welcome/show.html.haml
@@ -18,7 +18,7 @@
- else
%p.gl-text-center= html_escape(_('%{gitlab_experience_text}. Don\'t worry, this information isn\'t shared outside of your self-managed GitLab instance.')) % { gitlab_experience_text: gitlab_experience_text }
= gitlab_ui_form_for(current_user,
- url: users_sign_up_welcome_path(glm_tracking_params),
+ url: users_sign_up_welcome_path(welcome_update_params),
html: { class: 'gl-w-full! gl-p-5 js-users-signup-welcome',
'aria-live' => 'assertive',
data: { testid: 'welcome-form' } }) do |f|
diff --git a/doc/administration/audit_events.md b/doc/administration/audit_events.md
index 0f9f7eae1aa..91a3afba5d2 100644
--- a/doc/administration/audit_events.md
+++ b/doc/administration/audit_events.md
@@ -237,98 +237,116 @@ The following actions on groups generate group audit events:
The following actions on projects generate project audit events:
-- Added or removed deploy keys
-- Project created, deleted, renamed, moved (transferred), changed path
-- Project changed visibility level
-- User was added to project and with which [permissions](../user/permissions.md)
-- Permission changes of a user assigned to a project
-- User was removed from project
-- Project export was downloaded
-- Project repository was downloaded
-- Project was archived
-- Project was unarchived
-- Branch protection was added, removed, or updated
-- Release was added to a project
-- Release was updated
-- Release was deleted. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94793/) in GitLab 15.3.
-- Release milestone associations changed
-- Permission to approve merge requests by committers was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
-- Permission to approve merge requests by committers was updated.
- - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
- - Message for event [changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72623/diffs) in GitLab 14.6.
-- Permission to approve merge requests by authors was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
-- Number of required approvals was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
-- Added or removed users and groups from project approval groups.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213603) in GitLab 13.2.
-- Project CI/CD variable added, removed, or protected status changed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/30857) in GitLab 13.4.
-- Project access token was successfully created or revoked.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/230007) in GitLab 13.9.
-- Failed attempt to create or revoke a project access token.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/230007) in GitLab 13.9.
-- When default branch changes for a project.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/52339) in GitLab 13.9.
-- Created, updated, or deleted DAST profiles, DAST scanner profiles, and DAST site profiles.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) in GitLab 14.1.
-- Changed a project's compliance framework.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/329362) in GitLab 14.1.
-- User password required for approvals was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
-- Permission to modify merge requests approval rules in merge requests was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
-- New approvals requirement when new commits are added to an MR was updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
-- When [strategies for feature flags](../operations/feature_flags.md#feature-flag-strategies) are changed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68408) in GitLab 14.3.
-- Allowing force push to protected branch changed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
-- Code owner approval requirement on merge requests targeting protected branch changed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
-- Users and groups allowed to merge and push to protected branch added or removed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
+#### Project management
+
+- Added or removed deploy keys.
+- Project created, deleted, renamed, moved (transferred), changed path.
+- Project changed visibility level.
+- Project export was downloaded.
+- Project repository was downloaded.
+- Project was archived.
+- Project was unarchived.
+- Project had a security policy project linked, changed, or unlinked.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/377877) in GitLab 15.6.
+- Project was scheduled for deletion due to inactivity.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85689) in GitLab 15.0.
- Project deploy token was successfully created, revoked or deleted.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/353451) in GitLab 14.9.
- Failed attempt to create a project deploy token.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/353451) in GitLab 14.9.
-- When merge method is updated.
+- When [strategies for feature flags](../operations/feature_flags.md#feature-flag-strategies) are changed.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68408) in GitLab 14.3.
+
+#### User management
+
+- User was added to project and with which [permissions](../user/permissions.md).
+- Permission changes of a user assigned to a project.
+- User was removed from project.
+- Users and groups allowed to merge and push to protected branch added or removed.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
+
+#### Access control
+
+- Branch protection was added, removed, or updated.
+- Failed attempt to create or revoke a project access token.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/230007) in GitLab 13.9.
+- Allowing force push to protected branch changed.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
+- An environment is protected or unprotected.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216164) in GitLab 15.8.
+- User password required for approvals was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
+- Project access token was successfully created or revoked.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/230007) in GitLab 13.9.
+
+#### Code collaboration
+
+- Default description template for merge requests is updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
+- Merge commit message template is updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
+- Squash commit message template is updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
+- Delete source branch option by default enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- Merged results pipelines enabled or disabled.
+- Squash commits when merging is updated.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- Merge trains enabled or disabled.
+- All discussions must be resolved enabled or disabled.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
+- Commit message suggestion is updated.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
- Automatically resolve merge request diff discussions enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
- Show link to create or view a merge request when pushing from the command line enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- Delete source branch option by default enabled or disabled.
+- When merge method is updated.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- Squash commits when merging is updated.
+- Merge trains enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
+- Code owner approval requirement on merge requests targeting protected branch changed.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) in GitLab 14.3.
+- Permission to modify merge requests approval rules in merge requests was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
+- New approvals requirement when new commits are added to an MR was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) in GitLab 14.2.
+- Added or removed users and groups from project approval groups.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213603) in GitLab 13.2.
+- Permission to approve merge requests by committers was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
+ - Message for event [changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72623/diffs) in GitLab 14.6.
+- Permission to approve merge requests by authors was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
+- Number of required approvals was updated.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7531) in GitLab 12.9.
+
+#### Release management
+
+- Release was added to a project.
+- Release was updated.
+- Release was deleted. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94793/) in GitLab 15.3.
+- Release milestone associations changed.
+
+#### CI/CD
+
+- Project CI/CD variable added, removed, or protected status changed.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/30857) in GitLab 13.4.
+- When default branch changes for a project.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/52339) in GitLab 13.9.
- Pipelines must succeed enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
- Skipped pipelines are considered successful enabled or disabled.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- All discussions must be resolved enabled or disabled.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
-- Commit message suggestion is updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
- Status check is added, edited, or deleted.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
-- Merge commit message template is updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
-- Squash commit message template is updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
-- Default description template for merge requests is updated.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) in GitLab 15.0.
-- Project was scheduled for deletion due to inactivity.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85689) in GitLab 15.0.
-- Project had a security policy project linked, changed, or unlinked.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/377877) in GitLab 15.6.
-- An environment is protected or unprotected.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216164) in GitLab 15.8.
+- Merged results pipelines enabled or disabled.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) in GitLab 14.9.
+
+#### Compliance and security
+
+- Created, updated, or deleted DAST profiles, DAST scanner profiles, and DAST site profiles.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) in GitLab 14.1.
+- Changed a project's compliance framework.
+ [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/329362) in GitLab 14.1.
### GitLab agent for Kubernetes events
diff --git a/doc/topics/awesome_co.md b/doc/topics/data_seeder.md
index 9a75490a0e3..19c0e05d8ed 100644
--- a/doc/topics/awesome_co.md
+++ b/doc/topics/data_seeder.md
@@ -2,19 +2,19 @@
stage: Manage
group: Foundations
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
-description: AwesomeCo test data harness created by the Test Data Working Group https://about.gitlab.com/company/team/structure/working-groups/demo-test-data/
+description: Data Seeder test data harness created by the Test Data Working Group https://about.gitlab.com/company/team/structure/working-groups/demo-test-data/
---
-# AwesomeCo
+# GitLab Data Seeder
-AwesomeCo is a test data seeding harness, that can seed test data into a user or group namespace.
+GitLab Data Seeder (GDS) is a test data seeding harness, that can seed test data into a user or group namespace.
-AwesomeCo uses FactoryBot in the backend which makes maintenance extremely easy. When a Model is changed,
+The Data Seeder uses FactoryBot in the backend which makes maintenance extremely easy. When a Model is changed,
FactoryBot will already be reflected to account for the change.
## Docker Setup
-See [AwesomeCo Docker Demo](https://gitlab.com/-/snippets/2390362)
+See [Data Seeder Docker Demo](https://gitlab.com/-/snippets/2390362)
## GDK Setup
@@ -31,16 +31,16 @@ ci: migrated
### Run
-The `ee:gitlab:seed:awesome_co` Rake task takes two arguments. `:name` and `:namespace_id`.
+The `ee:gitlab:seed:data_seeder` Rake task takes two arguments. `:name` and `:namespace_id`.
```shell
-$ bundle exec rake "ee:gitlab:seed:awesome_co[awesome_co,1]"
-Seeding AwesomeCo for Administrator
+$ bundle exec rake "ee:gitlab:seed:data_seeder[data_seeder,1]"
+Seeding Data for Administrator
```
#### `:name`
-Where `:name` is the name of the AwesomeCo. (This will reflect .rb files located in db/seeds/awesome_co/*.rb)
+Where `:name` is the file name. (This will reflect relative `.rb`, `.yml`, or `.json` files located in `ee/db/seeds/data_seeder`, or absolute paths to seed files)
#### `:namespace_id`
@@ -48,7 +48,7 @@ Where `:namespace_id` is the ID of the User or Group Namespace
## Develop
-AwesomeCo seeding uses FactoryBot definitions from `spec/factories` which ...
+The Data Seeder uses FactoryBot definitions from `spec/factories` which ...
1. Saves time on development
1. Are easy-to-read
diff --git a/package.json b/package.json
index 93a52a13f24..d7d9736a056 100644
--- a/package.json
+++ b/package.json
@@ -56,7 +56,7 @@
"@gitlab/cluster-client": "^1.2.0",
"@gitlab/favicon-overlay": "2.0.0",
"@gitlab/fonts": "^1.2.0",
- "@gitlab/svgs": "3.42.0",
+ "@gitlab/svgs": "3.43.0",
"@gitlab/ui": "62.5.1",
"@gitlab/visual-review-tools": "1.7.3",
"@gitlab/web-ide": "0.0.1-dev-20230425040132",
diff --git a/spec/controllers/registrations/welcome_controller_spec.rb b/spec/controllers/registrations/welcome_controller_spec.rb
index 3c631362119..4118754144c 100644
--- a/spec/controllers/registrations/welcome_controller_spec.rb
+++ b/spec/controllers/registrations/welcome_controller_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Registrations::WelcomeController, feature_category: :system_access do
let(:user) { create(:user) }
- describe '#welcome' do
+ describe '#show' do
subject(:show) { get :show }
context 'without a signed in user' do
@@ -27,6 +27,14 @@ RSpec.describe Registrations::WelcomeController, feature_category: :system_acces
end
it { is_expected.to render_template(:show) }
+
+ render_views
+
+ it 'has the expected submission url' do
+ show
+
+ expect(response.body).to include("action=\"#{users_sign_up_welcome_path}\"")
+ end
end
context 'when role and setup_for_company is set' do
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index 92329b10426..9aa8a2ae605 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -12,15 +12,23 @@ RSpec.describe RegistrationsController, feature_category: :user_profile do
end
describe '#new' do
- subject { get :new }
+ subject(:new) { get :new }
it 'renders new template and sets the resource variable' do
- expect(subject).to render_template(:new)
+ expect(new).to render_template(:new)
expect(response).to have_gitlab_http_status(:ok)
expect(assigns(:resource)).to be_a(User)
end
it_behaves_like "switches to user preferred language", 'Sign up'
+
+ render_views
+
+ it 'has the expected registration url' do
+ new
+
+ expect(response.body).to include("action=\"#{user_registration_path}\"")
+ end
end
describe '#create' do
diff --git a/spec/frontend/oauth_remember_me_spec.js b/spec/frontend/oauth_remember_me_spec.js
index 7be3d441eb3..33295d46fea 100644
--- a/spec/frontend/oauth_remember_me_spec.js
+++ b/spec/frontend/oauth_remember_me_spec.js
@@ -1,5 +1,6 @@
import $ from 'jquery';
-import { loadHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
+import htmlOauthRememberMe from 'test_fixtures_static/oauth_remember_me.html';
+import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import OAuthRememberMe from '~/pages/sessions/new/oauth_remember_me';
describe('OAuthRememberMe', () => {
@@ -8,7 +9,7 @@ describe('OAuthRememberMe', () => {
};
beforeEach(() => {
- loadHTMLFixture('static/oauth_remember_me.html');
+ setHTMLFixture(htmlOauthRememberMe);
new OAuthRememberMe({ container: $('#oauth-container') }).bindEvents();
});
diff --git a/spec/support/helpers/callouts_test_helper.rb b/spec/support/helpers/callouts_test_helper.rb
deleted file mode 100644
index 8c7faa71d9f..00000000000
--- a/spec/support/helpers/callouts_test_helper.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-module CalloutsTestHelper
- def callouts_trials_link_path
- '/-/trial_registrations/new?glm_content=gold-callout&glm_source=gitlab.com'
- end
-end
-
-CalloutsTestHelper.prepend_mod
diff --git a/spec/support/shared_examples/db/seeds/awesome_co_shared_examples.rb b/spec/support/shared_examples/db/seeds/data_seeder_shared_examples.rb
index ae0fe19f6b9..4e8d65ac25e 100644
--- a/spec/support/shared_examples/db/seeds/awesome_co_shared_examples.rb
+++ b/spec/support/shared_examples/db/seeds/data_seeder_shared_examples.rb
@@ -56,7 +56,7 @@ end
RSpec.shared_examples 'passes traits' do
it 'passes traits' do
- expect_next_instance_of(AwesomeCo::FactoryDefinitions::FactoryDefinition) do |instance|
+ expect_next_instance_of(Gitlab::DataSeeder::FactoryDefinitions::FactoryDefinition) do |instance|
# `described` trait will automaticaly generate a description
expect(instance.build(binding).description).to eq('Description of Test Label')
end
diff --git a/spec/views/registrations/welcome/show.html.haml_spec.rb b/spec/views/registrations/welcome/show.html.haml_spec.rb
index 372dbf01a64..e229df555b1 100644
--- a/spec/views/registrations/welcome/show.html.haml_spec.rb
+++ b/spec/views/registrations/welcome/show.html.haml_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe 'registrations/welcome/show' do
before do
allow(view).to receive(:current_user).and_return(user)
- allow(view).to receive(:glm_tracking_params).and_return({})
+ allow(view).to receive(:welcome_update_params).and_return({})
render
end
diff --git a/yarn.lock b/yarn.lock
index 4b5184c246e..ec89202c67e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1110,10 +1110,10 @@
stylelint-declaration-strict-value "1.8.0"
stylelint-scss "4.2.0"
-"@gitlab/svgs@3.42.0":
- version "3.42.0"
- resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.42.0.tgz#3168eb46ed9f87abc02b749cc1468902aee8e964"
- integrity sha512-hOZtSWKndBP7WO7UxOe+dlMtWK+4J9srLBEAro8ZNcRufm+esF8N8HBPgFvx4ef6GVAW7Ej7qe1wW9kiQQGDyQ==
+"@gitlab/svgs@3.43.0":
+ version "3.43.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.43.0.tgz#7789e6e5e8cd7d97489d9cfb021e0f25ddcfa829"
+ integrity sha512-o5P8T42qXh38DU0Px7rnVCV86cDfrsKHNczdNQAIGeyw5Ci7orsL/0f1M4BVtOSgU0VOoHuB0Yb/HyQjjmwt6A==
"@gitlab/ui@62.5.1":
version "62.5.1"