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