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/components/details_page/partial_cleanup_alert_spec.js')
-rw-r--r--spec/frontend/registry/explorer/components/details_page/partial_cleanup_alert_spec.js71
1 files changed, 0 insertions, 71 deletions
diff --git a/spec/frontend/registry/explorer/components/details_page/partial_cleanup_alert_spec.js b/spec/frontend/registry/explorer/components/details_page/partial_cleanup_alert_spec.js
deleted file mode 100644
index af8a23e412c..00000000000
--- a/spec/frontend/registry/explorer/components/details_page/partial_cleanup_alert_spec.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import { GlAlert, GlSprintf } from '@gitlab/ui';
-import { shallowMount } from '@vue/test-utils';
-import component from '~/registry/explorer/components/details_page/partial_cleanup_alert.vue';
-import { DELETE_ALERT_TITLE, DELETE_ALERT_LINK_TEXT } from '~/registry/explorer/constants';
-
-describe('Partial Cleanup alert', () => {
- let wrapper;
-
- const findAlert = () => wrapper.find(GlAlert);
- const findRunLink = () => wrapper.find('[data-testid="run-link"');
- const findHelpLink = () => wrapper.find('[data-testid="help-link"');
-
- const mountComponent = () => {
- wrapper = shallowMount(component, {
- stubs: { GlSprintf },
- propsData: {
- runCleanupPoliciesHelpPagePath: 'foo',
- cleanupPoliciesHelpPagePath: 'bar',
- },
- });
- };
-
- afterEach(() => {
- wrapper.destroy();
- wrapper = null;
- });
-
- it(`gl-alert has the correct properties`, () => {
- mountComponent();
-
- expect(findAlert().props()).toMatchObject({
- title: DELETE_ALERT_TITLE,
- variant: 'warning',
- });
- });
-
- it('has the right text', () => {
- mountComponent();
-
- expect(wrapper.text()).toMatchInterpolatedText(DELETE_ALERT_LINK_TEXT);
- });
-
- it('contains run link', () => {
- mountComponent();
-
- const link = findRunLink();
- expect(link.exists()).toBe(true);
- expect(link.attributes()).toMatchObject({
- href: 'foo',
- target: '_blank',
- });
- });
-
- it('contains help link', () => {
- mountComponent();
-
- const link = findHelpLink();
- expect(link.exists()).toBe(true);
- expect(link.attributes()).toMatchObject({
- href: 'bar',
- target: '_blank',
- });
- });
-
- it('GlAlert dismiss event triggers a dismiss event', () => {
- mountComponent();
-
- findAlert().vm.$emit('dismiss');
- expect(wrapper.emitted('dismiss')).toEqual([[]]);
- });
-});