diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 12:07:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 12:07:51 +0300 |
commit | 97d4d926630822d0e1a638206909679c962d2f0a (patch) | |
tree | ef885fdbd0f255f901a587fc3d01bdf115fa3a27 /spec | |
parent | cfc792b9ca064990e6540cb742e80529ea669a81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
55 files changed, 63 insertions, 67 deletions
diff --git a/spec/frontend/admin/statistics_panel/components/app_spec.js b/spec/frontend/admin/statistics_panel/components/app_spec.js index 25b1d432e2d..eba61949f8e 100644 --- a/spec/frontend/admin/statistics_panel/components/app_spec.js +++ b/spec/frontend/admin/statistics_panel/components/app_spec.js @@ -1,12 +1,12 @@ import Vuex from 'vuex'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import AxiosMockAdapter from 'axios-mock-adapter'; +import { GlLoadingIcon } from '@gitlab/ui'; import axios from '~/lib/utils/axios_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import StatisticsPanelApp from '~/admin/statistics_panel/components/app.vue'; import statisticsLabels from '~/admin/statistics_panel/constants'; import createStore from '~/admin/statistics_panel/store'; -import { GlLoadingIcon } from '@gitlab/ui'; import mockStatistics from '../mock_data'; const localVue = createLocalVue(); diff --git a/spec/frontend/autosave_spec.js b/spec/frontend/autosave_spec.js index 1d73e452eb4..3119477f385 100644 --- a/spec/frontend/autosave_spec.js +++ b/spec/frontend/autosave_spec.js @@ -1,7 +1,7 @@ import $ from 'jquery'; +import { useLocalStorageSpy } from 'helpers/local_storage_helper'; import Autosave from '~/autosave'; import AccessorUtilities from '~/lib/utils/accessor'; -import { useLocalStorageSpy } from 'helpers/local_storage_helper'; describe('Autosave', () => { useLocalStorageSpy(); diff --git a/spec/frontend/behaviors/markdown/render_metrics_spec.js b/spec/frontend/behaviors/markdown/render_metrics_spec.js index 6db0eabc16b..9157d2a8448 100644 --- a/spec/frontend/behaviors/markdown/render_metrics_spec.js +++ b/spec/frontend/behaviors/markdown/render_metrics_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import renderMetrics from '~/behaviors/markdown/render_metrics'; import { TEST_HOST } from 'helpers/test_constants'; +import renderMetrics from '~/behaviors/markdown/render_metrics'; const originalExtend = Vue.extend; diff --git a/spec/frontend/boards/components/issue_time_estimate_spec.js b/spec/frontend/boards/components/issue_time_estimate_spec.js index 0a16dfbc009..25e922931c3 100644 --- a/spec/frontend/boards/components/issue_time_estimate_spec.js +++ b/spec/frontend/boards/components/issue_time_estimate_spec.js @@ -1,6 +1,6 @@ +import { shallowMount } from '@vue/test-utils'; import IssueTimeEstimate from '~/boards/components/issue_time_estimate.vue'; import boardsStore from '~/boards/stores/boards_store'; -import { shallowMount } from '@vue/test-utils'; describe('Issue Time Estimate component', () => { let wrapper; diff --git a/spec/frontend/clusters/clusters_bundle_spec.js b/spec/frontend/clusters/clusters_bundle_spec.js index 199e11401a9..7b1d96c8da5 100644 --- a/spec/frontend/clusters/clusters_bundle_spec.js +++ b/spec/frontend/clusters/clusters_bundle_spec.js @@ -1,3 +1,7 @@ +import MockAdapter from 'axios-mock-adapter'; +import $ from 'jquery'; +import { loadHTMLFixture } from 'helpers/fixtures'; +import { setTestTimeout } from 'helpers/timeout'; import Clusters from '~/clusters/clusters_bundle'; import { APPLICATION_STATUS, @@ -5,11 +9,7 @@ import { APPLICATIONS, RUNNER, } from '~/clusters/constants'; -import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; -import { loadHTMLFixture } from 'helpers/fixtures'; -import { setTestTimeout } from 'helpers/timeout'; -import $ from 'jquery'; import initProjectSelectDropdown from '~/project_select'; jest.mock('~/lib/utils/poll'); diff --git a/spec/frontend/clusters/components/application_row_spec.js b/spec/frontend/clusters/components/application_row_spec.js index 41da4125a20..33ff1424c61 100644 --- a/spec/frontend/clusters/components/application_row_spec.js +++ b/spec/frontend/clusters/components/application_row_spec.js @@ -1,11 +1,11 @@ import Vue from 'vue'; import { shallowMount } from '@vue/test-utils'; +import mountComponent from 'helpers/vue_mount_component_helper'; import eventHub from '~/clusters/event_hub'; import { APPLICATION_STATUS } from '~/clusters/constants'; import applicationRow from '~/clusters/components/application_row.vue'; import UninstallApplicationConfirmationModal from '~/clusters/components/uninstall_application_confirmation_modal.vue'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { DEFAULT_APPLICATION_STATE } from '../services/mock_data'; describe('Application Row', () => { diff --git a/spec/frontend/clusters/components/applications_spec.js b/spec/frontend/clusters/components/applications_spec.js index 49bda9539fd..2d7958a6b65 100644 --- a/spec/frontend/clusters/components/applications_spec.js +++ b/spec/frontend/clusters/components/applications_spec.js @@ -1,10 +1,10 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; +import { shallowMount } from '@vue/test-utils'; import applications from '~/clusters/components/applications.vue'; import { CLUSTER_TYPE } from '~/clusters/constants'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { APPLICATIONS_MOCK_STATE } from '../services/mock_data'; import eventHub from '~/clusters/event_hub'; -import { shallowMount } from '@vue/test-utils'; import KnativeDomainEditor from '~/clusters/components/knative_domain_editor.vue'; import CrossplaneProviderStack from '~/clusters/components/crossplane_provider_stack.vue'; diff --git a/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js b/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js index 04808864fc0..f95bce775c6 100644 --- a/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js +++ b/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import UninstallApplicationConfirmationModal from '~/clusters/components/uninstall_application_confirmation_modal.vue'; import { GlModal } from '@gitlab/ui'; +import UninstallApplicationConfirmationModal from '~/clusters/components/uninstall_application_confirmation_modal.vue'; import { INGRESS } from '~/clusters/constants'; describe('UninstallApplicationConfirmationModal', () => { diff --git a/spec/frontend/commit/commit_pipeline_status_component_spec.js b/spec/frontend/commit/commit_pipeline_status_component_spec.js index 1736d1d0df8..36fc6ee52a8 100644 --- a/spec/frontend/commit/commit_pipeline_status_component_spec.js +++ b/spec/frontend/commit/commit_pipeline_status_component_spec.js @@ -1,10 +1,10 @@ import Visibility from 'visibilityjs'; import { GlLoadingIcon } from '@gitlab/ui'; +import { shallowMount } from '@vue/test-utils'; import Poll from '~/lib/utils/poll'; import flash from '~/flash'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CommitPipelineStatus from '~/projects/tree/components/commit_pipeline_status_component.vue'; -import { shallowMount } from '@vue/test-utils'; import { getJSONFixture } from '../helpers/fixtures'; jest.mock('~/lib/utils/poll'); diff --git a/spec/frontend/contributors/component/contributors_spec.js b/spec/frontend/contributors/component/contributors_spec.js index fdba09ed26c..1d5605ef516 100644 --- a/spec/frontend/contributors/component/contributors_spec.js +++ b/spec/frontend/contributors/component/contributors_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import { shallowMount, createLocalVue } from '@vue/test-utils'; +import MockAdapter from 'axios-mock-adapter'; import { createStore } from '~/contributors/stores'; import axios from '~/lib/utils/axios_utils'; -import MockAdapter from 'axios-mock-adapter'; import ContributorsCharts from '~/contributors/components/contributors.vue'; const localVue = createLocalVue(); diff --git a/spec/frontend/contributors/store/actions_spec.js b/spec/frontend/contributors/store/actions_spec.js index bb017e0ac0f..fe3e2132d9d 100644 --- a/spec/frontend/contributors/store/actions_spec.js +++ b/spec/frontend/contributors/store/actions_spec.js @@ -1,6 +1,6 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; +import axios from '~/lib/utils/axios_utils'; import flashError from '~/flash'; import * as actions from '~/contributors/stores/actions'; import * as types from '~/contributors/stores/mutation_types'; diff --git a/spec/frontend/create_cluster/eks_cluster/components/cluster_form_dropdown_spec.js b/spec/frontend/create_cluster/eks_cluster/components/cluster_form_dropdown_spec.js index efbe2635fcc..7ba35358442 100644 --- a/spec/frontend/create_cluster/eks_cluster/components/cluster_form_dropdown_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/components/cluster_form_dropdown_spec.js @@ -1,9 +1,9 @@ import { shallowMount } from '@vue/test-utils'; +import { GlIcon } from '@gitlab/ui'; import ClusterFormDropdown from '~/create_cluster/eks_cluster/components/cluster_form_dropdown.vue'; import DropdownButton from '~/vue_shared/components/dropdown/dropdown_button.vue'; import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; -import { GlIcon } from '@gitlab/ui'; describe('ClusterFormDropdown', () => { let vm; diff --git a/spec/frontend/create_cluster/eks_cluster/services/aws_services_facade_spec.js b/spec/frontend/create_cluster/eks_cluster/services/aws_services_facade_spec.js index 25be858dcb3..146bcc04569 100644 --- a/spec/frontend/create_cluster/eks_cluster/services/aws_services_facade_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/services/aws_services_facade_spec.js @@ -1,6 +1,6 @@ +import AxiosMockAdapter from 'axios-mock-adapter'; import awsServicesFacadeFactory from '~/create_cluster/eks_cluster/services/aws_services_facade'; import axios from '~/lib/utils/axios_utils'; -import AxiosMockAdapter from 'axios-mock-adapter'; describe('awsServicesFacade', () => { let apiPaths; diff --git a/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js b/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js index cf6c317a2df..578d82cfc26 100644 --- a/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js @@ -1,5 +1,6 @@ import testAction from 'helpers/vuex_action_helper'; +import MockAdapter from 'axios-mock-adapter'; import createState from '~/create_cluster/eks_cluster/store/state'; import * as actions from '~/create_cluster/eks_cluster/store/actions'; import { @@ -23,7 +24,6 @@ import { SIGN_OUT, } from '~/create_cluster/eks_cluster/store/mutation_types'; import axios from '~/lib/utils/axios_utils'; -import MockAdapter from 'axios-mock-adapter'; import createFlash from '~/flash'; jest.mock('~/flash'); diff --git a/spec/frontend/create_merge_request_dropdown_spec.js b/spec/frontend/create_merge_request_dropdown_spec.js index dcc6fa96d18..7d26f17ed23 100644 --- a/spec/frontend/create_merge_request_dropdown_spec.js +++ b/spec/frontend/create_merge_request_dropdown_spec.js @@ -1,5 +1,5 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; +import axios from '~/lib/utils/axios_utils'; import CreateMergeRequestDropdown from '~/create_merge_request_dropdown'; import confidentialState from '~/confidential_merge_request/state'; import { TEST_HOST } from './helpers/test_constants'; diff --git a/spec/frontend/error_tracking/components/error_tracking_list_spec.js b/spec/frontend/error_tracking/components/error_tracking_list_spec.js index 80f5b2ccb9f..6e47d2bd648 100644 --- a/spec/frontend/error_tracking/components/error_tracking_list_spec.js +++ b/spec/frontend/error_tracking/components/error_tracking_list_spec.js @@ -1,6 +1,5 @@ import { createLocalVue, shallowMount } from '@vue/test-utils'; import Vuex from 'vuex'; -import ErrorTrackingList from '~/error_tracking/components/error_tracking_list.vue'; import { GlButton, GlEmptyState, @@ -9,6 +8,7 @@ import { GlLink, GlSearchBoxByClick, } from '@gitlab/ui'; +import ErrorTrackingList from '~/error_tracking/components/error_tracking_list.vue'; import errorsList from './list_mock.json'; const localVue = createLocalVue(); diff --git a/spec/frontend/error_tracking/store/details/actions_spec.js b/spec/frontend/error_tracking/store/details/actions_spec.js index f72cd1e413b..0866f76aeef 100644 --- a/spec/frontend/error_tracking/store/details/actions_spec.js +++ b/spec/frontend/error_tracking/store/details/actions_spec.js @@ -1,6 +1,6 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; +import axios from '~/lib/utils/axios_utils'; import createFlash from '~/flash'; import * as actions from '~/error_tracking/store/details/actions'; import * as types from '~/error_tracking/store/details/mutation_types'; diff --git a/spec/frontend/error_tracking/store/list/actions_spec.js b/spec/frontend/error_tracking/store/list/actions_spec.js index dba1b31b9f3..408b0205e93 100644 --- a/spec/frontend/error_tracking/store/list/actions_spec.js +++ b/spec/frontend/error_tracking/store/list/actions_spec.js @@ -1,5 +1,5 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; +import axios from '~/lib/utils/axios_utils'; import * as actions from '~/error_tracking/store/list/actions'; import * as types from '~/error_tracking/store/list/mutation_types'; diff --git a/spec/frontend/error_tracking_settings/components/app_spec.js b/spec/frontend/error_tracking_settings/components/app_spec.js index 022f12ef191..0b86aad5b3e 100644 --- a/spec/frontend/error_tracking_settings/components/app_spec.js +++ b/spec/frontend/error_tracking_settings/components/app_spec.js @@ -1,10 +1,10 @@ import Vuex from 'vuex'; import { createLocalVue, shallowMount } from '@vue/test-utils'; +import { TEST_HOST } from 'helpers/test_constants'; import ErrorTrackingSettings from '~/error_tracking_settings/components/app.vue'; import ErrorTrackingForm from '~/error_tracking_settings/components/error_tracking_form.vue'; import ProjectDropdown from '~/error_tracking_settings/components/project_dropdown.vue'; import createStore from '~/error_tracking_settings/store'; -import { TEST_HOST } from 'helpers/test_constants'; const localVue = createLocalVue(); localVue.use(Vuex); diff --git a/spec/frontend/error_tracking_settings/mock.js b/spec/frontend/error_tracking_settings/mock.js index 8c5bfd08beb..e64a6d1fe14 100644 --- a/spec/frontend/error_tracking_settings/mock.js +++ b/spec/frontend/error_tracking_settings/mock.js @@ -1,5 +1,5 @@ -import createStore from '~/error_tracking_settings/store'; import { TEST_HOST } from 'helpers/test_constants'; +import createStore from '~/error_tracking_settings/store'; const defaultStore = createStore(); diff --git a/spec/frontend/grafana_integration/components/grafana_integration_spec.js b/spec/frontend/grafana_integration/components/grafana_integration_spec.js index c098ada0519..92754ada64f 100644 --- a/spec/frontend/grafana_integration/components/grafana_integration_spec.js +++ b/spec/frontend/grafana_integration/components/grafana_integration_spec.js @@ -1,11 +1,11 @@ import { mount, shallowMount } from '@vue/test-utils'; import { GlButton } from '@gitlab/ui'; +import { TEST_HOST } from 'helpers/test_constants'; import GrafanaIntegration from '~/grafana_integration/components/grafana_integration.vue'; import { createStore } from '~/grafana_integration/store'; import axios from '~/lib/utils/axios_utils'; import { refreshCurrentPage } from '~/lib/utils/url_utility'; import createFlash from '~/flash'; -import { TEST_HOST } from 'helpers/test_constants'; jest.mock('~/lib/utils/url_utility'); jest.mock('~/flash'); diff --git a/spec/frontend/import_projects/components/imported_project_table_row_spec.js b/spec/frontend/import_projects/components/imported_project_table_row_spec.js index f95acc1edd7..34961eae0f3 100644 --- a/spec/frontend/import_projects/components/imported_project_table_row_spec.js +++ b/spec/frontend/import_projects/components/imported_project_table_row_spec.js @@ -1,6 +1,6 @@ import Vuex from 'vuex'; -import createStore from '~/import_projects/store'; import { createLocalVue, mount } from '@vue/test-utils'; +import createStore from '~/import_projects/store'; import importedProjectTableRow from '~/import_projects/components/imported_project_table_row.vue'; import STATUS_MAP from '~/import_projects/constants'; diff --git a/spec/frontend/import_projects/store/actions_spec.js b/spec/frontend/import_projects/store/actions_spec.js index 340b6f02d93..4954513715e 100644 --- a/spec/frontend/import_projects/store/actions_spec.js +++ b/spec/frontend/import_projects/store/actions_spec.js @@ -1,4 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; +import testAction from 'helpers/vuex_action_helper'; +import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { @@ -27,8 +29,6 @@ import { stopJobsPolling, } from '~/import_projects/store/actions'; import state from '~/import_projects/store/state'; -import testAction from 'helpers/vuex_action_helper'; -import { TEST_HOST } from 'helpers/test_constants'; describe('import_projects store actions', () => { let localState; diff --git a/spec/frontend/issuables_list/components/issuables_list_app_spec.js b/spec/frontend/issuables_list/components/issuables_list_app_spec.js index dad4e74cb40..666ccc07416 100644 --- a/spec/frontend/issuables_list/components/issuables_list_app_spec.js +++ b/spec/frontend/issuables_list/components/issuables_list_app_spec.js @@ -2,9 +2,9 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import { GlEmptyState, GlPagination, GlSkeletonLoading } from '@gitlab/ui'; -import flash from '~/flash'; import waitForPromises from 'helpers/wait_for_promises'; import { TEST_HOST } from 'helpers/test_constants'; +import flash from '~/flash'; import IssuablesListApp from '~/issuables_list/components/issuables_list_app.vue'; import Issuable from '~/issuables_list/components/issuable.vue'; import issueablesEventBus from '~/issuables_list/eventhub'; diff --git a/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js b/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js index 89e8459d594..b9c1d65738d 100644 --- a/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js +++ b/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js @@ -1,5 +1,5 @@ -import suppressAjaxErrorsDuringNavigation from '~/lib/utils/suppress_ajax_errors_during_navigation'; import waitForPromises from 'helpers/wait_for_promises'; +import suppressAjaxErrorsDuringNavigation from '~/lib/utils/suppress_ajax_errors_during_navigation'; describe('suppressAjaxErrorsDuringNavigation', () => { const OTHER_ERR_CODE = 'foo'; diff --git a/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js b/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js index e5795d4cbb1..ba35f7bf7c6 100644 --- a/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js +++ b/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js @@ -1,11 +1,10 @@ import $ from 'jquery'; import MockAdapter from 'axios-mock-adapter'; +import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; import axios from '~/lib/utils/axios_utils'; import { getSelector, dismiss, inserted } from '~/feature_highlight/feature_highlight_helper'; import { togglePopover } from '~/shared/popover'; -import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; - describe('feature highlight helper', () => { describe('getSelector', () => { it('returns js-feature-highlight selector', () => { diff --git a/spec/javascripts/feature_highlight/feature_highlight_spec.js b/spec/javascripts/feature_highlight/feature_highlight_spec.js index 0a9fba789c3..40ac4bbb6a0 100644 --- a/spec/javascripts/feature_highlight/feature_highlight_spec.js +++ b/spec/javascripts/feature_highlight/feature_highlight_spec.js @@ -1,8 +1,8 @@ import $ from 'jquery'; +import MockAdapter from 'axios-mock-adapter'; import * as featureHighlight from '~/feature_highlight/feature_highlight'; import * as popover from '~/shared/popover'; import axios from '~/lib/utils/axios_utils'; -import MockAdapter from 'axios-mock-adapter'; describe('feature highlight', () => { beforeEach(() => { diff --git a/spec/javascripts/filtered_search/visual_token_value_spec.js b/spec/javascripts/filtered_search/visual_token_value_spec.js index 10d844fd94b..5863005de1e 100644 --- a/spec/javascripts/filtered_search/visual_token_value_spec.js +++ b/spec/javascripts/filtered_search/visual_token_value_spec.js @@ -1,5 +1,5 @@ -import VisualTokenValue from '~/filtered_search/visual_token_value'; import _ from 'underscore'; +import VisualTokenValue from '~/filtered_search/visual_token_value'; import AjaxCache from '~/lib/utils/ajax_cache'; import UsersCache from '~/lib/utils/users_cache'; import DropdownUtils from '~/filtered_search//dropdown_utils'; diff --git a/spec/javascripts/frequent_items/components/app_spec.js b/spec/javascripts/frequent_items/components/app_spec.js index da0427d650a..b293ed541fd 100644 --- a/spec/javascripts/frequent_items/components/app_spec.js +++ b/spec/javascripts/frequent_items/components/app_spec.js @@ -1,12 +1,12 @@ import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; +import axios from '~/lib/utils/axios_utils'; import appComponent from '~/frequent_items/components/app.vue'; import eventHub from '~/frequent_items/event_hub'; import store from '~/frequent_items/store'; import { FREQUENT_ITEMS, HOUR_IN_MS } from '~/frequent_items/constants'; import { getTopFrequentItems } from '~/frequent_items/utils'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { currentSession, mockFrequentProjects, mockSearchedProjects } from '../mock_data'; let session; diff --git a/spec/javascripts/frequent_items/components/frequent_items_list_item_spec.js b/spec/javascripts/frequent_items/components/frequent_items_list_item_spec.js index 27c79b9c34c..9bf3e02557f 100644 --- a/spec/javascripts/frequent_items/components/frequent_items_list_item_spec.js +++ b/spec/javascripts/frequent_items/components/frequent_items_list_item_spec.js @@ -1,6 +1,6 @@ -import frequentItemsListItemComponent from '~/frequent_items/components/frequent_items_list_item.vue'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import { trimText } from 'spec/helpers/text_helper'; +import frequentItemsListItemComponent from '~/frequent_items/components/frequent_items_list_item.vue'; import { mockProject } from '../mock_data'; // can also use 'mockGroup', but not useful to test here const localVue = createLocalVue(); diff --git a/spec/javascripts/frequent_items/components/frequent_items_list_spec.js b/spec/javascripts/frequent_items/components/frequent_items_list_spec.js index 8518a681a26..3fcd79480cc 100644 --- a/spec/javascripts/frequent_items/components/frequent_items_list_spec.js +++ b/spec/javascripts/frequent_items/components/frequent_items_list_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import frequentItemsListComponent from '~/frequent_items/components/frequent_items_list.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import frequentItemsListComponent from '~/frequent_items/components/frequent_items_list.vue'; import { mockFrequentProjects } from '../mock_data'; const createComponent = (namespace = 'projects') => { diff --git a/spec/javascripts/frequent_items/components/frequent_items_search_input_spec.js b/spec/javascripts/frequent_items/components/frequent_items_search_input_spec.js index c548c16c022..be11af8428f 100644 --- a/spec/javascripts/frequent_items/components/frequent_items_search_input_spec.js +++ b/spec/javascripts/frequent_items/components/frequent_items_search_input_spec.js @@ -1,6 +1,6 @@ +import { shallowMount, createLocalVue } from '@vue/test-utils'; import searchComponent from '~/frequent_items/components/frequent_items_search_input.vue'; import eventHub from '~/frequent_items/event_hub'; -import { shallowMount, createLocalVue } from '@vue/test-utils'; const localVue = createLocalVue(); diff --git a/spec/javascripts/gpg_badges_spec.js b/spec/javascripts/gpg_badges_spec.js index e73f6d3909e..4731484e02d 100644 --- a/spec/javascripts/gpg_badges_spec.js +++ b/spec/javascripts/gpg_badges_spec.js @@ -1,7 +1,7 @@ import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'spec/test_constants'; import axios from '~/lib/utils/axios_utils'; import GpgBadges from '~/gpg_badges'; -import { TEST_HOST } from 'spec/test_constants'; describe('GpgBadges', () => { let mock; diff --git a/spec/javascripts/groups/components/group_item_spec.js b/spec/javascripts/groups/components/group_item_spec.js index cc88a7ac6c1..39575ee9f97 100644 --- a/spec/javascripts/groups/components/group_item_spec.js +++ b/spec/javascripts/groups/components/group_item_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import groupItemComponent from '~/groups/components/group_item.vue'; import groupFolderComponent from '~/groups/components/group_folder.vue'; import eventHub from '~/groups/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { mockParentGroupItem, mockChildren } from '../mock_data'; const createComponent = (group = mockParentGroupItem, parentGroup = mockChildren[0]) => { diff --git a/spec/javascripts/groups/components/groups_spec.js b/spec/javascripts/groups/components/groups_spec.js index 6ba4fe23a69..8423467742e 100644 --- a/spec/javascripts/groups/components/groups_spec.js +++ b/spec/javascripts/groups/components/groups_spec.js @@ -1,10 +1,10 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import groupsComponent from '~/groups/components/groups.vue'; import groupFolderComponent from '~/groups/components/group_folder.vue'; import groupItemComponent from '~/groups/components/group_item.vue'; import eventHub from '~/groups/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { mockGroups, mockPageInfo } from '../mock_data'; const createComponent = (searchEmpty = false) => { diff --git a/spec/javascripts/groups/components/item_actions_spec.js b/spec/javascripts/groups/components/item_actions_spec.js index 3f66e7fd6f2..9a9d6208eac 100644 --- a/spec/javascripts/groups/components/item_actions_spec.js +++ b/spec/javascripts/groups/components/item_actions_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import itemActionsComponent from '~/groups/components/item_actions.vue'; import eventHub from '~/groups/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { mockParentGroupItem, mockChildren } from '../mock_data'; const createComponent = (group = mockParentGroupItem, parentGroup = mockChildren[0]) => { diff --git a/spec/javascripts/groups/components/item_caret_spec.js b/spec/javascripts/groups/components/item_caret_spec.js index 6e430dbcdb2..0eb56abbd61 100644 --- a/spec/javascripts/groups/components/item_caret_spec.js +++ b/spec/javascripts/groups/components/item_caret_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import itemCaretComponent from '~/groups/components/item_caret.vue'; - import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import itemCaretComponent from '~/groups/components/item_caret.vue'; const createComponent = (isGroupOpen = false) => { const Component = Vue.extend(itemCaretComponent); diff --git a/spec/javascripts/groups/components/item_stats_spec.js b/spec/javascripts/groups/components/item_stats_spec.js index b2441babf3f..13d17b87d76 100644 --- a/spec/javascripts/groups/components/item_stats_spec.js +++ b/spec/javascripts/groups/components/item_stats_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import itemStatsComponent from '~/groups/components/item_stats.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import itemStatsComponent from '~/groups/components/item_stats.vue'; import { mockParentGroupItem, ITEM_TYPE, diff --git a/spec/javascripts/groups/components/item_stats_value_spec.js b/spec/javascripts/groups/components/item_stats_value_spec.js index ea8edcf49cd..ff4e781ce1a 100644 --- a/spec/javascripts/groups/components/item_stats_value_spec.js +++ b/spec/javascripts/groups/components/item_stats_value_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import itemStatsValueComponent from '~/groups/components/item_stats_value.vue'; - import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import itemStatsValueComponent from '~/groups/components/item_stats_value.vue'; const createComponent = ({ title, cssClass, iconName, tooltipPlacement, value }) => { const Component = Vue.extend(itemStatsValueComponent); diff --git a/spec/javascripts/groups/components/item_type_icon_spec.js b/spec/javascripts/groups/components/item_type_icon_spec.js index 73108512222..321712e54a6 100644 --- a/spec/javascripts/groups/components/item_type_icon_spec.js +++ b/spec/javascripts/groups/components/item_type_icon_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import itemTypeIconComponent from '~/groups/components/item_type_icon.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import itemTypeIconComponent from '~/groups/components/item_type_icon.vue'; import { ITEM_TYPE } from '../mock_data'; const createComponent = (itemType = ITEM_TYPE.GROUP, isGroupOpen = false) => { diff --git a/spec/javascripts/helpers/init_vue_mr_page_helper.js b/spec/javascripts/helpers/init_vue_mr_page_helper.js index fc4288eb15b..3fa29cb9136 100644 --- a/spec/javascripts/helpers/init_vue_mr_page_helper.js +++ b/spec/javascripts/helpers/init_vue_mr_page_helper.js @@ -1,6 +1,6 @@ +import MockAdapter from 'axios-mock-adapter'; import initMRPage from '~/mr_notes/index'; import axios from '~/lib/utils/axios_utils'; -import MockAdapter from 'axios-mock-adapter'; import { userDataMock, notesDataMock, noteableDataMock } from '../notes/mock_data'; import diffFileMockData from '../diffs/mock_data/diff_file'; diff --git a/spec/javascripts/importer_status_spec.js b/spec/javascripts/importer_status_spec.js index e7f195ed57c..90835e1cc21 100644 --- a/spec/javascripts/importer_status_spec.js +++ b/spec/javascripts/importer_status_spec.js @@ -1,6 +1,6 @@ +import MockAdapter from 'axios-mock-adapter'; import { ImporterStatus } from '~/importer_status'; import axios from '~/lib/utils/axios_utils'; -import MockAdapter from 'axios-mock-adapter'; describe('Importer Status', () => { let instance; diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js index 9fce040fd8c..4c405fbc4d1 100644 --- a/spec/javascripts/issue_show/components/app_spec.js +++ b/spec/javascripts/issue_show/components/app_spec.js @@ -1,12 +1,12 @@ /* eslint-disable no-unused-vars */ -import GLDropdown from '~/gl_dropdown'; import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import setTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; +import GLDropdown from '~/gl_dropdown'; import axios from '~/lib/utils/axios_utils'; import '~/behaviors/markdown/render_gfm'; import issuableApp from '~/issue_show/components/app.vue'; import eventHub from '~/issue_show/event_hub'; -import setTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; import issueShowData from '../mock_data'; function formatText(text) { diff --git a/spec/javascripts/issue_show/components/description_spec.js b/spec/javascripts/issue_show/components/description_spec.js index e10426a9858..83e498347f7 100644 --- a/spec/javascripts/issue_show/components/description_spec.js +++ b/spec/javascripts/issue_show/components/description_spec.js @@ -1,8 +1,8 @@ import $ from 'jquery'; import Vue from 'vue'; import '~/behaviors/markdown/render_gfm'; -import Description from '~/issue_show/components/description.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import Description from '~/issue_show/components/description.vue'; describe('Description component', () => { let vm; diff --git a/spec/javascripts/sidebar/assignee_title_spec.js b/spec/javascripts/sidebar/assignee_title_spec.js index 6c65a55ff29..0496e280a21 100644 --- a/spec/javascripts/sidebar/assignee_title_spec.js +++ b/spec/javascripts/sidebar/assignee_title_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import AssigneeTitle from '~/sidebar/components/assignees/assignee_title.vue'; import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper'; +import AssigneeTitle from '~/sidebar/components/assignees/assignee_title.vue'; describe('AssigneeTitle component', () => { let component; diff --git a/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js b/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js index ab28190ae64..1580f32cfca 100644 --- a/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js +++ b/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue'; - import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue'; describe('Issuable Time Tracker', () => { let initialData; diff --git a/spec/javascripts/sidebar/lock/edit_form_buttons_spec.js b/spec/javascripts/sidebar/lock/edit_form_buttons_spec.js index 330f59f08b2..c532554efb4 100644 --- a/spec/javascripts/sidebar/lock/edit_form_buttons_spec.js +++ b/spec/javascripts/sidebar/lock/edit_form_buttons_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import editFormButtons from '~/sidebar/components/lock/edit_form_buttons.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import editFormButtons from '~/sidebar/components/lock/edit_form_buttons.vue'; describe('EditFormButtons', () => { let vm1; diff --git a/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js b/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js index decccbb8964..0a3f0d6901f 100644 --- a/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js +++ b/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import lockIssueSidebar from '~/sidebar/components/lock/lock_issue_sidebar.vue'; import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper'; +import lockIssueSidebar from '~/sidebar/components/lock/lock_issue_sidebar.vue'; describe('LockIssueSidebar', () => { let vm1; diff --git a/spec/javascripts/sidebar/participants_spec.js b/spec/javascripts/sidebar/participants_spec.js index eb360fd256a..8d8ec5884f6 100644 --- a/spec/javascripts/sidebar/participants_spec.js +++ b/spec/javascripts/sidebar/participants_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import participants from '~/sidebar/components/participants/participants.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import participants from '~/sidebar/components/participants/participants.vue'; const PARTICIPANT = { id: 1, diff --git a/spec/javascripts/sidebar/sidebar_assignees_spec.js b/spec/javascripts/sidebar/sidebar_assignees_spec.js index e808f4003ff..23b8dc69925 100644 --- a/spec/javascripts/sidebar/sidebar_assignees_spec.js +++ b/spec/javascripts/sidebar/sidebar_assignees_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import SidebarAssignees from '~/sidebar/components/assignees/sidebar_assignees.vue'; import SidebarMediator from '~/sidebar/sidebar_mediator'; import SidebarService from '~/sidebar/services/sidebar_service'; import SidebarStore from '~/sidebar/stores/sidebar_store'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import Mock from './mock_data'; describe('sidebar assignees', () => { diff --git a/spec/javascripts/sidebar/sidebar_subscriptions_spec.js b/spec/javascripts/sidebar/sidebar_subscriptions_spec.js index 88f64244237..ee4516f3bcd 100644 --- a/spec/javascripts/sidebar/sidebar_subscriptions_spec.js +++ b/spec/javascripts/sidebar/sidebar_subscriptions_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import sidebarSubscriptions from '~/sidebar/components/subscriptions/sidebar_subscriptions.vue'; import SidebarMediator from '~/sidebar/sidebar_mediator'; import SidebarService from '~/sidebar/services/sidebar_service'; import SidebarStore from '~/sidebar/stores/sidebar_store'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import Mock from './mock_data'; describe('Sidebar Subscriptions', function() { diff --git a/spec/javascripts/sidebar/subscriptions_spec.js b/spec/javascripts/sidebar/subscriptions_spec.js index 1256852c472..cdb39efbef8 100644 --- a/spec/javascripts/sidebar/subscriptions_spec.js +++ b/spec/javascripts/sidebar/subscriptions_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; -import subscriptions from '~/sidebar/components/subscriptions/subscriptions.vue'; -import eventHub from '~/sidebar/event_hub'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { mockTracking } from 'spec/helpers/tracking_helper'; +import subscriptions from '~/sidebar/components/subscriptions/subscriptions.vue'; +import eventHub from '~/sidebar/event_hub'; describe('Subscriptions', function() { let vm; diff --git a/spec/javascripts/smart_interval_spec.js b/spec/javascripts/smart_interval_spec.js index c2c2a965e1d..0f579bb32cc 100644 --- a/spec/javascripts/smart_interval_spec.js +++ b/spec/javascripts/smart_interval_spec.js @@ -1,7 +1,7 @@ import $ from 'jquery'; import _ from 'underscore'; -import SmartInterval from '~/smart_interval'; import waitForPromises from 'spec/helpers/wait_for_promises'; +import SmartInterval from '~/smart_interval'; describe('SmartInterval', function() { const DEFAULT_MAX_INTERVAL = 100; diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index 8f4af90edd7..b81804def57 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -7,9 +7,9 @@ import 'core-js/features/set-immediate'; import 'vendor/jasmine-jquery'; import '~/commons'; import Vue from 'vue'; -import Translate from '~/vue_shared/translate'; import jasmineDiff from 'jasmine-diff'; import { config as testUtilsConfig } from '@vue/test-utils'; +import Translate from '~/vue_shared/translate'; import { getDefaultAdapter } from '~/lib/utils/axios_utils'; import { FIXTURES_PATH, TEST_HOST } from './test_constants'; diff --git a/spec/javascripts/vuex_shared/modules/modal/actions_spec.js b/spec/javascripts/vuex_shared/modules/modal/actions_spec.js index 04f64663ae4..2c4cb845424 100644 --- a/spec/javascripts/vuex_shared/modules/modal/actions_spec.js +++ b/spec/javascripts/vuex_shared/modules/modal/actions_spec.js @@ -1,6 +1,6 @@ +import testAction from 'spec/helpers/vuex_action_helper'; import * as types from '~/vuex_shared/modules/modal/mutation_types'; import * as actions from '~/vuex_shared/modules/modal/actions'; -import testAction from 'spec/helpers/vuex_action_helper'; describe('Vuex ModalModule actions', () => { describe('open', () => { |