Commit 74f8191d authored by Vitaly Slobodin's avatar Vitaly Slobodin

Sort JS imports in the EE specs

Sort JavaScript imports in the EE specs
to match our future ESLint configuration.
parent 23674e05
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlAlert, GlButton, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
import { getByText } from '@testing-library/dom';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import getGroupsQuery from 'ee/admin/dev_ops_report/graphql/queries/get_groups.query.graphql';
......
......@@ -4,13 +4,13 @@ import CustomStageFields from 'ee/analytics/cycle_analytics/components/create_va
import StageFieldActions from 'ee/analytics/cycle_analytics/components/create_value_stream_form/stage_field_actions.vue';
import LabelsSelector from 'ee/analytics/cycle_analytics/components/labels_selector.vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import { emptyState, emptyErrorsState, firstLabel } from './mock_data';
import {
customStageEvents as stageEvents,
labelStartEvent,
labelStopEvent,
customStageStopEvents as endEvents,
} from '../../mock_data';
import { emptyState, emptyErrorsState, firstLabel } from './mock_data';
const formatStartEventOpts = (_events) => [
{ text: 'Select start event', value: null },
......
......@@ -8,6 +8,12 @@ import CustomStageFields from 'ee/analytics/cycle_analytics/components/create_va
import { STAGE_ACTIONS } from 'ee/analytics/cycle_analytics/constants';
import customStagesStore from 'ee/analytics/cycle_analytics/store/modules/custom_stages';
import { convertObjectPropsToSnakeCase } from '~/lib/utils/common_utils';
import {
endpoints,
groupLabels,
customStageEvents as events,
customStageFormErrors,
} from '../mock_data';
import {
emptyState,
formInitialData,
......@@ -17,12 +23,6 @@ import {
ISSUE_CREATED,
ISSUE_CLOSED,
} from './create_value_stream_form/mock_data';
import {
endpoints,
groupLabels,
customStageEvents as events,
customStageFormErrors,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import SubscriptionTable from 'ee/billings/subscriptions/components/subscription_table.vue';
import SubscriptionTableRow from 'ee/billings/subscriptions/components/subscription_table_row.vue';
import initialStore from 'ee/billings/subscriptions/store';
import * as types from 'ee/billings/subscriptions/store/mutation_types';
import { mockDataSubscription } from 'ee_jest/billings/mock_data';
import Vuex from 'vuex';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
const namespaceName = 'GitLab.com';
......
......@@ -5,13 +5,13 @@ import BoardSidebarEpicSelect from 'ee/boards/components/sidebar/board_sidebar_e
import { stubComponent } from 'helpers/stub_component';
import BoardEditableItem from '~/boards/components/sidebar/board_editable_item.vue';
import getters from '~/boards/stores/getters';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import createFlash from '~/flash';
import {
mockIssue3 as mockIssueWithoutEpic,
mockIssueWithEpic,
mockAssignedEpic,
} from '../../mock_data';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import createFlash from '~/flash';
jest.mock('~/flash');
......
import { mount } from '@vue/test-utils';
import WeightSelect from 'ee/boards/components/weight_select.vue';
import { GlButton, GlDropdown, GlDropdownItem } from '@gitlab/ui';
import WeightSelect from 'ee/boards/components/weight_select.vue';
describe('WeightSelect', () => {
let wrapper;
......
import OpenTimeboxSummary from 'ee/burndown_chart/components/open_timebox_summary.vue';
import { shallowMount } from '@vue/test-utils';
import OpenTimeboxSummary from 'ee/burndown_chart/components/open_timebox_summary.vue';
describe('Iterations report summary', () => {
let wrapper;
......
import TimeboxSummaryCards from 'ee/burndown_chart/components/timebox_summary_cards.vue';
import { mount } from '@vue/test-utils';
import { GlCard } from '@gitlab/ui';
import TimeboxSummaryCards from 'ee/burndown_chart/components/timebox_summary_cards.vue';
describe('Iterations report summary cards', () => {
let wrapper;
......
......@@ -6,8 +6,8 @@ import { TEST_HOST } from 'helpers/test_constants';
import testAction from 'helpers/vuex_action_helper';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { unparsedIssues, parsedIssues } from '../mock_data';
import Api from '~/api';
import { unparsedIssues, parsedIssues } from '../mock_data';
jest.mock('~/api.js');
jest.mock('~/flash');
......
......@@ -9,9 +9,9 @@ import CreateForm from 'ee/groups/settings/compliance_frameworks/components/crea
import SharedForm from 'ee/groups/settings/compliance_frameworks/components/shared_form.vue';
import { visitUrl } from '~/lib/utils/url_utility';
import * as Sentry from '~/sentry/wrapper';
import { validCreateResponse, errorCreateResponse } from '../mock_data';
import * as Sentry from '~/sentry/wrapper';
const localVue = createLocalVue();
localVue.use(VueApollo);
......
......@@ -10,6 +10,7 @@ import EditForm from 'ee/groups/settings/compliance_frameworks/components/edit_f
import SharedForm from 'ee/groups/settings/compliance_frameworks/components/shared_form.vue';
import { visitUrl } from '~/lib/utils/url_utility';
import * as Sentry from '~/sentry/wrapper';
import {
validFetchOneResponse,
emptyFetchResponse,
......@@ -18,7 +19,6 @@ import {
errorUpdateResponse,
} from '../mock_data';
import * as Sentry from '~/sentry/wrapper';
const localVue = createLocalVue();
localVue.use(VueApollo);
......
......@@ -10,9 +10,9 @@ import List from 'ee/groups/settings/compliance_frameworks/components/list.vue';
import ListItem from 'ee/groups/settings/compliance_frameworks/components/list_item.vue';
import EmptyState from 'ee/groups/settings/compliance_frameworks/components/list_empty_state.vue';
import * as Sentry from '~/sentry/wrapper';
import { validFetchResponse, emptyFetchResponse } from '../mock_data';
import * as Sentry from '~/sentry/wrapper';
const localVue = createLocalVue();
localVue.use(VueApollo);
......
import { cloneDeep } from 'lodash';
import * as types from 'ee/issue_show/components/incidents/store/mutation_types';
import mutations from 'ee/issue_show/components/incidents/store/mutations';
import { cloneDeep } from 'lodash';
import { initialData } from '../mock_data';
const defaultState = {
......
......@@ -12,9 +12,9 @@ import dastOnDemandScanCreateMutation from 'ee/on_demand_scans/graphql/dast_on_d
import dastScannerProfilesQuery from 'ee/security_configuration/dast_profiles/graphql/dast_scanner_profiles.query.graphql';
import dastSiteProfilesQuery from 'ee/security_configuration/dast_profiles/graphql/dast_site_profiles.query.graphql';
import { stubComponent } from 'helpers/stub_component';
import { redirectTo, setUrlParams } from '~/lib/utils/url_utility';
import * as responses from '../mocks/apollo_mocks';
import { scannerProfiles, siteProfiles } from '../mocks/mock_data';
import { redirectTo, setUrlParams } from '~/lib/utils/url_utility';
const URL_HOST = 'https://localhost/';
const helpPagePath = '/application_security/dast/index#on-demand-scans';
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import { GlModal, GlAlert } from '@gitlab/ui';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import AddEditScheduleModal, {
i18n,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import { GlModal, GlAlert, GlSprintf } from '@gitlab/ui';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import getOncallSchedulesQuery from 'ee/oncall_schedules/graphql/queries/get_oncall_schedules.query.graphql';
import destroyOncallScheduleMutation from 'ee/oncall_schedules/graphql/mutations/destroy_oncall_schedule.mutation.graphql';
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlEmptyState, GlLoadingIcon, GlAlert } from '@gitlab/ui';
import VueApollo from 'vue-apollo';
import OnCallScheduleWrapper, {
i18n,
} from 'ee/oncall_schedules/components/oncall_schedules_wrapper.vue';
......@@ -7,7 +8,6 @@ import OnCallSchedule from 'ee/oncall_schedules/components/oncall_schedule.vue';
import AddScheduleModal from 'ee/oncall_schedules/components/add_edit_schedule_modal.vue';
import createMockApollo from 'helpers/mock_apollo_helper';
import getOncallSchedulesQuery from 'ee/oncall_schedules/graphql/queries/get_oncall_schedules.query.graphql';
import VueApollo from 'vue-apollo';
import { preExistingSchedule, newlyCreatedSchedule } from './mocks/apollo_mock';
const localVue = createLocalVue();
......
import { shallowMount } from '@vue/test-utils';
import waitForPromises from 'helpers/wait_for_promises';
import { GlDropdownItem, GlTokenSelector, GlFormGroup, GlToggle } from '@gitlab/ui';
import waitForPromises from 'helpers/wait_for_promises';
import AddEditRotationForm from 'ee/oncall_schedules/components/rotations/components/add_edit_rotation_form.vue';
import { LENGTH_ENUM } from 'ee/oncall_schedules/constants';
import { participants, getOncallSchedulesQueryResponse } from '../../mocks/apollo_mock';
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import VueApollo from 'vue-apollo';
import waitForPromises from 'helpers/wait_for_promises';
import { GlModal, GlAlert } from '@gitlab/ui';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import { addRotationModalId } from 'ee/oncall_schedules/constants';
import AddEditRotationModal, {
i18n,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import { GlModal, GlAlert, GlSprintf } from '@gitlab/ui';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import getOncallSchedulesQuery from 'ee/oncall_schedules/graphql/queries/get_oncall_schedules.query.graphql';
import destroyOncallRotationMutation from 'ee/oncall_schedules/graphql/mutations/destroy_oncall_rotation.mutation.graphql';
......
import { shallowMount } from '@vue/test-utils';
import EpicItemTimelineComponent from 'ee/roadmap/components/epic_item_timeline.vue';
import { PRESET_TYPES } from 'ee/roadmap/constants';
import { getTimeframeForMonthsView } from 'ee/roadmap/utils/roadmap_utils';
import { mockTimeframeInitialDate, mockEpic } from 'ee_jest/roadmap/mock_data';
import { shallowMount } from '@vue/test-utils';
const mockTimeframeMonths = getTimeframeForMonthsView(mockTimeframeInitialDate);
......
import { shallowMount } from '@vue/test-utils';
import EpicItemTimelineComponent from 'ee/roadmap/components/epic_item_timeline.vue';
import { PRESET_TYPES } from 'ee/roadmap/constants';
import { getTimeframeForQuartersView } from 'ee/roadmap/utils/roadmap_utils';
import { mockTimeframeInitialDate, mockEpic } from 'ee_jest/roadmap/mock_data';
import { shallowMount } from '@vue/test-utils';
const mockTimeframeQuarters = getTimeframeForQuartersView(mockTimeframeInitialDate);
......
import { shallowMount } from '@vue/test-utils';
import EpicItemTimelineComponent from 'ee/roadmap/components/epic_item_timeline.vue';
import { PRESET_TYPES } from 'ee/roadmap/constants';
import { getTimeframeForWeeksView } from 'ee/roadmap/utils/roadmap_utils';
import { mockTimeframeInitialDate, mockEpic } from 'ee_jest/roadmap/mock_data';
import { shallowMount } from '@vue/test-utils';
const mockTimeframeWeeks = getTimeframeForWeeksView(mockTimeframeInitialDate);
......
import { within } from '@testing-library/dom';
import { createLocalVue, mount, shallowMount, createWrapper } from '@vue/test-utils';
import merge from 'lodash/merge';
import createApolloProvider from 'helpers/mock_apollo_helper';
import VueApollo from 'vue-apollo';
import { GlAlert, GlFormGroup, GlModal, GlSkeletonLoader } from '@gitlab/ui';
import createApolloProvider from 'helpers/mock_apollo_helper';
import dastSiteValidationCreateMutation from 'ee/security_configuration/dast_site_validation/graphql/dast_site_validation_create.mutation.graphql';
import dastSiteTokenCreateMutation from 'ee/security_configuration/dast_site_validation/graphql/dast_site_token_create.mutation.graphql';
import waitForPromises from 'helpers/wait_for_promises';
import { GlAlert, GlFormGroup, GlModal, GlSkeletonLoader } from '@gitlab/ui';
import DastSiteValidationModal from 'ee/security_configuration/dast_site_validation/components/dast_site_validation_modal.vue';
import * as responses from '../mock_data/apollo_mock';
import download from '~/lib/utils/downloader';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue';
import * as responses from '../mock_data/apollo_mock';
jest.mock('~/lib/utils/downloader');
......
import AlertFilters from 'ee/threat_monitoring/components/alerts/alert_filters.vue';
import { DEFAULT_FILTERS } from 'ee/threat_monitoring/components/alerts/constants';
import { GlFormCheckbox } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import AlertFilters from 'ee/threat_monitoring/components/alerts/alert_filters.vue';
import { DEFAULT_FILTERS } from 'ee/threat_monitoring/components/alerts/constants';
describe('AlertFilters component', () => {
let wrapper;
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import VueApollo from 'vue-apollo';
import PolicyAlertPicker from 'ee/threat_monitoring/components/policy_editor/policy_alert_picker.vue';
import getAgentCount from 'ee/threat_monitoring/graphql/queries/get_agent_count.query.graphql';
......
......@@ -22,6 +22,12 @@ import axios from '~/lib/utils/axios_utils';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import { SUCCESS } from '~/vue_merge_request_widget/components/deployment/constants';
import securityReportDownloadPathsQuery from '~/vue_shared/security_reports/queries/security_report_download_paths.query.graphql';
// Force Jest to transpile and cache
// eslint-disable-next-line no-unused-vars
import _GroupedSecurityReportsApp from 'ee/vue_shared/security_reports/grouped_security_reports_app.vue';
// eslint-disable-next-line no-unused-vars
import _Deployment from '~/vue_merge_request_widget/components/deployment/deployment.vue';
import mockData, {
baseBrowserPerformance,
headBrowserPerformance,
......@@ -29,12 +35,6 @@ import mockData, {
headLoadPerformance,
} from './mock_data';
// Force Jest to transpile and cache
// eslint-disable-next-line import/order, no-unused-vars
import _GroupedSecurityReportsApp from 'ee/vue_shared/security_reports/grouped_security_reports_app.vue';
// eslint-disable-next-line no-unused-vars
import _Deployment from '~/vue_merge_request_widget/components/deployment/deployment.vue';
jest.mock('~/vue_shared/components/help_popover.vue');
Vue.use(VueApollo);
......
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