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-04-12 21:17:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-12 21:17:07 +0300
commit6ce6d20cf0b81275bad7bf8e95cf49bd475c5c4f (patch)
treeba258f58856f457f94daf4b3dbf85045f4e07acc /spec/frontend/import
parentc1a7bcdf1bfef9455bc58b1737f52530bf681a90 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/import')
-rw-r--r--spec/frontend/import/details/components/import_details_table_spec.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/frontend/import/details/components/import_details_table_spec.js b/spec/frontend/import/details/components/import_details_table_spec.js
new file mode 100644
index 00000000000..43c9a66c00a
--- /dev/null
+++ b/spec/frontend/import/details/components/import_details_table_spec.js
@@ -0,0 +1,33 @@
+import { mount, shallowMount } from '@vue/test-utils';
+import { GlEmptyState, GlTable } from '@gitlab/ui';
+
+import PaginationBar from '~/vue_shared/components/pagination_bar/pagination_bar.vue';
+import ImportDetailsTable from '~/import/details/components/import_details_table.vue';
+
+describe('Import details table', () => {
+ let wrapper;
+
+ const createComponent = ({ mountFn = shallowMount } = {}) => {
+ wrapper = mountFn(ImportDetailsTable);
+ };
+
+ const findGlTable = () => wrapper.findComponent(GlTable);
+ const findGlEmptyState = () => findGlTable().findComponent(GlEmptyState);
+ const findPaginationBar = () => wrapper.findComponent(PaginationBar);
+
+ describe('template', () => {
+ describe('when no items are available', () => {
+ it('renders table with empty state', () => {
+ createComponent({ mountFn: mount });
+
+ expect(findGlEmptyState().exists()).toBe(true);
+ });
+
+ it('does not render pagination', () => {
+ createComponent();
+
+ expect(findPaginationBar().exists()).toBe(false);
+ });
+ });
+ });
+});