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:
Diffstat (limited to 'spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js')
-rw-r--r--spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js b/spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js
deleted file mode 100644
index 7e1e5004d91..00000000000
--- a/spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { getByRole } from '@testing-library/dom';
-import { mount } from '@vue/test-utils';
-import { mockTracking, unmockTracking } from 'helpers/tracking_helper';
-import FirstPipelineCard from '~/pipeline_editor/components/drawer/cards/first_pipeline_card.vue';
-import { pipelineEditorTrackingOptions } from '~/pipeline_editor/constants';
-
-describe('First pipeline card', () => {
- let wrapper;
- let trackingSpy;
-
- const createComponent = () => {
- wrapper = mount(FirstPipelineCard);
- };
-
- const getLinkByName = (name) => getByRole(wrapper.element, 'link', { name });
- const findRunnersLink = () => getLinkByName(/make sure your instance has runners available/i);
- const findInstructionsList = () => wrapper.find('ol');
- const findAllInstructions = () => findInstructionsList().findAll('li');
-
- beforeEach(() => {
- createComponent();
- });
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- it('renders the title', () => {
- expect(wrapper.text()).toContain(wrapper.vm.$options.i18n.title);
- });
-
- it('renders the content', () => {
- expect(findInstructionsList().exists()).toBe(true);
- expect(findAllInstructions()).toHaveLength(3);
- });
-
- it('renders the link', () => {
- expect(findRunnersLink().href).toBe(wrapper.vm.$options.RUNNER_HELP_URL);
- });
-
- describe('tracking', () => {
- beforeEach(() => {
- createComponent();
- trackingSpy = mockTracking(undefined, wrapper.element, jest.spyOn);
- });
-
- afterEach(() => {
- unmockTracking();
- });
-
- it('tracks runners help page click', async () => {
- const { label } = pipelineEditorTrackingOptions;
- const { runners } = pipelineEditorTrackingOptions.actions.helpDrawerLinks;
-
- await findRunnersLink().click();
-
- expect(trackingSpy).toHaveBeenCalledWith(undefined, runners, { label });
- });
- });
-});