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>2023-09-26 09:11:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-26 09:11:42 +0300
commit403b33efdbc038a6bd42a50970e0985b385f73d7 (patch)
tree27fef01965172d58b4113519e503922f471b0bc6
parent6fc01270bfda8ecadb47cade0b5649d32adb2822 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/javascripts/ci/common/pipelines_table.vue1
-rw-r--r--app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue15
-rw-r--r--app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue1
-rw-r--r--app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue1
-rw-r--r--app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue1
-rw-r--r--app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue2
-rw-r--r--app/assets/javascripts/super_sidebar/super_sidebar_bundle.js4
-rw-r--r--app/services/audit_events/build_service.rb9
-rw-r--r--config/feature_flags/development/chatops.yml8
-rw-r--r--doc/administration/settings/jira_cloud_app.md23
-rw-r--r--doc/integration/jira/troubleshooting.md85
-rw-r--r--lib/gitlab/chat.rb10
-rw-r--r--lib/gitlab/slash_commands/run.rb2
-rw-r--r--qa/qa/flow/user_onboarding.rb2
-rw-r--r--qa/qa/page/project/pipeline/index.rb28
-rw-r--r--qa/qa/page/project/pipeline/new.rb28
-rw-r--r--qa/qa/page/registration/welcome.rb46
-rw-r--r--spec/features/populate_new_pipeline_vars_with_params_spec.rb12
-rw-r--r--spec/features/projects/pipelines/pipelines_spec.rb14
-rw-r--r--spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js8
-rw-r--r--spec/helpers/diff_helper_spec.rb2
-rw-r--r--spec/lib/gitlab/chat_spec.rb19
-rw-r--r--spec/lib/gitlab/slash_commands/run_spec.rb10
-rw-r--r--spec/services/audit_events/build_service_spec.rb8
25 files changed, 138 insertions, 203 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index b1cd3f354a4..d74f67e7d3b 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-7a80007379240d0c628407b00062cf6f69c6334d
+0d02e2dfdd429b7c5cda79c8f2af1132566ade65
diff --git a/app/assets/javascripts/ci/common/pipelines_table.vue b/app/assets/javascripts/ci/common/pipelines_table.vue
index 0c73c0c412f..8b9be593a8e 100644
--- a/app/assets/javascripts/ci/common/pipelines_table.vue
+++ b/app/assets/javascripts/ci/common/pipelines_table.vue
@@ -165,7 +165,6 @@ export default {
},
TBODY_TR_ATTR: {
'data-testid': 'pipeline-table-row',
- 'data-qa-selector': 'pipeline_row_container',
},
};
</script>
diff --git a/app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue
index cc7d9bd2340..2f06b82bac0 100644
--- a/app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue
+++ b/app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue
@@ -438,8 +438,7 @@ export default {
v-for="(variable, index) in variables"
:key="variable.uniqueId"
class="gl-mb-3 gl-pb-2"
- data-testid="ci-variable-row"
- data-qa-selector="ci_variable_row_container"
+ data-testid="ci-variable-row-container"
>
<div
class="gl-display-flex gl-align-items-stretch gl-flex-direction-column gl-md-flex-direction-row"
@@ -461,8 +460,7 @@ export default {
v-model="variable.key"
:placeholder="s__('CiVariables|Input variable key')"
:class="$options.formElementClasses"
- data-testid="pipeline-form-ci-variable-key"
- data-qa-selector="ci_variable_key_field"
+ data-testid="pipeline-form-ci-variable-key-field"
@change="addEmptyVariable(refFullName)"
/>
<gl-dropdown
@@ -471,12 +469,11 @@ export default {
:class="$options.formElementClasses"
class="gl-flex-grow-1 gl-mr-0!"
data-testid="pipeline-form-ci-variable-value-dropdown"
- data-qa-selector="ci_variable_value_dropdown"
>
<gl-dropdown-item
v-for="option in configVariablesWithDescription.options[variable.key]"
:key="option"
- data-qa-selector="ci_variable_value_dropdown_item"
+ data-testid="ci-variable-value-dropdown-item"
@click="setVariableAttribute(variable.key, 'value', option)"
>
{{ option }}
@@ -489,8 +486,7 @@ export default {
class="gl-mb-3"
:style="$options.textAreaStyle"
:no-resize="false"
- data-testid="pipeline-form-ci-variable-value"
- data-qa-selector="ci_variable_value_field"
+ data-testid="pipeline-form-ci-variable-value-field"
/>
<template v-if="variables.length > 1">
@@ -542,8 +538,7 @@ export default {
category="primary"
variant="confirm"
class="js-no-auto-disable gl-mr-3"
- data-qa-selector="run_pipeline_button"
- data-testid="run_pipeline_button"
+ data-testid="run-pipeline-button"
:disabled="submitted"
>{{ s__('Pipeline|Run pipeline') }}</gl-button
>
diff --git a/app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue b/app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue
index ddcc566af13..0165bbfe69d 100644
--- a/app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue
+++ b/app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue
@@ -58,7 +58,6 @@ export default {
category="primary"
class="js-run-pipeline"
data-testid="run-pipeline-button"
- data-qa-selector="run_pipeline_button"
>
{{ s__('Pipeline|Run pipeline') }}
</gl-button>
diff --git a/app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue b/app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue
index 746d605d852..8945bb06862 100644
--- a/app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue
+++ b/app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue
@@ -100,7 +100,6 @@ export default {
:disabled="isRetrying"
:loading="isRetrying"
class="js-pipelines-retry-button"
- data-qa-selector="pipeline_retry_button"
data-testid="pipelines-retry-button"
icon="retry"
variant="default"
diff --git a/app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue b/app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue
index edaeb481d7b..aad2adff84a 100644
--- a/app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue
+++ b/app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue
@@ -173,7 +173,6 @@ export default {
:href="pipeline.path"
class="gl-mr-1 gl-text-blue-500!"
data-testid="pipeline-url-link"
- data-qa-selector="pipeline_url_link"
@click="trackClick('click_pipeline_id')"
>#{{ pipeline[pipelineKey] }}</gl-link
>
diff --git a/app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue b/app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue
index 2da9141df8e..a8fb762b2b7 100644
--- a/app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue
+++ b/app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue
@@ -43,7 +43,7 @@ export default {
class="gl-mb-3"
:status="pipelineStatus"
:show-text="!isChildView"
- data-qa-selector="pipeline_commit_status"
+ data-testidr="pipeline-commit-status"
@ciStatusBadgeClick="trackClick"
/>
<pipelines-timeago :pipeline="pipeline" />
diff --git a/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js b/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
index de16161efb5..f9e488ea5ee 100644
--- a/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
+++ b/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
@@ -33,6 +33,8 @@ const getTrialStatusWidgetData = (sidebarData) => {
companyName,
glmContent,
createHandRaiseLeadPath,
+ trackAction,
+ trackLabel,
} = convertObjectPropsToCamelCase(sidebarData.trial_status_popover_data_attrs);
return {
@@ -47,6 +49,8 @@ const getTrialStatusWidgetData = (sidebarData) => {
daysRemaining,
targetId,
createHandRaiseLeadPath,
+ trackAction,
+ trackLabel,
trialEndDate: new Date(trialEndDate),
user: { namespaceId, userName, firstName, lastName, companyName, glmContent },
};
diff --git a/app/services/audit_events/build_service.rb b/app/services/audit_events/build_service.rb
index f5322fa5ff4..9eab2f836db 100644
--- a/app/services/audit_events/build_service.rb
+++ b/app/services/audit_events/build_service.rb
@@ -11,7 +11,10 @@ module AuditEvents
def initialize(
author:, scope:, target:, message:,
created_at: DateTime.current, additional_details: {}, ip_address: nil, target_details: nil)
- raise MissingAttributeError if missing_attribute?(author, scope, target, message)
+ raise MissingAttributeError, "author" if author.blank?
+ raise MissingAttributeError, "scope" if scope.blank?
+ raise MissingAttributeError, "target" if target.blank?
+ raise MissingAttributeError, "message" if message.blank?
@author = build_author(author)
@scope = scope
@@ -32,10 +35,6 @@ module AuditEvents
private
- def missing_attribute?(author, scope, target, message)
- author.blank? || scope.blank? || target.blank? || message.blank?
- end
-
def payload
base_payload.merge(details: base_details_payload)
end
diff --git a/config/feature_flags/development/chatops.yml b/config/feature_flags/development/chatops.yml
deleted file mode 100644
index 74cabe995e5..00000000000
--- a/config/feature_flags/development/chatops.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: chatops
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/24780
-rollout_issue_url:
-milestone: '11.9'
-type: development
-group: group::configure
-default_enabled: true
diff --git a/doc/administration/settings/jira_cloud_app.md b/doc/administration/settings/jira_cloud_app.md
index c23e2142729..f116fab2c1a 100644
--- a/doc/administration/settings/jira_cloud_app.md
+++ b/doc/administration/settings/jira_cloud_app.md
@@ -327,3 +327,26 @@ Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remot
- The authenticated Jira user does not have [site administrator](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Make-someone-a-site-admin) access.
To resolve this issue, ensure the authenticated user is a Jira site administrator and try again.
+
+### Check if Jira Cloud is linked
+
+You can use the [Rails console](../../administration/operations/rails_console.md#starting-a-rails-console-session) to check if Jira Cloud is linked to:
+
+- A specified group:
+
+ ```ruby
+ JiraConnectSubscription.where(namespace: Namespace.by_path('group/subgroup'))
+ ```
+
+- A specified project:
+
+ ```ruby
+ Project.find_by_full_path('path/to/project').jira_subscription_exists?
+ ```
+
+- Any group:
+
+ ```ruby
+ installation = JiraConnectInstallation.find_by_base_url("https://customer_name.atlassian.net")
+ installation.subscriptions
+ ```
diff --git a/doc/integration/jira/troubleshooting.md b/doc/integration/jira/troubleshooting.md
index b37b3e3e737..ec6d41affb0 100644
--- a/doc/integration/jira/troubleshooting.md
+++ b/doc/integration/jira/troubleshooting.md
@@ -10,23 +10,41 @@ This page contains a list of common issues you might encounter when working with
## GitLab cannot comment on a Jira issue
-If GitLab cannot comment on Jira issues, make sure the Jira user you
-set up for the [Jira integration](configure.md) has permission to:
+If GitLab cannot comment on a Jira issue, ensure the Jira user you created for the [Jira issue integration](configure.md) has permission to:
- Post comments on a Jira issue.
- Transition the Jira issue.
-Jira issue references and update comments do not work if the [GitLab issue tracker](../../integration/external-issue-tracker.md) is disabled.
+When the [GitLab issue tracker](../../integration/external-issue-tracker.md) is disabled, Jira issue references and comments do not work.
+If you [restrict IP addresses for Jira access](https://support.atlassian.com/security-and-access-policies/docs/specify-ip-addresses-for-product-access/), ensure you add your self-managed IP addresses or [GitLab IP addresses](../../user/gitlab_com/index.md#ip-range) to the allowlist in Jira.
-If you [restrict IP addresses for Jira access](https://support.atlassian.com/security-and-access-policies/docs/specify-ip-addresses-for-product-access/), make sure you add your self-managed IP addresses or [GitLab.com IP range](../../user/gitlab_com/index.md#ip-range) to the allowlist in Jira.
+For the root cause, check the [`integrations_json.log`](../../administration/logs/index.md#integrations_jsonlog) file. When GitLab tries to comment on a Jira issue, an `Error sending message` log entry might appear.
+
+In GitLab 16.1 and later, when an error occurs, the [`integrations_json.log`](../../administration/logs/index.md#integrations_jsonlog) file contains `client_*` keys in the outgoing API request to Jira.
+You can use the `client_*` keys to check the [Atlassian API documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues) for why the error has occurred.
+
+In the following example, Jira responds with a `404` because the Jira issue `ALPHA-1` does not exist:
+
+```json
+{
+ "severity": "ERROR",
+ "time": "2023-07-25T21:38:56.510Z",
+ "message": "Error sending message",
+ "client_url": "https://my-jira-cloud.atlassian.net",
+ "client_path": "/rest/api/2/issue/ALPHA-1",
+ "client_status": "404",
+ "exception.class": "JIRA::HTTPError",
+ "exception.message": "Not Found",
+}
+```
## GitLab cannot close a Jira issue
If GitLab cannot close a Jira issue:
-- Make sure the `Transition ID` you set in the Jira settings matches the one
- your project needs to close an issue.
-
+- Ensure the transition ID you set in the Jira settings matches the one
+ your project must have to close an issue. For more information, see
+ [automatic issue transitions](issues.md#automatic-issue-transitions) and [custom issue transitions](issues.md#custom-issue-transitions).
- Make sure the Jira issue is not already marked as resolved:
- Check the Jira issue resolution field is not set.
- Check the issue is not struck through in Jira lists.
@@ -47,46 +65,45 @@ There is a [known bug](https://gitlab.com/gitlab-org/gitlab/-/issues/341571)
where the Jira integration sometimes does not work for a project that has been imported.
As a workaround, disable the integration and then re-enable it.
-## Bulk change all Jira integrations to Jira instance-level values
+## Bulk change all Jira integrations to Jira group-level or instance-level values
+
+WARNING:
+Commands that change data can cause damage if not run correctly or under the right conditions. Always run commands in a test environment first and have a backup instance ready to restore.
To change all Jira projects to use instance-level integration settings:
1. In a [Rails console](../../administration/operations/rails_console.md#starting-a-rails-console-session), run the following:
- ```ruby
- jira_integration_instance_id = Integrations::Jira.find_by(instance: true).id
- Integrations::Jira.where(active: true, instance: false, inherit_from_id: nil).find_each do |integration|
- integration.update_attribute(:inherit_from_id, jira_integration_instance_id)
- end
- ```
-
-1. Modify and save the instance-level integration from the UI to propagate the changes to all group-level and project-level integrations.
-
-## Check if Jira Cloud is linked
+ - In GitLab 15.0 and later:
-You can use the [Rails console](../../administration/operations/rails_console.md#starting-a-rails-console-session) to check if Jira Cloud is linked to:
+ ```ruby
+ Integrations::Jira.where(active: true, instance: false, inherit_from_id: nil).find_each do |integration|
+ default_integration = Integration.default_integration(integration.type, integration.project)
-A specified namespace:
+ integration.inherit_from_id = default_integration.id
-```ruby
-JiraConnectSubscription.where(namespace: Namespace.by_path('group/subgroup'))
-```
-
-A specified project:
+ if integration.save(context: :manual_change)
+ BulkUpdateIntegrationService.new(default_integration, [integration]).execute
+ end
+ end
+ ```
-```ruby
-Project.find_by_full_path('path/to/project').jira_subscription_exists?
-```
+ - In GitLab 14.10 and earlier:
-Any namespace:
+ ```ruby
+ jira_integration_instance_id = Integrations::Jira.find_by(instance: true).id
+ Integrations::Jira.where(active: true, instance: false, template: false, inherit_from_id: nil).find_each do |integration|
+ integration.update_attribute(:inherit_from_id, jira_integration_instance_id)
+ end
+ ```
-```ruby
-installation = JiraConnectInstallation.find_by_base_url("https://customer_name.atlassian.net")
-installation.subscriptions
-```
+1. Modify and save the instance-level integration from the UI to propagate the changes to all group-level and project-level integrations.
## Bulk update the service integration password for all projects
+WARNING:
+Commands that change data can cause damage if not run correctly or under the right conditions. Always run commands in a test environment first and have a backup instance ready to restore.
+
To reset the Jira user's password for all projects with active Jira integrations,
run the following in a [Rails console](../../administration/operations/rails_console.md#starting-a-rails-console-session):
@@ -107,7 +124,7 @@ Check [`production.log`](../../administration/logs/index.md#productionlog) to se
:NoMethodError (undefined method 'duedate' for #<JIRA::Resource::Issue:0x00007f406d7b3180>)
```
-If that's the case, ensure the **Due date** field is visible for issues in the integrated Jira project.
+If that's the case, ensure the [**Due date** field is visible for issues](https://confluence.atlassian.com/jirakb/due-date-field-is-missing-189431917.html) in the integrated Jira project.
## `An error occurred while requesting data from Jira` when viewing the Jira issues list in GitLab
diff --git a/lib/gitlab/chat.rb b/lib/gitlab/chat.rb
deleted file mode 100644
index 30e9989d270..00000000000
--- a/lib/gitlab/chat.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Chat
- # Returns `true` if Chatops is available for the current instance.
- def self.available?
- ::Feature.enabled?(:chatops)
- end
- end
-end
diff --git a/lib/gitlab/slash_commands/run.rb b/lib/gitlab/slash_commands/run.rb
index 40fd7ee4f20..c5330c551a1 100644
--- a/lib/gitlab/slash_commands/run.rb
+++ b/lib/gitlab/slash_commands/run.rb
@@ -13,7 +13,7 @@ module Gitlab
end
def self.available?(project)
- Chat.available? && project.builds_enabled?
+ project.builds_enabled?
end
def self.allowed?(project, user)
diff --git a/qa/qa/flow/user_onboarding.rb b/qa/qa/flow/user_onboarding.rb
index 5c26b0eb5bc..3444e8c3923 100644
--- a/qa/qa/flow/user_onboarding.rb
+++ b/qa/qa/flow/user_onboarding.rb
@@ -6,7 +6,7 @@ module QA
extend self
def onboard_user(wait: Capybara.default_max_wait_time)
- Page::Registration::Welcome.perform do |welcome_page|
+ EE::Page::Registration::Welcome.perform do |welcome_page|
if welcome_page.has_get_started_button?(wait: wait)
welcome_page.select_role('Other')
welcome_page.choose_setup_for_just_me_if_available
diff --git a/qa/qa/page/project/pipeline/index.rb b/qa/qa/page/project/pipeline/index.rb
index a1086794b1f..ae5ae3032f4 100644
--- a/qa/qa/page/project/pipeline/index.rb
+++ b/qa/qa/page/project/pipeline/index.rb
@@ -5,32 +5,26 @@ module QA
module Project
module Pipeline
class Index < QA::Page::Base
- view 'app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue' do
- element :pipeline_url_link
- end
+ include Component::CiBadgeLink
- view 'app/assets/javascripts/ci/pipelines_page/components/pipelines_status_badge.vue' do
- element :pipeline_commit_status
- end
-
- view 'app/assets/javascripts/ci/pipelines_page/components/pipeline_operations.vue' do
- element :pipeline_retry_button
+ view 'app/assets/javascripts/ci/pipelines_page/components/pipeline_url.vue' do
+ element 'pipeline-url-link'
end
view 'app/assets/javascripts/ci/pipelines_page/components/nav_controls.vue' do
- element :run_pipeline_button
+ element 'run-pipeline-button'
end
view 'app/assets/javascripts/ci/common/pipelines_table.vue' do
- element :pipeline_row_container
+ element 'pipeline-table-row'
end
def latest_pipeline
- all_elements(:pipeline_row_container, minimum: 1).first
+ all_elements('pipeline-table-row', minimum: 1).first
end
def latest_pipeline_status
- latest_pipeline.find(element_selector_css(:pipeline_commit_status)).text
+ latest_pipeline.find(element_selector_css('ci-badge-link')).text
end
# If no status provided, wait for pipeline to complete
@@ -46,20 +40,20 @@ module QA
def has_any_pipeline?(wait: nil)
wait ||= Support::Repeater::DEFAULT_MAX_WAIT_TIME
wait_until(max_duration: wait, message: "Wait for any pipeline") do
- has_element?(:pipeline_row_container)
+ has_element?('pipeline-table-row')
end
end
def has_no_pipeline?
- has_no_element?(:pipeline_row_container)
+ has_no_element?('pipeline-table-row')
end
def click_run_pipeline_button
- click_element(:run_pipeline_button, Page::Project::Pipeline::New)
+ click_element('run-pipeline-button', Page::Project::Pipeline::New)
end
def click_on_latest_pipeline
- latest_pipeline.find(element_selector_css(:pipeline_url_link)).click
+ latest_pipeline.find(element_selector_css('pipeline-url-link')).click
end
end
end
diff --git a/qa/qa/page/project/pipeline/new.rb b/qa/qa/page/project/pipeline/new.rb
index 54c3bb0ddeb..33aa93d6204 100644
--- a/qa/qa/page/project/pipeline/new.rb
+++ b/qa/qa/page/project/pipeline/new.rb
@@ -6,45 +6,45 @@ module QA
module Pipeline
class New < QA::Page::Base
view 'app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue' do
- element :run_pipeline_button, required: true
- element :ci_variable_row_container
- element :ci_variable_key_field
- element :ci_variable_value_field
- element :ci_variable_value_dropdown
- element :ci_variable_value_dropdown_item
+ element 'run-pipeline-button', required: true
+ element 'ci-variable-row-container'
+ element 'pipeline-form-ci-variable-key-field'
+ element 'pipeline-form-ci-variable-value-field'
+ element 'pipeline-form-ci-variable-value-dropdown'
+ element 'ci-variable-value-dropdown-item'
end
def click_run_pipeline_button
- click_element(:run_pipeline_button, Page::Project::Pipeline::Show)
+ click_element('run-pipeline-button', Page::Project::Pipeline::Show)
end
def click_variable_dropdown
return unless has_variable_dropdown?
- click_element(:ci_variable_value_dropdown)
+ click_element('pipeline-form-ci-variable-value-dropdown')
end
def configure_variable(key: nil, value: 'foo', row_index: 0)
- within_element_by_index(:ci_variable_row_container, row_index) do
- fill_element(:ci_variable_key_field, key) unless key.nil?
- fill_element(:ci_variable_value_field, value)
+ within_element_by_index('ci-variable-row-container', row_index) do
+ fill_element('pipeline-form-ci-variable-key-field', key) unless key.nil?
+ fill_element('pipeline-form-ci-variable-value-field', value)
end
end
def has_variable_dropdown?
- has_element?(:ci_variable_value_dropdown)
+ has_element?('pipeline-form-ci-variable-value-dropdown')
end
def variable_dropdown
return unless has_variable_dropdown?
- find_element(:ci_variable_value_dropdown)
+ find_element('pipeline-form-ci-variable-value-dropdown')
end
def variable_dropdown_item_with_index(index)
return unless has_variable_dropdown?
- within_element_by_index(:ci_variable_value_dropdown_item, index) do
+ within_element_by_index('ci-variable-value-dropdown-item', index) do
find('p')
end
end
diff --git a/qa/qa/page/registration/welcome.rb b/qa/qa/page/registration/welcome.rb
deleted file mode 100644
index be0af882fad..00000000000
--- a/qa/qa/page/registration/welcome.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Page
- module Registration
- class Welcome < Page::Base
- view 'ee/app/views/registrations/welcome/show.html.haml' do
- element :get_started_button
- element :role_dropdown
- end
-
- view 'ee/app/views/registrations/welcome/_setup_for_company.html.haml' do
- element :setup_for_just_me_content
- element :setup_for_just_me_radio
- end
-
- view 'ee/app/views/registrations/welcome/_joining_project.html.haml' do
- element :create_a_new_project_radio
- end
-
- def has_get_started_button?(wait: Capybara.default_max_wait_time)
- has_element?(:get_started_button, wait: wait)
- end
-
- def select_role(role)
- select_element(:role_dropdown, role)
- end
-
- def choose_create_a_new_project_if_available
- click_element(:create_a_new_project_radio) if has_element?(:create_a_new_project_radio, wait: 1)
- end
-
- def choose_setup_for_just_me_if_available
- choose_element(:setup_for_just_me_radio, true) if has_element?(:setup_for_just_me_content, wait: 1)
- end
-
- def click_get_started_button
- Support::Retrier.retry_until do
- click_element :get_started_button
- has_no_element?(:get_started_button)
- end
- end
- end
- end
- end
-end
diff --git a/spec/features/populate_new_pipeline_vars_with_params_spec.rb b/spec/features/populate_new_pipeline_vars_with_params_spec.rb
index bcda30ccb84..8bb5f2514ef 100644
--- a/spec/features/populate_new_pipeline_vars_with_params_spec.rb
+++ b/spec/features/populate_new_pipeline_vars_with_params_spec.rb
@@ -15,16 +15,16 @@ RSpec.describe "Populate new pipeline CI variables with url params", :js, featur
end
it "var[key1]=value1 populates env_var variable correctly" do
- page.within(all("[data-testid='ci-variable-row']")[0]) do
- expect(find("[data-testid='pipeline-form-ci-variable-key']").value).to eq('key1')
- expect(find("[data-testid='pipeline-form-ci-variable-value']").value).to eq('value1')
+ page.within(all("[data-testid='ci-variable-row-container']")[0]) do
+ expect(find("[data-testid='pipeline-form-ci-variable-key-field']").value).to eq('key1')
+ expect(find("[data-testid='pipeline-form-ci-variable-value-field']").value).to eq('value1')
end
end
it "file_var[key2]=value2 populates file variable correctly" do
- page.within(all("[data-testid='ci-variable-row']")[1]) do
- expect(find("[data-testid='pipeline-form-ci-variable-key']").value).to eq('key2')
- expect(find("[data-testid='pipeline-form-ci-variable-value']").value).to eq('value2')
+ page.within(all("[data-testid='ci-variable-row-container']")[1]) do
+ expect(find("[data-testid='pipeline-form-ci-variable-key-field']").value).to eq('key2')
+ expect(find("[data-testid='pipeline-form-ci-variable-value-field']").value).to eq('value2')
end
end
end
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb
index c1aa2c35337..847f18d62aa 100644
--- a/spec/features/projects/pipelines/pipelines_spec.rb
+++ b/spec/features/projects/pipelines/pipelines_spec.rb
@@ -694,7 +694,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :continuous_integration do
it 'creates a new pipeline' do
expect do
- find('[data-testid="run_pipeline_button"]', text: 'Run pipeline').click
+ find('[data-testid="run-pipeline-button"]', text: 'Run pipeline').click
wait_for_requests
end
.to change { Ci::Pipeline.count }.by(1)
@@ -704,13 +704,13 @@ RSpec.describe 'Pipelines', :js, feature_category: :continuous_integration do
context 'when variables are specified' do
it 'creates a new pipeline with variables' do
- page.within(find("[data-testid='ci-variable-row']")) do
- find("[data-testid='pipeline-form-ci-variable-key']").set('key_name')
- find("[data-testid='pipeline-form-ci-variable-value']").set('value')
+ page.within(find("[data-testid='ci-variable-row-container']")) do
+ find("[data-testid='pipeline-form-ci-variable-key-field']").set('key_name')
+ find("[data-testid='pipeline-form-ci-variable-value-field']").set('value')
end
expect do
- find('[data-testid="run_pipeline_button"]', text: 'Run pipeline').click
+ find('[data-testid="run-pipeline-button"]', text: 'Run pipeline').click
wait_for_requests
end
.to change { Ci::Pipeline.count }.by(1)
@@ -723,7 +723,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :continuous_integration do
context 'without gitlab-ci.yml' do
before do
- find('[data-testid="run_pipeline_button"]', text: 'Run pipeline').click
+ find('[data-testid="run-pipeline-button"]', text: 'Run pipeline').click
wait_for_requests
end
@@ -733,7 +733,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :continuous_integration do
stub_ci_pipeline_to_return_yaml_file
expect do
- find('[data-testid="run_pipeline_button"]', text: 'Run pipeline').click
+ find('[data-testid="run-pipeline-button"]', text: 'Run pipeline').click
wait_for_requests
end
.to change { Ci::Pipeline.count }.by(1)
diff --git a/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js b/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js
index 1d4ae33c667..2807cc0f2a1 100644
--- a/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js
+++ b/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js
@@ -55,12 +55,12 @@ describe('Pipeline New Form', () => {
const findForm = () => wrapper.findComponent(GlForm);
const findRefsDropdown = () => wrapper.findComponent(RefsDropdown);
- const findSubmitButton = () => wrapper.findByTestId('run_pipeline_button');
- const findVariableRows = () => wrapper.findAllByTestId('ci-variable-row');
+ const findSubmitButton = () => wrapper.findByTestId('run-pipeline-button');
+ const findVariableRows = () => wrapper.findAllByTestId('ci-variable-row-container');
const findRemoveIcons = () => wrapper.findAllByTestId('remove-ci-variable-row');
const findVariableTypes = () => wrapper.findAllByTestId('pipeline-form-ci-variable-type');
- const findKeyInputs = () => wrapper.findAllByTestId('pipeline-form-ci-variable-key');
- const findValueInputs = () => wrapper.findAllByTestId('pipeline-form-ci-variable-value');
+ const findKeyInputs = () => wrapper.findAllByTestId('pipeline-form-ci-variable-key-field');
+ const findValueInputs = () => wrapper.findAllByTestId('pipeline-form-ci-variable-value-field');
const findValueDropdowns = () =>
wrapper.findAllByTestId('pipeline-form-ci-variable-value-dropdown');
const findValueDropdownItems = (dropdown) => dropdown.findAllComponents(GlDropdownItem);
diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb
index 2318bbf861a..92793067515 100644
--- a/spec/helpers/diff_helper_spec.rb
+++ b/spec/helpers/diff_helper_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe DiffHelper do
+RSpec.describe DiffHelper, feature_category: :code_review_workflow do
include RepoHelpers
let(:project) { create(:project, :repository) }
diff --git a/spec/lib/gitlab/chat_spec.rb b/spec/lib/gitlab/chat_spec.rb
deleted file mode 100644
index a9df35ace98..00000000000
--- a/spec/lib/gitlab/chat_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Gitlab::Chat, :use_clean_rails_memory_store_caching do
- describe '.available?' do
- it 'returns true when the chatops feature is available' do
- stub_feature_flags(chatops: true)
-
- expect(described_class).to be_available
- end
-
- it 'returns false when the chatops feature is not available' do
- stub_feature_flags(chatops: false)
-
- expect(described_class).not_to be_available
- end
- end
-end
diff --git a/spec/lib/gitlab/slash_commands/run_spec.rb b/spec/lib/gitlab/slash_commands/run_spec.rb
index 9d204228d21..5d228a9ba6a 100644
--- a/spec/lib/gitlab/slash_commands/run_spec.rb
+++ b/spec/lib/gitlab/slash_commands/run_spec.rb
@@ -39,16 +39,6 @@ RSpec.describe Gitlab::SlashCommands::Run do
expect(described_class.available?(project)).to eq(false)
end
-
- it 'returns false when chatops is not available' do
- allow(Gitlab::Chat)
- .to receive(:available?)
- .and_return(false)
-
- project = double(:project, builds_enabled?: true)
-
- expect(described_class.available?(project)).to eq(false)
- end
end
describe '.allowed?' do
diff --git a/spec/services/audit_events/build_service_spec.rb b/spec/services/audit_events/build_service_spec.rb
index 575ec9e58b8..d5a3d1bbaf7 100644
--- a/spec/services/audit_events/build_service_spec.rb
+++ b/spec/services/audit_events/build_service_spec.rb
@@ -129,25 +129,25 @@ RSpec.describe AuditEvents::BuildService, feature_category: :audit_events do
context 'when author is missing' do
let(:author) { nil }
- it { expect { service }.to raise_error(described_class::MissingAttributeError) }
+ it { expect { service }.to raise_error(described_class::MissingAttributeError, "author") }
end
context 'when scope is missing' do
let(:scope) { nil }
- it { expect { service }.to raise_error(described_class::MissingAttributeError) }
+ it { expect { service }.to raise_error(described_class::MissingAttributeError, "scope") }
end
context 'when target is missing' do
let(:target) { nil }
- it { expect { service }.to raise_error(described_class::MissingAttributeError) }
+ it { expect { service }.to raise_error(described_class::MissingAttributeError, "target") }
end
context 'when message is missing' do
let(:message) { nil }
- it { expect { service }.to raise_error(described_class::MissingAttributeError) }
+ it { expect { service }.to raise_error(described_class::MissingAttributeError, "message") }
end
end
end