diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-29 15:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-29 15:08:48 +0300 |
commit | e5f2a04e9d54615fded2ca05d0d5eef464795a8f (patch) | |
tree | 5412fccdb0a63b449fba4d7998eaa05ca70091ba /spec/frontend/pipelines/empty_state_spec.js | |
parent | ad2789aeba21edaadcbdc06523462e6fd87d4ba1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines/empty_state_spec.js')
-rw-r--r-- | spec/frontend/pipelines/empty_state_spec.js | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/spec/frontend/pipelines/empty_state_spec.js b/spec/frontend/pipelines/empty_state_spec.js index 912bc7a104a..1af3065477d 100644 --- a/spec/frontend/pipelines/empty_state_spec.js +++ b/spec/frontend/pipelines/empty_state_spec.js @@ -1,14 +1,21 @@ +import '~/commons'; import { mount } from '@vue/test-utils'; import EmptyState from '~/pipelines/components/pipelines_list/empty_state.vue'; +import PipelinesCiTemplates from '~/pipelines/components/pipelines_list/pipelines_ci_templates.vue'; describe('Pipelines Empty State', () => { let wrapper; const findIllustration = () => wrapper.find('img'); const findButton = () => wrapper.find('a'); + const pipelinesCiTemplates = () => wrapper.findComponent(PipelinesCiTemplates); const createWrapper = (props = {}) => { wrapper = mount(EmptyState, { + provide: { + pipelineEditorPath: '', + suggestedCiTemplates: [], + }, propsData: { emptyStateSvgPath: 'foo.svg', canSetCi: true, @@ -27,27 +34,8 @@ describe('Pipelines Empty State', () => { wrapper = null; }); - it('should render empty state SVG', () => { - expect(findIllustration().attributes('src')).toBe('foo.svg'); - }); - - it('should render empty state header', () => { - expect(wrapper.text()).toContain('Build with confidence'); - }); - - it('should render empty state information', () => { - expect(wrapper.text()).toContain( - 'GitLab CI/CD can automatically build, test, and deploy your code. Let GitLab take care of time', - 'consuming tasks, so you can spend more time creating', - ); - }); - - it('should render button with help path', () => { - expect(findButton().attributes('href')).toBe('/help/ci/quick_start/index.md'); - }); - - it('should render button text', () => { - expect(findButton().text()).toBe('Get started with CI/CD'); + it('should render the CI/CD templates', () => { + expect(pipelinesCiTemplates()).toExist(); }); }); |