diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-16 18:10:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-16 18:10:10 +0000 |
commit | d755061465c24de58568183df5e7b826e934ae5d (patch) | |
tree | b378078e37c3ae384ea7e3b7ca91398754fd7fac /spec/frontend/monitoring | |
parent | 6364c14cc1f445d471bca118dca5af5a85b2c5dc (diff) | |
download | gitlab-ce-d755061465c24de58568183df5e7b826e934ae5d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/monitoring')
-rw-r--r-- | spec/frontend/monitoring/components/group_empty_state_spec.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/frontend/monitoring/components/group_empty_state_spec.js b/spec/frontend/monitoring/components/group_empty_state_spec.js index 3b94c4c6806..4a550efe23c 100644 --- a/spec/frontend/monitoring/components/group_empty_state_spec.js +++ b/spec/frontend/monitoring/components/group_empty_state_spec.js @@ -1,13 +1,9 @@ import { GlEmptyState } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; +import { stubComponent } from 'helpers/stub_component'; import GroupEmptyState from '~/monitoring/components/group_empty_state.vue'; import { metricStates } from '~/monitoring/constants'; -const MockGlEmptyState = { - props: GlEmptyState.props, - template: '<div><slot name="description"></slot></div>', -}; - function createComponent(props) { return shallowMount(GroupEmptyState, { propsData: { @@ -17,7 +13,9 @@ function createComponent(props) { svgPath: '/path/to/empty-group-illustration.svg', }, stubs: { - GlEmptyState: MockGlEmptyState, + GlEmptyState: stubComponent(GlEmptyState, { + template: '<div><slot name="description"></slot></div>', + }), }, }); } @@ -47,7 +45,7 @@ describe('GroupEmptyState', () => { }); it('passes the expected props to GlEmptyState', () => { - expect(wrapper.find(MockGlEmptyState).props()).toMatchSnapshot(); + expect(wrapper.find(GlEmptyState).props()).toMatchSnapshot(); }); }); }); |