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/vue_mr_widget/components/mr_widget_status_icon_spec.js')
-rw-r--r--spec/frontend/vue_mr_widget/components/mr_widget_status_icon_spec.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/spec/frontend/vue_mr_widget/components/mr_widget_status_icon_spec.js b/spec/frontend/vue_mr_widget/components/mr_widget_status_icon_spec.js
deleted file mode 100644
index c25e10c5249..00000000000
--- a/spec/frontend/vue_mr_widget/components/mr_widget_status_icon_spec.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { GlLoadingIcon } from '@gitlab/ui';
-import { shallowMount, mount } from '@vue/test-utils';
-import mrStatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue';
-
-describe('MR widget status icon component', () => {
- let wrapper;
-
- const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
- const findDisabledMergeButton = () => wrapper.find('[data-testid="disabled-merge-button"]');
-
- const createWrapper = (props, mountFn = shallowMount) => {
- wrapper = mountFn(mrStatusIcon, {
- propsData: {
- ...props,
- },
- });
- };
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- describe('while loading', () => {
- it('renders loading icon', () => {
- createWrapper({ status: 'loading' });
-
- expect(findLoadingIcon().exists()).toBe(true);
- });
- });
-
- describe('with status icon', () => {
- it('renders success status icon', () => {
- createWrapper({ status: 'success' }, mount);
-
- expect(wrapper.find('[data-testid="status_success-icon"]').exists()).toBe(true);
- });
-
- it('renders failed status icon', () => {
- createWrapper({ status: 'failed' }, mount);
-
- expect(wrapper.find('[data-testid="status_failed-icon"]').exists()).toBe(true);
- });
- });
-
- describe('with disabled button', () => {
- it('renders a disabled button', () => {
- createWrapper({ status: 'failed', showDisabledButton: true });
-
- expect(findDisabledMergeButton().exists()).toBe(true);
- });
- });
-
- describe('without disabled button', () => {
- it('does not render a disabled button', () => {
- createWrapper({ status: 'failed' });
-
- expect(findDisabledMergeButton().exists()).toBe(false);
- });
- });
-});