Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-18 03:08:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-18 03:08:53 +0300
commit9214cac69b0f0306a86056720cfc62b738449c19 (patch)
tree79c6fdbc2c8b379dd908294faa54c3fa2ab97551 /spec/frontend/groups
parent13d851c795a48b670b859a7ec5bd6e2886d2789e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/groups')
-rw-r--r--spec/frontend/groups/components/empty_states/groups_dashboard_empty_state_spec.js29
-rw-r--r--spec/frontend/groups/components/empty_states/groups_explore_empty_state_spec.js27
2 files changed, 56 insertions, 0 deletions
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,
+ });
+ });
+});