diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-25 06:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-25 06:09:58 +0300 |
commit | a988d02fc79e12cf80cf9c5cee6bafc15cdd85ee (patch) | |
tree | 6c379d47d9d9587f407b16eb84ba18b006497b8c /spec/frontend | |
parent | 6a8fdd62ab34910131f0c2e071b88f7cb07593f7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
6 files changed, 14 insertions, 8 deletions
diff --git a/spec/frontend/ci/pipeline_editor/mock_data.js b/spec/frontend/ci/pipeline_editor/mock_data.js index 54bbaa15ecf..007abde939f 100644 --- a/spec/frontend/ci/pipeline_editor/mock_data.js +++ b/spec/frontend/ci/pipeline_editor/mock_data.js @@ -1,5 +1,6 @@ import { CI_CONFIG_STATUS_INVALID, CI_CONFIG_STATUS_VALID } from '~/ci/pipeline_editor/constants'; import { unwrapStagesWithNeeds } from '~/pipelines/components/unwrapping_utils'; +import { DOCS_URL_IN_EE_DIR } from 'jh_else_ce/lib/utils/url_utility'; export const commonOptions = { ciConfigPath: '/ci/config', @@ -601,7 +602,7 @@ export const mockErrors = [ ]; export const mockWarnings = [ - '"jobs:multi_project_job may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings"', + `"jobs:multi_project_job may allow multiple pipelines to run for a single action due to \`rules:when\` clause with no \`workflow:rules\` - read more: ${DOCS_URL_IN_EE_DIR}/ci/troubleshooting.html#pipeline-warnings"`, ]; export const mockCommitCreateResponse = { diff --git a/spec/frontend/ci/pipeline_new/mock_data.js b/spec/frontend/ci/pipeline_new/mock_data.js index 76a88f63298..72a491bb946 100644 --- a/spec/frontend/ci/pipeline_new/mock_data.js +++ b/spec/frontend/ci/pipeline_new/mock_data.js @@ -1,3 +1,5 @@ +import { DOCS_URL_IN_EE_DIR } from 'jh_else_ce/lib/utils/url_utility'; + export const mockFilteredRefs = { Branches: ['branch-1'], Tags: ['1.0.0', '1.1.0'], @@ -28,9 +30,9 @@ export const mockError = { 'test job: chosen stage does not exist; available stages are .pre, build, test, deploy, .post', ], warnings: [ - 'jobs:build1 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings', - 'jobs:build2 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings', - 'jobs:build3 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings', + `jobs:build1 may allow multiple pipelines to run for a single action due to \`rules:when\` clause with no \`workflow:rules\` - read more: ${DOCS_URL_IN_EE_DIR}/ci/troubleshooting.html#pipeline-warnings`, + `jobs:build2 may allow multiple pipelines to run for a single action due to \`rules:when\` clause with no \`workflow:rules\` - read more: ${DOCS_URL_IN_EE_DIR}/ci/troubleshooting.html#pipeline-warnings`, + `jobs:build3 may allow multiple pipelines to run for a single action due to \`rules:when\` clause with no \`workflow:rules\` - read more: ${DOCS_URL_IN_EE_DIR}/ci/troubleshooting.html#pipeline-warnings`, ], total_warnings: 7, }; diff --git a/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js b/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js index fd27004816a..546f5392caf 100644 --- a/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js +++ b/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js @@ -1,12 +1,13 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import SidebarDetailRow from '~/jobs/components/job/sidebar/sidebar_detail_row.vue'; +import { DOCS_URL } from 'jh_else_ce/lib/utils/url_utility'; describe('Sidebar detail row', () => { let wrapper; const title = 'this is the title'; const value = 'this is the value'; - const helpUrl = 'https://docs.gitlab.com/runner/register/index.html'; + const helpUrl = `${DOCS_URL}/runner/register/index.html`; const path = 'path/to/value'; const findHelpLink = () => wrapper.findByTestId('job-sidebar-help-link'); diff --git a/spec/frontend/lib/utils/url_utility_spec.js b/spec/frontend/lib/utils/url_utility_spec.js index e54ad674a36..f35b25fdf04 100644 --- a/spec/frontend/lib/utils/url_utility_spec.js +++ b/spec/frontend/lib/utils/url_utility_spec.js @@ -1107,6 +1107,7 @@ describe('URL utility', () => { describe('defaultPromoUrl', () => { it('Gitlab about page url', () => { + // eslint-disable-next-line no-restricted-syntax const url = 'https://about.gitlab.com'; expect(urlUtils.PROMO_URL).toBe(url); diff --git a/spec/frontend/vue_shared/components/markdown/toolbar_spec.js b/spec/frontend/vue_shared/components/markdown/toolbar_spec.js index 5bf11ff2b26..90d8ce3b500 100644 --- a/spec/frontend/vue_shared/components/markdown/toolbar_spec.js +++ b/spec/frontend/vue_shared/components/markdown/toolbar_spec.js @@ -3,6 +3,7 @@ import Toolbar from '~/vue_shared/components/markdown/toolbar.vue'; import EditorModeSwitcher from '~/vue_shared/components/markdown/editor_mode_switcher.vue'; import { updateText } from '~/lib/utils/text_markdown'; import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; +import { PROMO_URL } from 'jh_else_ce/lib/utils/url_utility'; jest.mock('~/lib/utils/text_markdown'); @@ -98,7 +99,7 @@ describe('toolbar', () => { expect.objectContaining({ tag: `### Rich text editor -Try out **styling** _your_ content right here or read the [direction](https://about.gitlab.com/direction/plan/knowledge/content_editor/).`, +Try out **styling** _your_ content right here or read the [direction](${PROMO_URL}/direction/plan/knowledge/content_editor/).`, textArea: document.querySelector('textarea'), cursorOffset: 0, wrap: false, diff --git a/spec/frontend/whats_new/components/feature_spec.js b/spec/frontend/whats_new/components/feature_spec.js index d69ac2803df..0898e85003e 100644 --- a/spec/frontend/whats_new/components/feature_spec.js +++ b/spec/frontend/whats_new/components/feature_spec.js @@ -1,5 +1,6 @@ import { shallowMount } from '@vue/test-utils'; import Feature from '~/whats_new/components/feature.vue'; +import { DOCS_URL_IN_EE_DIR } from 'jh_else_ce/lib/utils/url_utility'; describe("What's new single feature", () => { /** @type {import("@vue/test-utils").Wrapper} */ @@ -13,8 +14,7 @@ describe("What's new single feature", () => { 'self-managed': true, 'gitlab-com': true, available_in: ['Ultimate'], - documentation_link: - 'https://docs.gitlab.com/ee/user/project/settings/#compliance-pipeline-configuration', + documentation_link: `${DOCS_URL_IN_EE_DIR}/user/project/settings/#compliance-pipeline-configuration`, image_url: 'https://img.youtube.com/vi/upLJ_equomw/hqdefault.jpg', published_at: '2021-04-22T00:00:00.000Z', release: '13.11', |