diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/frontend/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
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.js | 12 |
1 files changed, 5 insertions, 7 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 index 8a4f07c4d88..e435c0dcc08 100644 --- 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 @@ -1,13 +1,11 @@ import { getByRole } from '@testing-library/dom'; import { mount } from '@vue/test-utils'; import FirstPipelineCard from '~/pipeline_editor/components/drawer/cards/first_pipeline_card.vue'; -import PipelineVisualReference from '~/pipeline_editor/components/drawer/ui/pipeline_visual_reference.vue'; describe('First pipeline card', () => { let wrapper; const defaultProvide = { - ciExamplesHelpPagePath: '/pipelines/examples', runnerHelpPagePath: '/help/runners', }; @@ -20,9 +18,9 @@ describe('First pipeline card', () => { }; const getLinkByName = (name) => getByRole(wrapper.element, 'link', { name }).href; - const findPipelinesLink = () => getLinkByName(/examples and templates/i); const findRunnersLink = () => getLinkByName(/make sure your instance has runners available/i); - const findVisualReference = () => wrapper.findComponent(PipelineVisualReference); + const findInstructionsList = () => wrapper.find('ol'); + const findAllInstructions = () => findInstructionsList().findAll('li'); beforeEach(() => { createComponent(); @@ -37,11 +35,11 @@ describe('First pipeline card', () => { }); it('renders the content', () => { - expect(findVisualReference().exists()).toBe(true); + expect(findInstructionsList().exists()).toBe(true); + expect(findAllInstructions()).toHaveLength(3); }); - it('renders the links', () => { + it('renders the link', () => { expect(findRunnersLink()).toContain(defaultProvide.runnerHelpPagePath); - expect(findPipelinesLink()).toContain(defaultProvide.ciExamplesHelpPagePath); }); }); |