2020-12-16 18:10:10 +00:00
|
|
|
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';
|
2020-06-10 12:08:58 +00:00
|
|
|
import RealDeleteModal from '~/registry/explorer/components/details_page/delete_modal.vue';
|
2020-09-02 12:10:35 +00:00
|
|
|
import RealListItem from '~/vue_shared/components/registry/list_item.vue';
|
2020-06-10 12:08:58 +00:00
|
|
|
|
2020-12-16 18:10:10 +00:00
|
|
|
export const GlModal = stubComponent(RealGlModal, {
|
2020-02-13 12:08:49 +00:00
|
|
|
template: '<div><slot name="modal-title"></slot><slot></slot><slot name="modal-ok"></slot></div>',
|
|
|
|
methods: {
|
|
|
|
show: jest.fn(),
|
|
|
|
},
|
2020-12-16 18:10:10 +00:00
|
|
|
});
|
2020-02-13 12:08:49 +00:00
|
|
|
|
2020-12-16 18:10:10 +00:00
|
|
|
export const GlEmptyState = stubComponent(RealGlEmptyState, {
|
2020-02-13 12:08:49 +00:00
|
|
|
template: '<div><slot name="description"></slot></div>',
|
2020-12-16 18:10:10 +00:00
|
|
|
});
|
2020-05-06 12:09:36 +00:00
|
|
|
|
2020-12-16 18:10:10 +00:00
|
|
|
export const RouterLink = RouterLinkStub;
|
2020-06-10 12:08:58 +00:00
|
|
|
|
2020-12-16 18:10:10 +00:00
|
|
|
export const DeleteModal = stubComponent(RealDeleteModal, {
|
2020-06-10 12:08:58 +00:00
|
|
|
methods: {
|
|
|
|
show: jest.fn(),
|
|
|
|
},
|
2020-12-16 18:10:10 +00:00
|
|
|
});
|
2020-06-10 12:08:58 +00:00
|
|
|
|
2020-12-16 18:10:10 +00:00
|
|
|
export const GlSkeletonLoader = stubComponent(RealGlSkeletonLoader);
|
2020-07-07 18:09:24 +00:00
|
|
|
|
|
|
|
export const ListItem = {
|
|
|
|
...RealListItem,
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
detailsSlots: [],
|
|
|
|
isDetailsShown: true,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
};
|