diff options
Diffstat (limited to 'spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js')
-rw-r--r-- | spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js new file mode 100644 index 00000000000..21748ae2813 --- /dev/null +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js @@ -0,0 +1,45 @@ +import { GlSprintf } from '@gitlab/ui'; +import { shallowMount, createLocalVue } from '@vue/test-utils'; +import Vuex from 'vuex'; +import projectEmptyState from '~/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state.vue'; +import { dockerCommands } from '../../mock_data'; +import { GlEmptyState } from '../../stubs'; + +const localVue = createLocalVue(); +localVue.use(Vuex); + +describe('Registry Project Empty state', () => { + let wrapper; + const config = { + repositoryUrl: 'foo', + registryHostUrlWithPort: 'bar', + helpPagePath: 'baz', + twoFactorAuthHelpLink: 'barBaz', + personalAccessTokensHelpLink: 'fooBaz', + noContainersImage: 'bazFoo', + }; + + beforeEach(() => { + wrapper = shallowMount(projectEmptyState, { + localVue, + stubs: { + GlEmptyState, + GlSprintf, + }, + provide() { + return { + config, + ...dockerCommands, + }; + }, + }); + }); + + afterEach(() => { + wrapper.destroy(); + }); + + it('to match the default snapshot', () => { + expect(wrapper.element).toMatchSnapshot(); + }); +}); |