From 9214cac69b0f0306a86056720cfc62b738449c19 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Aug 2023 00:08:53 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../groups_dashboard_empty_state_spec.js | 29 ++++++++++++++++++++++ .../groups_explore_empty_state_spec.js | 27 ++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 spec/frontend/groups/components/empty_states/groups_dashboard_empty_state_spec.js create mode 100644 spec/frontend/groups/components/empty_states/groups_explore_empty_state_spec.js (limited to 'spec/frontend/groups') diff --git a/spec/frontend/groups/components/empty_states/groups_dashboard_empty_state_spec.js b/spec/frontend/groups/components/empty_states/groups_dashboard_empty_state_spec.js new file mode 100644 index 00000000000..d2afbad802c --- /dev/null +++ b/spec/frontend/groups/components/empty_states/groups_dashboard_empty_state_spec.js @@ -0,0 +1,29 @@ +import { GlEmptyState } from '@gitlab/ui'; + +import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import GroupsDashboardEmptyState from '~/groups/components/empty_states/groups_dashboard_empty_state.vue'; + +let wrapper; + +const defaultProvide = { + groupsEmptyStateIllustration: '/assets/illustrations/empty-state/empty-groups-md.svg', +}; + +const createComponent = () => { + wrapper = shallowMountExtended(GroupsDashboardEmptyState, { + provide: defaultProvide, + }); +}; + +describe('GroupsDashboardEmptyState', () => { + it('renders empty state', () => { + createComponent(); + + expect(wrapper.findComponent(GlEmptyState).props()).toMatchObject({ + title: 'A group is a collection of several projects', + description: + "If you organize your projects under a group, it works like a folder. You can manage your group member's permissions and access to each project in the group.", + svgPath: defaultProvide.groupsEmptyStateIllustration, + }); + }); +}); diff --git a/spec/frontend/groups/components/empty_states/groups_explore_empty_state_spec.js b/spec/frontend/groups/components/empty_states/groups_explore_empty_state_spec.js new file mode 100644 index 00000000000..f4c425902f5 --- /dev/null +++ b/spec/frontend/groups/components/empty_states/groups_explore_empty_state_spec.js @@ -0,0 +1,27 @@ +import { GlEmptyState } from '@gitlab/ui'; + +import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import GroupsExploreEmptyState from '~/groups/components/empty_states/groups_explore_empty_state.vue'; + +let wrapper; + +const defaultProvide = { + groupsEmptyStateIllustration: '/assets/illustrations/empty-state/empty-groups-md.svg', +}; + +const createComponent = () => { + wrapper = shallowMountExtended(GroupsExploreEmptyState, { + provide: defaultProvide, + }); +}; + +describe('GroupsExploreEmptyState', () => { + it('renders empty state', () => { + createComponent(); + + expect(wrapper.findComponent(GlEmptyState).props()).toMatchObject({ + title: 'No public groups', + svgPath: defaultProvide.groupsEmptyStateIllustration, + }); + }); +}); -- cgit v1.2.3