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:
Diffstat (limited to 'spec/frontend/registry/explorer/stubs.js')
-rw-r--r--spec/frontend/registry/explorer/stubs.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/spec/frontend/registry/explorer/stubs.js b/spec/frontend/registry/explorer/stubs.js
index b6c0ee67757..d6fba863ee0 100644
--- a/spec/frontend/registry/explorer/stubs.js
+++ b/spec/frontend/registry/explorer/stubs.js
@@ -1,35 +1,33 @@
+import {
+ GlModal as RealGlModal,
+ GlEmptyState as RealGlEmptyState,
+ GlSkeletonLoader as RealGlSkeletonLoader,
+} from '@gitlab/ui';
+import { RouterLinkStub } from '@vue/test-utils';
+import { stubComponent } from 'helpers/stub_component';
import RealDeleteModal from '~/registry/explorer/components/details_page/delete_modal.vue';
import RealListItem from '~/vue_shared/components/registry/list_item.vue';
-export const GlModal = {
+export const GlModal = stubComponent(RealGlModal, {
template: '<div><slot name="modal-title"></slot><slot></slot><slot name="modal-ok"></slot></div>',
methods: {
show: jest.fn(),
},
-};
+});
-export const GlEmptyState = {
+export const GlEmptyState = stubComponent(RealGlEmptyState, {
template: '<div><slot name="description"></slot></div>',
- name: 'GlEmptyStateSTub',
-};
+});
-export const RouterLink = {
- template: `<div><slot></slot></div>`,
- props: ['to'],
-};
+export const RouterLink = RouterLinkStub;
-export const DeleteModal = {
- template: '<div></div>',
+export const DeleteModal = stubComponent(RealDeleteModal, {
methods: {
show: jest.fn(),
},
- props: RealDeleteModal.props,
-};
+});
-export const GlSkeletonLoader = {
- template: `<div><slot></slot></div>`,
- props: ['width', 'height'],
-};
+export const GlSkeletonLoader = stubComponent(RealGlSkeletonLoader);
export const ListItem = {
...RealListItem,