Commit eeceb35f authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'ntepluhina-fix-eslint-error' into 'master'

Fixed double imports in tests

See merge request gitlab-org/gitlab!79106
parents 2aa3ad32 52a3a8df
...@@ -7,9 +7,8 @@ import { ...@@ -7,9 +7,8 @@ import {
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import SidebarDropdownWidget from 'ee/sidebar/components/sidebar_dropdown_widget.vue'; import SidebarDropdownWidget from 'ee/sidebar/components/sidebar_dropdown_widget.vue';
import { IssuableAttributeType, issuableAttributesQueries } from 'ee/sidebar/constants'; import { IssuableAttributeType, issuableAttributesQueries } from 'ee/sidebar/constants';
import groupEpicsQuery from 'ee/sidebar/queries/group_epics.query.graphql'; import groupEpicsQuery from 'ee/sidebar/queries/group_epics.query.graphql';
...@@ -58,7 +57,7 @@ describe('SidebarDropdownWidget', () => { ...@@ -58,7 +57,7 @@ describe('SidebarDropdownWidget', () => {
// It then emits `shown` event in a watcher for `visible` // It then emits `shown` event in a watcher for `visible`
// Hence we need both of these: // Hence we need both of these:
await waitForPromises(); await waitForPromises();
await wrapper.vm.$nextTick(); await nextTick();
}; };
const waitForApollo = async () => { const waitForApollo = async () => {
...@@ -168,7 +167,7 @@ describe('SidebarDropdownWidget', () => { ...@@ -168,7 +167,7 @@ describe('SidebarDropdownWidget', () => {
findSearchBox().vm.$emit('input', 'non existing epics'); findSearchBox().vm.$emit('input', 'non existing epics');
await wrapper.vm.$nextTick(); await nextTick();
expect(findDropdownText().text()).toBe('No open iteration found'); expect(findDropdownText().text()).toBe('No open iteration found');
}); });
...@@ -268,7 +267,7 @@ describe('SidebarDropdownWidget', () => { ...@@ -268,7 +267,7 @@ describe('SidebarDropdownWidget', () => {
it('sends a groupEpics query with the entered search term "foo" and in TITLE param', async () => { it('sends a groupEpics query with the entered search term "foo" and in TITLE param', async () => {
findSearchBox().vm.$emit('input', mockSearchTerm); findSearchBox().vm.$emit('input', mockSearchTerm);
await wrapper.vm.$nextTick(); await nextTick();
// Account for debouncing // Account for debouncing
jest.runAllTimers(); jest.runAllTimers();
...@@ -292,7 +291,7 @@ describe('SidebarDropdownWidget', () => { ...@@ -292,7 +291,7 @@ describe('SidebarDropdownWidget', () => {
}); });
it('sends a groupEpics query with empty title and undefined in param', async () => { it('sends a groupEpics query with empty title and undefined in param', async () => {
await wrapper.vm.$nextTick(); await nextTick();
// Account for debouncing // Account for debouncing
jest.runAllTimers(); jest.runAllTimers();
...@@ -306,7 +305,7 @@ describe('SidebarDropdownWidget', () => { ...@@ -306,7 +305,7 @@ describe('SidebarDropdownWidget', () => {
it('sends a groupEpics query for an IID with the entered search term "&1"', async () => { it('sends a groupEpics query for an IID with the entered search term "&1"', async () => {
findSearchBox().vm.$emit('input', '&1'); findSearchBox().vm.$emit('input', '&1');
await wrapper.vm.$nextTick(); await nextTick();
// Account for debouncing // Account for debouncing
jest.runAllTimers(); jest.runAllTimers();
......
import { GlFormGroup, GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui'; import { GlFormGroup, GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import IssueTypeField, { i18n } from '~/issues/show/components/fields/type.vue'; import IssueTypeField, { i18n } from '~/issues/show/components/fields/type.vue';
......
import { GlDropdown, GlDropdownItem, GlLoadingIcon, GlSearchBoxByType } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlLoadingIcon, GlSearchBoxByType } from '@gitlab/ui';
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import ProjectDropdown from '~/jira_connect/branches/components/project_dropdown.vue'; import ProjectDropdown from '~/jira_connect/branches/components/project_dropdown.vue';
......
import { GlSkeletonLoader, GlAlert, GlEmptyState, GlPagination } from '@gitlab/ui'; import { GlSkeletonLoader, GlAlert, GlEmptyState, GlPagination } from '@gitlab/ui';
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import getJobsQuery from '~/jobs/components/table/graphql/queries/get_jobs.query.graphql'; import getJobsQuery from '~/jobs/components/table/graphql/queries/get_jobs.query.graphql';
......
import { GlSprintf, GlLink } from '@gitlab/ui'; import { GlSprintf, GlLink } from '@gitlab/ui';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
......
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql'; import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql';
......
...@@ -9,10 +9,8 @@ import { ...@@ -9,10 +9,8 @@ import {
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
......
import { GlDropdown, GlModal, GlSprintf } from '@gitlab/ui'; import { GlDropdown, GlModal, GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { nextTick } from 'vue';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import InitCommandModal from '~/terraform/components/init_command_modal.vue'; import InitCommandModal from '~/terraform/components/init_command_modal.vue';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment