diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js')
-rw-r--r-- | spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js b/spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js new file mode 100644 index 00000000000..09afd9d2d84 --- /dev/null +++ b/spec/frontend/registry/explorer/components/details_page/empty_tags_state_spec.js @@ -0,0 +1,43 @@ +import { shallowMount } from '@vue/test-utils'; +import { GlEmptyState } from '@gitlab/ui'; +import component from '~/registry/explorer/components/details_page/empty_tags_state.vue'; +import { + EMPTY_IMAGE_REPOSITORY_TITLE, + EMPTY_IMAGE_REPOSITORY_MESSAGE, +} from '~/registry/explorer/constants'; + +describe('EmptyTagsState component', () => { + let wrapper; + + const findEmptyState = () => wrapper.find(GlEmptyState); + + const mountComponent = () => { + wrapper = shallowMount(component, { + stubs: { + GlEmptyState, + }, + propsData: { + noContainersImage: 'foo', + }, + }); + }; + + afterEach(() => { + wrapper.destroy(); + wrapper = null; + }); + + it('contains gl-empty-state', () => { + mountComponent(); + expect(findEmptyState().exists()).toBe(true); + }); + + it('has the correct props', () => { + mountComponent(); + expect(findEmptyState().props()).toMatchObject({ + title: EMPTY_IMAGE_REPOSITORY_TITLE, + description: EMPTY_IMAGE_REPOSITORY_MESSAGE, + svgPath: 'foo', + }); + }); +}); |