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-07-25 06:09:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-25 06:09:58 +0300
commita988d02fc79e12cf80cf9c5cee6bafc15cdd85ee (patch)
tree6c379d47d9d9587f407b16eb84ba18b006497b8c /spec
parent6a8fdd62ab34910131f0c2e071b88f7cb07593f7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/ci/pipeline_editor/mock_data.js3
-rw-r--r--spec/frontend/ci/pipeline_new/mock_data.js8
-rw-r--r--spec/frontend/jobs/components/job/sidebar_detail_row_spec.js3
-rw-r--r--spec/frontend/lib/utils/url_utility_spec.js1
-rw-r--r--spec/frontend/vue_shared/components/markdown/toolbar_spec.js3
-rw-r--r--spec/frontend/whats_new/components/feature_spec.js4
-rw-r--r--spec/helpers/markup_helper_spec.rb6
-rw-r--r--spec/lib/banzai/filter/truncate_visible_filter_spec.rb2
8 files changed, 18 insertions, 12 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',
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 562d6683d97..22d1113ee8c 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe MarkupHelper do
+RSpec.describe MarkupHelper, feature_category: :team_planning do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) do
user = create(:user, username: 'gfm')
@@ -461,7 +461,7 @@ RSpec.describe MarkupHelper do
it 'displays the first line of a code block' do
object = create_object("```\nCode block\nwith two lines\n```")
- expected = %r{<pre.+><code><span class="line">Code block\.\.\.</span>\n</code></pre>}
+ expected = %r{<pre.+><code><span class="line">Code block\.\.\.</span></code></pre>}
expect(helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
end
@@ -477,7 +477,7 @@ RSpec.describe MarkupHelper do
it 'preserves code color scheme' do
object = create_object("```ruby\ndef test\n 'hello world'\nend\n```")
expected = "\n<pre class=\"code highlight js-syntax-highlight language-ruby\">" \
- "<code><span class=\"line\"><span class=\"k\">def</span> <span class=\"nf\">test</span>...</span>\n" \
+ "<code><span class=\"line\"><span class=\"k\">def</span> <span class=\"nf\">test</span>...</span>" \
"</code></pre>\n"
expect(helper.first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)).to eq(expected)
diff --git a/spec/lib/banzai/filter/truncate_visible_filter_spec.rb b/spec/lib/banzai/filter/truncate_visible_filter_spec.rb
index 0d352850682..d55d54f766d 100644
--- a/spec/lib/banzai/filter/truncate_visible_filter_spec.rb
+++ b/spec/lib/banzai/filter/truncate_visible_filter_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe Banzai::Filter::TruncateVisibleFilter, feature_category: :team_pl
describe 'truncates the first line of a code block' do
let(:markdown) { "```\nCode block\nwith two lines\n```" }
- let(:expected) { "Code block...</span>\n</code>" }
+ let(:expected) { "Code block...</span></code>" }
it_behaves_like 'truncates text'
end