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-04-28 03:12:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-28 03:12:20 +0300
commite74c47fb1bd1c137145e19143b0f77cf420990f4 (patch)
tree1ea75375e2d46a0fcc107c336759454c24a332e4 /spec/frontend/vue_shared
parente49c47d3bc5603e8e9d6ad40fc7fccae9f885843 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared')
-rw-r--r--spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js24
-rw-r--r--spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_docker_instructions_spec.js.snap3
-rw-r--r--spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_kubernetes_instructions_spec.js.snap3
-rw-r--r--spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js6
-rw-r--r--spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js6
5 files changed, 33 insertions, 9 deletions
diff --git a/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js b/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js
index b184ec4ac54..463fd74f582 100644
--- a/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js
+++ b/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js
@@ -12,10 +12,11 @@ describe('Dismissible Feedback Alert', () => {
const featureName = 'Dependency List';
const STORAGE_DISMISSAL_KEY = 'dependency_list_feedback_dismissed';
- const createComponent = ({ mountFn = shallowMount } = {}) => {
+ const createComponent = ({ props, mountFn = shallowMount } = {}) => {
wrapper = mountFn(Component, {
propsData: {
featureName,
+ ...props,
},
stubs: {
GlSprintf,
@@ -40,6 +41,27 @@ describe('Dismissible Feedback Alert', () => {
});
});
+ describe('with other attributes', () => {
+ const mockTitle = 'My title';
+ const mockVariant = 'warning';
+
+ beforeEach(() => {
+ createComponent({
+ props: {
+ title: mockTitle,
+ variant: mockVariant,
+ },
+ });
+ });
+
+ it('passes props to alert', () => {
+ expect(findAlert().props()).toMatchObject({
+ title: mockTitle,
+ variant: mockVariant,
+ });
+ });
+ });
+
describe('dismissible', () => {
describe('after dismissal', () => {
beforeEach(() => {
diff --git a/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_docker_instructions_spec.js.snap b/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_docker_instructions_spec.js.snap
deleted file mode 100644
index d14f66df8a1..00000000000
--- a/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_docker_instructions_spec.js.snap
+++ /dev/null
@@ -1,3 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`RunnerDockerInstructions renders contents 1`] = `"To install Runner in a container follow the instructions described in the GitLab documentation View installation instructions Close"`;
diff --git a/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_kubernetes_instructions_spec.js.snap b/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_kubernetes_instructions_spec.js.snap
deleted file mode 100644
index 1172bf07dff..00000000000
--- a/spec/frontend/vue_shared/components/runner_instructions/instructions/__snapshots__/runner_kubernetes_instructions_spec.js.snap
+++ /dev/null
@@ -1,3 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`RunnerKubernetesInstructions renders contents 1`] = `"To install Runner in Kubernetes follow the instructions described in the GitLab documentation. View installation instructions Close"`;
diff --git a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js
index 2922d261b24..94823bb640b 100644
--- a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js
+++ b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js
@@ -17,7 +17,11 @@ describe('RunnerDockerInstructions', () => {
});
it('renders contents', () => {
- expect(wrapper.text().replace(/\s+/g, ' ')).toMatchSnapshot();
+ expect(wrapper.text()).toContain(
+ 'To install Runner in a container follow the instructions described in the GitLab documentation',
+ );
+ expect(wrapper.text()).toContain('View installation instructions');
+ expect(wrapper.text()).toContain('Close');
});
it('renders link', () => {
diff --git a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js
index 0bfcc0e3d86..9d6658e002c 100644
--- a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js
+++ b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js
@@ -17,7 +17,11 @@ describe('RunnerKubernetesInstructions', () => {
});
it('renders contents', () => {
- expect(wrapper.text().replace(/\s+/g, ' ')).toMatchSnapshot();
+ expect(wrapper.text()).toContain(
+ 'To install Runner in Kubernetes follow the instructions described in the GitLab documentation.',
+ );
+ expect(wrapper.text()).toContain('View installation instructions');
+ expect(wrapper.text()).toContain('Close');
});
it('renders link', () => {