diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/frontend/pipelines/graph_shared/links_inner_spec.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/frontend/pipelines/graph_shared/links_inner_spec.js')
-rw-r--r-- | spec/frontend/pipelines/graph_shared/links_inner_spec.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/frontend/pipelines/graph_shared/links_inner_spec.js b/spec/frontend/pipelines/graph_shared/links_inner_spec.js index be422fac92c..2c6d126e12c 100644 --- a/spec/frontend/pipelines/graph_shared/links_inner_spec.js +++ b/spec/frontend/pipelines/graph_shared/links_inner_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { setHTMLFixture } from 'helpers/fixtures'; +import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import LinksInner from '~/pipelines/components/graph_shared/links_inner.vue'; import { parseData } from '~/pipelines/components/parsing_utils'; import { createJobsHash } from '~/pipelines/utils'; @@ -42,7 +42,7 @@ describe('Links Inner component', () => { // We create fixture so that each job has an empty div that represent // the JobPill in the DOM. Each `JobPill` would have different coordinates, // so we increment their coordinates on each iteration to simulate different positions. - const setFixtures = ({ stages }) => { + const setHTMLFixtureLocal = ({ stages }) => { const jobs = createJobsHash(stages); const arrayOfJobs = Object.keys(jobs); @@ -82,6 +82,7 @@ describe('Links Inner component', () => { afterEach(() => { jest.restoreAllMocks(); wrapper.destroy(); + resetHTMLFixture(); }); describe('basic SVG creation', () => { @@ -124,7 +125,7 @@ describe('Links Inner component', () => { describe('with one need', () => { beforeEach(() => { - setFixtures(pipelineData); + setHTMLFixtureLocal(pipelineData); createComponent({ pipelineData: pipelineData.stages }); }); @@ -143,7 +144,7 @@ describe('Links Inner component', () => { describe('with a parallel need', () => { beforeEach(() => { - setFixtures(parallelNeedData); + setHTMLFixtureLocal(parallelNeedData); createComponent({ pipelineData: parallelNeedData.stages }); }); @@ -162,7 +163,7 @@ describe('Links Inner component', () => { describe('with same stage needs', () => { beforeEach(() => { - setFixtures(sameStageNeeds); + setHTMLFixtureLocal(sameStageNeeds); createComponent({ pipelineData: sameStageNeeds.stages }); }); @@ -181,7 +182,7 @@ describe('Links Inner component', () => { describe('with a large number of needs', () => { beforeEach(() => { - setFixtures(largePipelineData); + setHTMLFixtureLocal(largePipelineData); createComponent({ pipelineData: largePipelineData.stages }); }); @@ -200,7 +201,7 @@ describe('Links Inner component', () => { describe('interactions', () => { beforeEach(() => { - setFixtures(largePipelineData); + setHTMLFixtureLocal(largePipelineData); createComponent({ pipelineData: largePipelineData.stages }); }); |