diff options
Diffstat (limited to 'spec')
167 files changed, 199 insertions, 236 deletions
diff --git a/spec/frontend/monitoring/charts/time_series_spec.js b/spec/frontend/monitoring/charts/time_series_spec.js index 6fa2d15ccbf..efc2da40a52 100644 --- a/spec/frontend/monitoring/charts/time_series_spec.js +++ b/spec/frontend/monitoring/charts/time_series_spec.js @@ -1,9 +1,9 @@ import { shallowMount } from '@vue/test-utils'; import { setTestTimeout } from 'helpers/timeout'; -import { createStore } from '~/monitoring/stores'; import { GlLink } from '@gitlab/ui'; import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts'; import { shallowWrapperContainsSlotText } from 'helpers/vue_test_utils_helper'; +import { createStore } from '~/monitoring/stores'; import TimeSeries from '~/monitoring/components/charts/time_series.vue'; import * as types from '~/monitoring/stores/mutation_types'; import { diff --git a/spec/frontend/monitoring/components/charts/anomaly_spec.js b/spec/frontend/monitoring/components/charts/anomaly_spec.js index 38aef6e6052..7446461a574 100644 --- a/spec/frontend/monitoring/components/charts/anomaly_spec.js +++ b/spec/frontend/monitoring/components/charts/anomaly_spec.js @@ -1,6 +1,7 @@ +import { shallowMount } from '@vue/test-utils'; +import { TEST_HOST } from 'helpers/test_constants'; import Anomaly from '~/monitoring/components/charts/anomaly.vue'; -import { shallowMount } from '@vue/test-utils'; import { colorValues } from '~/monitoring/constants'; import { anomalyDeploymentData, @@ -8,7 +9,6 @@ import { anomalyMockGraphData, anomalyMockResultValues, } from '../../mock_data'; -import { TEST_HOST } from 'helpers/test_constants'; import MonitorTimeSeriesChart from '~/monitoring/components/charts/time_series.vue'; const mockWidgets = 'mockWidgets'; diff --git a/spec/frontend/monitoring/embed/embed_spec.js b/spec/frontend/monitoring/embed/embed_spec.js index 6d40719fa32..15ea7c63875 100644 --- a/spec/frontend/monitoring/embed/embed_spec.js +++ b/spec/frontend/monitoring/embed/embed_spec.js @@ -1,8 +1,8 @@ import { createLocalVue, shallowMount } from '@vue/test-utils'; import Vuex from 'vuex'; -import Embed from '~/monitoring/components/embed.vue'; import PanelType from 'ee_else_ce/monitoring/components/panel_type.vue'; import { TEST_HOST } from 'helpers/test_constants'; +import Embed from '~/monitoring/components/embed.vue'; import { groups, initialState, metricsData, metricsWithData } from './mock_data'; const localVue = createLocalVue(); diff --git a/spec/frontend/monitoring/store/actions_spec.js b/spec/frontend/monitoring/store/actions_spec.js index 83dac6552a2..9ee8e4e9144 100644 --- a/spec/frontend/monitoring/store/actions_spec.js +++ b/spec/frontend/monitoring/store/actions_spec.js @@ -1,6 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; -import Tracking from '~/tracking'; import testAction from 'helpers/vuex_action_helper'; +import Tracking from '~/tracking'; import axios from '~/lib/utils/axios_utils'; import statusCodes from '~/lib/utils/http_status'; import { backOff } from '~/lib/utils/common_utils'; diff --git a/spec/frontend/mr_popover/mr_popover_spec.js b/spec/frontend/mr_popover/mr_popover_spec.js index 79ed4163010..e72b729f056 100644 --- a/spec/frontend/mr_popover/mr_popover_spec.js +++ b/spec/frontend/mr_popover/mr_popover_spec.js @@ -1,5 +1,5 @@ -import MRPopover from '~/mr_popover/components/mr_popover'; import { shallowMount } from '@vue/test-utils'; +import MRPopover from '~/mr_popover/components/mr_popover'; describe('MR Popover', () => { let wrapper; diff --git a/spec/frontend/notes/components/comment_form_spec.js b/spec/frontend/notes/components/comment_form_spec.js index 475ea4f0f7d..10d92e9535c 100644 --- a/spec/frontend/notes/components/comment_form_spec.js +++ b/spec/frontend/notes/components/comment_form_spec.js @@ -2,12 +2,12 @@ import $ from 'jquery'; import { mount } from '@vue/test-utils'; import MockAdapter from 'axios-mock-adapter'; import Autosize from 'autosize'; +import { trimText } from 'helpers/text_helper'; import axios from '~/lib/utils/axios_utils'; import createStore from '~/notes/stores'; import CommentForm from '~/notes/components/comment_form.vue'; import * as constants from '~/notes/constants'; import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests'; -import { trimText } from 'helpers/text_helper'; import { keyboardDownEvent } from '../../issue_show/helpers'; import { loggedOutnoteableData, diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index 3ccfea121b0..6198f8b3c1d 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -1,4 +1,3 @@ -import createStore from '~/notes/stores'; import { shallowMount, mount, createLocalVue } from '@vue/test-utils'; import { discussionMock } from '../../notes/mock_data'; import DiscussionActions from '~/notes/components/discussion_actions.vue'; @@ -6,6 +5,7 @@ import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vu import ResolveDiscussionButton from '~/notes/components/discussion_resolve_button.vue'; import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue'; import JumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue'; +import createStore from '~/notes/stores'; // NOTE: clone mock_data so that it is not accidentally mutated const createDiscussionMock = (props = {}) => diff --git a/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js b/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js index ed173eacfab..3986340b6fd 100644 --- a/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js +++ b/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js @@ -1,5 +1,5 @@ -import JumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue'; import { shallowMount } from '@vue/test-utils'; +import JumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue'; describe('JumpToNextDiscussionButton', () => { let wrapper; diff --git a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js index e008f4ed093..3152b6ff241 100644 --- a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js +++ b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js @@ -1,5 +1,5 @@ -import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue'; import { shallowMount, createLocalVue } from '@vue/test-utils'; +import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue'; const localVue = createLocalVue(); const buttonText = 'Test Button Text'; diff --git a/spec/frontend/notes/components/discussion_resolve_button_spec.js b/spec/frontend/notes/components/discussion_resolve_button_spec.js index 5024f40ec5d..1fae19f4492 100644 --- a/spec/frontend/notes/components/discussion_resolve_button_spec.js +++ b/spec/frontend/notes/components/discussion_resolve_button_spec.js @@ -1,5 +1,5 @@ -import resolveDiscussionButton from '~/notes/components/discussion_resolve_button.vue'; import { createLocalVue, shallowMount } from '@vue/test-utils'; +import resolveDiscussionButton from '~/notes/components/discussion_resolve_button.vue'; const buttonTitle = 'Resolve discussion'; diff --git a/spec/frontend/notes/old_notes_spec.js b/spec/frontend/notes/old_notes_spec.js index 96133c601aa..c1c9d5cef4a 100644 --- a/spec/frontend/notes/old_notes_spec.js +++ b/spec/frontend/notes/old_notes_spec.js @@ -3,12 +3,12 @@ import $ from 'jquery'; import _ from 'underscore'; import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; -import * as urlUtility from '~/lib/utils/url_utility'; import '~/behaviors/markdown/render_gfm'; import { createSpyObj } from 'helpers/jest_helpers'; import { setTestTimeoutOnce } from 'helpers/timeout'; import { TEST_HOST } from 'helpers/test_constants'; +import * as urlUtility from '~/lib/utils/url_utility'; +import axios from '~/lib/utils/axios_utils'; // These must be imported synchronously because they pull dependencies // from the DOM. diff --git a/spec/frontend/operation_settings/components/external_dashboard_spec.js b/spec/frontend/operation_settings/components/external_dashboard_spec.js index 39d7c19e731..bb6e029c808 100644 --- a/spec/frontend/operation_settings/components/external_dashboard_spec.js +++ b/spec/frontend/operation_settings/components/external_dashboard_spec.js @@ -1,11 +1,11 @@ import { mount, shallowMount, createLocalVue } from '@vue/test-utils'; import { GlButton, GlLink, GlFormGroup, GlFormInput } from '@gitlab/ui'; +import { TEST_HOST } from 'helpers/test_constants'; import ExternalDashboard from '~/operation_settings/components/external_dashboard.vue'; import store from '~/operation_settings/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/pages/profiles/show/emoji_menu_spec.js b/spec/frontend/pages/profiles/show/emoji_menu_spec.js index 6ac1e83829f..00320fb4601 100644 --- a/spec/frontend/pages/profiles/show/emoji_menu_spec.js +++ b/spec/frontend/pages/profiles/show/emoji_menu_spec.js @@ -1,7 +1,7 @@ import $ from 'jquery'; +import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; import EmojiMenu from '~/pages/profiles/show/emoji_menu'; -import { TEST_HOST } from 'helpers/test_constants'; describe('EmojiMenu', () => { const dummyEmojiTag = '<dummy></tag>'; diff --git a/spec/frontend/performance_bar/components/add_request_spec.js b/spec/frontend/performance_bar/components/add_request_spec.js index cef264f3915..a0ad25744b0 100644 --- a/spec/frontend/performance_bar/components/add_request_spec.js +++ b/spec/frontend/performance_bar/components/add_request_spec.js @@ -1,5 +1,5 @@ -import AddRequest from '~/performance_bar/components/add_request.vue'; import { shallowMount } from '@vue/test-utils'; +import AddRequest from '~/performance_bar/components/add_request.vue'; describe('add request form', () => { let wrapper; diff --git a/spec/frontend/performance_bar/components/detailed_metric_spec.js b/spec/frontend/performance_bar/components/detailed_metric_spec.js index 74f242431a1..01b6b7b043c 100644 --- a/spec/frontend/performance_bar/components/detailed_metric_spec.js +++ b/spec/frontend/performance_bar/components/detailed_metric_spec.js @@ -1,6 +1,6 @@ +import { shallowMount } from '@vue/test-utils'; import DetailedMetric from '~/performance_bar/components/detailed_metric.vue'; import RequestWarning from '~/performance_bar/components/request_warning.vue'; -import { shallowMount } from '@vue/test-utils'; describe('detailedMetric', () => { const createComponent = props => diff --git a/spec/frontend/performance_bar/components/performance_bar_app_spec.js b/spec/frontend/performance_bar/components/performance_bar_app_spec.js index ba403dd6209..417a655093c 100644 --- a/spec/frontend/performance_bar/components/performance_bar_app_spec.js +++ b/spec/frontend/performance_bar/components/performance_bar_app_spec.js @@ -1,6 +1,6 @@ +import { shallowMount } from '@vue/test-utils'; import PerformanceBarApp from '~/performance_bar/components/performance_bar_app.vue'; import PerformanceBarStore from '~/performance_bar/stores/performance_bar_store'; -import { shallowMount } from '@vue/test-utils'; describe('performance bar app', () => { const store = new PerformanceBarStore(); diff --git a/spec/frontend/performance_bar/components/request_selector_spec.js b/spec/frontend/performance_bar/components/request_selector_spec.js index 42ccb1f1b5c..871f0485a13 100644 --- a/spec/frontend/performance_bar/components/request_selector_spec.js +++ b/spec/frontend/performance_bar/components/request_selector_spec.js @@ -1,5 +1,5 @@ -import RequestSelector from '~/performance_bar/components/request_selector.vue'; import { shallowMount } from '@vue/test-utils'; +import RequestSelector from '~/performance_bar/components/request_selector.vue'; describe('request selector', () => { const requests = [ diff --git a/spec/frontend/performance_bar/components/request_warning_spec.js b/spec/frontend/performance_bar/components/request_warning_spec.js index 6d8bfba56f6..21f7bdf01f3 100644 --- a/spec/frontend/performance_bar/components/request_warning_spec.js +++ b/spec/frontend/performance_bar/components/request_warning_spec.js @@ -1,5 +1,5 @@ -import RequestWarning from '~/performance_bar/components/request_warning.vue'; import { shallowMount } from '@vue/test-utils'; +import RequestWarning from '~/performance_bar/components/request_warning.vue'; describe('request warning', () => { const htmlId = 'request-123'; diff --git a/spec/frontend/pipelines/graph/job_item_spec.js b/spec/frontend/pipelines/graph/job_item_spec.js index 943ef9d3531..c79af95b3f3 100644 --- a/spec/frontend/pipelines/graph/job_item_spec.js +++ b/spec/frontend/pipelines/graph/job_item_spec.js @@ -1,5 +1,5 @@ -import { trimText } from 'helpers/text_helper'; import { mount } from '@vue/test-utils'; +import { trimText } from 'helpers/text_helper'; import JobItem from '~/pipelines/components/graph/job_item.vue'; describe('pipeline graph job item', () => { diff --git a/spec/frontend/pipelines/test_reports/stores/actions_spec.js b/spec/frontend/pipelines/test_reports/stores/actions_spec.js index d7007eb7631..56148361e0a 100644 --- a/spec/frontend/pipelines/test_reports/stores/actions_spec.js +++ b/spec/frontend/pipelines/test_reports/stores/actions_spec.js @@ -1,8 +1,8 @@ import MockAdapter from 'axios-mock-adapter'; +import { getJSONFixture } from 'helpers/fixtures'; import axios from '~/lib/utils/axios_utils'; import * as actions from '~/pipelines/stores/test_reports/actions'; import * as types from '~/pipelines/stores/test_reports/mutation_types'; -import { getJSONFixture } from 'helpers/fixtures'; import { TEST_HOST } from '../../../helpers/test_constants'; import testAction from '../../../helpers/vuex_action_helper'; import createFlash from '~/flash'; diff --git a/spec/frontend/pipelines/test_reports/stores/getters_spec.js b/spec/frontend/pipelines/test_reports/stores/getters_spec.js index cfd0ecdcb30..011a7e68908 100644 --- a/spec/frontend/pipelines/test_reports/stores/getters_spec.js +++ b/spec/frontend/pipelines/test_reports/stores/getters_spec.js @@ -1,6 +1,6 @@ +import { getJSONFixture } from 'helpers/fixtures'; import * as getters from '~/pipelines/stores/test_reports/getters'; import { iconForTestStatus } from '~/pipelines/stores/test_reports/utils'; -import { getJSONFixture } from 'helpers/fixtures'; describe('Getters TestReports Store', () => { let state; diff --git a/spec/frontend/pipelines/test_reports/stores/mutations_spec.js b/spec/frontend/pipelines/test_reports/stores/mutations_spec.js index b891415f705..9eaa563025d 100644 --- a/spec/frontend/pipelines/test_reports/stores/mutations_spec.js +++ b/spec/frontend/pipelines/test_reports/stores/mutations_spec.js @@ -1,6 +1,6 @@ +import { getJSONFixture } from 'helpers/fixtures'; import * as types from '~/pipelines/stores/test_reports/mutation_types'; import mutations from '~/pipelines/stores/test_reports/mutations'; -import { getJSONFixture } from 'helpers/fixtures'; describe('Mutations TestReports Store', () => { let mockState; diff --git a/spec/frontend/pipelines/test_reports/test_reports_spec.js b/spec/frontend/pipelines/test_reports/test_reports_spec.js index 033c3300098..cc86ba6d46d 100644 --- a/spec/frontend/pipelines/test_reports/test_reports_spec.js +++ b/spec/frontend/pipelines/test_reports/test_reports_spec.js @@ -1,8 +1,8 @@ import Vuex from 'vuex'; -import TestReports from '~/pipelines/components/test_reports/test_reports.vue'; import { shallowMount } from '@vue/test-utils'; -import * as actions from '~/pipelines/stores/test_reports/actions'; import { getJSONFixture } from 'helpers/fixtures'; +import TestReports from '~/pipelines/components/test_reports/test_reports.vue'; +import * as actions from '~/pipelines/stores/test_reports/actions'; describe('Test reports app', () => { let wrapper; diff --git a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js index bc5d8647d6a..a5b093cf769 100644 --- a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js +++ b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js @@ -1,9 +1,9 @@ import Vuex from 'vuex'; +import { shallowMount } from '@vue/test-utils'; +import { getJSONFixture } from 'helpers/fixtures'; import SuiteTable from '~/pipelines/components/test_reports/test_suite_table.vue'; import * as getters from '~/pipelines/stores/test_reports/getters'; import { TestStatus } from '~/pipelines/constants'; -import { shallowMount } from '@vue/test-utils'; -import { getJSONFixture } from 'helpers/fixtures'; import skippedTestCases from './mock_data'; describe('Test reports suite table', () => { diff --git a/spec/frontend/pipelines/test_reports/test_summary_spec.js b/spec/frontend/pipelines/test_reports/test_summary_spec.js index 2c1a30f0fd5..160d93d2e6b 100644 --- a/spec/frontend/pipelines/test_reports/test_summary_spec.js +++ b/spec/frontend/pipelines/test_reports/test_summary_spec.js @@ -1,6 +1,6 @@ -import Summary from '~/pipelines/components/test_reports/test_summary.vue'; import { mount } from '@vue/test-utils'; import { getJSONFixture } from 'helpers/fixtures'; +import Summary from '~/pipelines/components/test_reports/test_summary.vue'; describe('Test reports summary', () => { let wrapper; diff --git a/spec/frontend/pipelines/test_reports/test_summary_table_spec.js b/spec/frontend/pipelines/test_reports/test_summary_table_spec.js index 7d06d96fe75..9146f301f66 100644 --- a/spec/frontend/pipelines/test_reports/test_summary_table_spec.js +++ b/spec/frontend/pipelines/test_reports/test_summary_table_spec.js @@ -1,8 +1,8 @@ import Vuex from 'vuex'; -import SummaryTable from '~/pipelines/components/test_reports/test_summary_table.vue'; -import * as getters from '~/pipelines/stores/test_reports/getters'; import { mount, createLocalVue } from '@vue/test-utils'; import { getJSONFixture } from 'helpers/fixtures'; +import SummaryTable from '~/pipelines/components/test_reports/test_summary_table.vue'; +import * as getters from '~/pipelines/stores/test_reports/getters'; const localVue = createLocalVue(); localVue.use(Vuex); diff --git a/spec/frontend/project_find_file_spec.js b/spec/frontend/project_find_file_spec.js index e60f9f62747..b697ca01046 100644 --- a/spec/frontend/project_find_file_spec.js +++ b/spec/frontend/project_find_file_spec.js @@ -1,9 +1,9 @@ import MockAdapter from 'axios-mock-adapter'; import $ from 'jquery'; -import ProjectFindFile from '~/project_find_file'; -import axios from '~/lib/utils/axios_utils'; import { TEST_HOST } from 'helpers/test_constants'; import sanitize from 'sanitize-html'; +import ProjectFindFile from '~/project_find_file'; +import axios from '~/lib/utils/axios_utils'; jest.mock('sanitize-html', () => jest.fn(val => val)); diff --git a/spec/frontend/registry/list/components/app_spec.js b/spec/frontend/registry/list/components/app_spec.js index 0013b27bd01..f2733ac9fef 100644 --- a/spec/frontend/registry/list/components/app_spec.js +++ b/spec/frontend/registry/list/components/app_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import { mount } from '@vue/test-utils'; -import registry from '~/registry/list/components/app.vue'; import { TEST_HOST } from 'helpers/test_constants'; +import registry from '~/registry/list/components/app.vue'; import { reposServerResponse, parsedReposServerResponse } from '../mock_data'; describe('Registry List', () => { diff --git a/spec/frontend/registry/list/stores/actions_spec.js b/spec/frontend/registry/list/stores/actions_spec.js index 1a9c23ed188..2fc363e9a4f 100644 --- a/spec/frontend/registry/list/stores/actions_spec.js +++ b/spec/frontend/registry/list/stores/actions_spec.js @@ -1,9 +1,9 @@ import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'helpers/test_constants'; +import testAction from 'helpers/vuex_action_helper'; import axios from '~/lib/utils/axios_utils'; import * as actions from '~/registry/list/stores/actions'; import * as types from '~/registry/list/stores/mutation_types'; -import { TEST_HOST } from 'helpers/test_constants'; -import testAction from 'helpers/vuex_action_helper'; import createFlash from '~/flash'; import { diff --git a/spec/frontend/registry/settings/stores/actions_spec.js b/spec/frontend/registry/settings/stores/actions_spec.js index 205c3a6ee21..484f1b2dc0a 100644 --- a/spec/frontend/registry/settings/stores/actions_spec.js +++ b/spec/frontend/registry/settings/stores/actions_spec.js @@ -1,6 +1,6 @@ +import testAction from 'helpers/vuex_action_helper'; import * as actions from '~/registry/settings/stores/actions'; import * as types from '~/registry/settings/stores/mutation_types'; -import testAction from 'helpers/vuex_action_helper'; jest.mock('~/flash.js'); diff --git a/spec/frontend/releases/detail/store/actions_spec.js b/spec/frontend/releases/detail/store/actions_spec.js index f1c7f3c1048..5a1447aa4fc 100644 --- a/spec/frontend/releases/detail/store/actions_spec.js +++ b/spec/frontend/releases/detail/store/actions_spec.js @@ -1,7 +1,7 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; -import * as actions from '~/releases/detail/store/actions'; import testAction from 'helpers/vuex_action_helper'; +import * as actions from '~/releases/detail/store/actions'; import * as types from '~/releases/detail/store/mutation_types'; import { release } from '../../mock_data'; import state from '~/releases/detail/store/state'; diff --git a/spec/frontend/releases/list/components/release_block_footer_spec.js b/spec/frontend/releases/list/components/release_block_footer_spec.js index 172147f1cc8..36a94b21df1 100644 --- a/spec/frontend/releases/list/components/release_block_footer_spec.js +++ b/spec/frontend/releases/list/components/release_block_footer_spec.js @@ -1,8 +1,8 @@ import { mount } from '@vue/test-utils'; -import ReleaseBlockFooter from '~/releases/list/components/release_block_footer.vue'; -import Icon from '~/vue_shared/components/icon.vue'; import { GlLink } from '@gitlab/ui'; import { trimText } from 'helpers/text_helper'; +import ReleaseBlockFooter from '~/releases/list/components/release_block_footer.vue'; +import Icon from '~/vue_shared/components/icon.vue'; import { release } from '../../mock_data'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; diff --git a/spec/frontend/releases/list/components/release_block_milestone_info_spec.js b/spec/frontend/releases/list/components/release_block_milestone_info_spec.js index c7d1bc3c372..7179ab3d3cc 100644 --- a/spec/frontend/releases/list/components/release_block_milestone_info_spec.js +++ b/spec/frontend/releases/list/components/release_block_milestone_info_spec.js @@ -1,8 +1,8 @@ import { mount } from '@vue/test-utils'; import { GlProgressBar, GlLink, GlBadge, GlButton } from '@gitlab/ui'; +import { trimText } from 'helpers/text_helper'; import ReleaseBlockMilestoneInfo from '~/releases/list/components/release_block_milestone_info.vue'; import { milestones } from '../../mock_data'; -import { trimText } from 'helpers/text_helper'; import { MAX_MILESTONES_TO_DISPLAY } from '~/releases/list/constants'; describe('Release block milestone info', () => { diff --git a/spec/frontend/releases/list/components/release_block_spec.js b/spec/frontend/releases/list/components/release_block_spec.js index c7a1cbdea17..c83af01f6e0 100644 --- a/spec/frontend/releases/list/components/release_block_spec.js +++ b/spec/frontend/releases/list/components/release_block_spec.js @@ -1,9 +1,9 @@ import { mount } from '@vue/test-utils'; +import { first } from 'underscore'; import EvidenceBlock from '~/releases/list/components/evidence_block.vue'; import ReleaseBlock from '~/releases/list/components/release_block.vue'; import ReleaseBlockFooter from '~/releases/list/components/release_block_footer.vue'; import timeagoMixin from '~/vue_shared/mixins/timeago'; -import { first } from 'underscore'; import { release } from '../../mock_data'; import Icon from '~/vue_shared/components/icon.vue'; import { scrollToElement } from '~/lib/utils/common_utils'; diff --git a/spec/frontend/reports/components/report_section_spec.js b/spec/frontend/reports/components/report_section_spec.js index d4a3073374a..eaeb074acaf 100644 --- a/spec/frontend/reports/components/report_section_spec.js +++ b/spec/frontend/reports/components/report_section_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import reportSection from '~/reports/components/report_section.vue'; import mountComponent, { mountComponentWithSlots } from 'helpers/vue_mount_component_helper'; +import reportSection from '~/reports/components/report_section.vue'; describe('Report section', () => { let vm; diff --git a/spec/frontend/serverless/components/environment_row_spec.js b/spec/frontend/serverless/components/environment_row_spec.js index 0ad85e218dc..866b2165917 100644 --- a/spec/frontend/serverless/components/environment_row_spec.js +++ b/spec/frontend/serverless/components/environment_row_spec.js @@ -1,5 +1,5 @@ -import environmentRowComponent from '~/serverless/components/environment_row.vue'; import { createLocalVue, shallowMount } from '@vue/test-utils'; +import environmentRowComponent from '~/serverless/components/environment_row.vue'; import { mockServerlessFunctions, mockServerlessFunctionsDiffEnv } from '../mock_data'; import { translate } from '~/serverless/utils'; diff --git a/spec/frontend/serverless/components/function_details_spec.js b/spec/frontend/serverless/components/function_details_spec.js index 31348ff1194..27d3a43db27 100644 --- a/spec/frontend/serverless/components/function_details_spec.js +++ b/spec/frontend/serverless/components/function_details_spec.js @@ -1,7 +1,7 @@ import Vuex from 'vuex'; -import functionDetailsComponent from '~/serverless/components/function_details.vue'; import { createLocalVue, shallowMount } from '@vue/test-utils'; +import functionDetailsComponent from '~/serverless/components/function_details.vue'; import { createStore } from '~/serverless/store'; describe('functionDetailsComponent', () => { diff --git a/spec/frontend/serverless/components/function_row_spec.js b/spec/frontend/serverless/components/function_row_spec.js index 979f98c4832..559c55a1eb4 100644 --- a/spec/frontend/serverless/components/function_row_spec.js +++ b/spec/frontend/serverless/components/function_row_spec.js @@ -1,5 +1,5 @@ -import functionRowComponent from '~/serverless/components/function_row.vue'; import { shallowMount } from '@vue/test-utils'; +import functionRowComponent from '~/serverless/components/function_row.vue'; import Timeago from '~/vue_shared/components/time_ago_tooltip.vue'; import { mockServerlessFunction } from '../mock_data'; diff --git a/spec/frontend/serverless/components/functions_spec.js b/spec/frontend/serverless/components/functions_spec.js index d8a80f8031e..29d35b5f1a6 100644 --- a/spec/frontend/serverless/components/functions_spec.js +++ b/spec/frontend/serverless/components/functions_spec.js @@ -1,13 +1,13 @@ import Vuex from 'vuex'; import { GlLoadingIcon } from '@gitlab/ui'; import AxiosMockAdapter from 'axios-mock-adapter'; +import { createLocalVue, shallowMount } from '@vue/test-utils'; +import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; import functionsComponent from '~/serverless/components/functions.vue'; -import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createStore } from '~/serverless/store'; import EmptyState from '~/serverless/components/empty_state.vue'; import EnvironmentRow from '~/serverless/components/environment_row.vue'; -import { TEST_HOST } from 'helpers/test_constants'; import { mockServerlessFunctions } from '../mock_data'; describe('functionsComponent', () => { diff --git a/spec/frontend/serverless/components/missing_prometheus_spec.js b/spec/frontend/serverless/components/missing_prometheus_spec.js index 5dbdccde2de..908f534b847 100644 --- a/spec/frontend/serverless/components/missing_prometheus_spec.js +++ b/spec/frontend/serverless/components/missing_prometheus_spec.js @@ -1,6 +1,6 @@ import { GlButton } from '@gitlab/ui'; -import missingPrometheusComponent from '~/serverless/components/missing_prometheus.vue'; import { shallowMount } from '@vue/test-utils'; +import missingPrometheusComponent from '~/serverless/components/missing_prometheus.vue'; const createComponent = missingData => shallowMount(missingPrometheusComponent, { diff --git a/spec/frontend/serverless/components/pod_box_spec.js b/spec/frontend/serverless/components/pod_box_spec.js index d82825d8f62..8563d29c56b 100644 --- a/spec/frontend/serverless/components/pod_box_spec.js +++ b/spec/frontend/serverless/components/pod_box_spec.js @@ -1,5 +1,5 @@ -import podBoxComponent from '~/serverless/components/pod_box.vue'; import { shallowMount } from '@vue/test-utils'; +import podBoxComponent from '~/serverless/components/pod_box.vue'; const createComponent = count => shallowMount(podBoxComponent, { diff --git a/spec/frontend/serverless/components/url_spec.js b/spec/frontend/serverless/components/url_spec.js index 706441e8a8b..9b15df20a89 100644 --- a/spec/frontend/serverless/components/url_spec.js +++ b/spec/frontend/serverless/components/url_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import urlComponent from '~/serverless/components/url.vue'; import { shallowMount } from '@vue/test-utils'; +import urlComponent from '~/serverless/components/url.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; const createComponent = uri => diff --git a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js index d0d1af56872..d800649bc1d 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import { joinPaths } from '~/lib/utils/url_utility'; import { TEST_HOST } from 'helpers/test_constants'; +import { joinPaths } from '~/lib/utils/url_utility'; import AssigneeAvatarLink from '~/sidebar/components/assignees/assignee_avatar_link.vue'; import AssigneeAvatar from '~/sidebar/components/assignees/assignee_avatar.vue'; import userDataMock from '../../user_data_mock'; diff --git a/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js b/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js index d60ae17733b..e925da0e4c2 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import AssigneeAvatar from '~/sidebar/components/assignees/assignee_avatar.vue'; import { TEST_HOST } from 'helpers/test_constants'; +import AssigneeAvatar from '~/sidebar/components/assignees/assignee_avatar.vue'; import userDataMock from '../../user_data_mock'; const TEST_AVATAR = `${TEST_HOST}/avatar.png`; diff --git a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js index c88ae196875..6aa7b166804 100644 --- a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js +++ b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; +import UsersMockHelper from 'helpers/user_mock_data_helper'; import CollapsedAssigneeList from '~/sidebar/components/assignees/collapsed_assignee_list.vue'; import CollapsedAssignee from '~/sidebar/components/assignees/collapsed_assignee.vue'; -import UsersMockHelper from 'helpers/user_mock_data_helper'; const DEFAULT_MAX_COUNTER = 99; diff --git a/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js b/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js index 1de21f30d21..8381cc25db4 100644 --- a/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js +++ b/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js @@ -1,7 +1,7 @@ import { mount } from '@vue/test-utils'; +import { TEST_HOST } from 'helpers/test_constants'; import UncollapsedAssigneeList from '~/sidebar/components/assignees/uncollapsed_assignee_list.vue'; import AssigneeAvatarLink from '~/sidebar/components/assignees/assignee_avatar_link.vue'; -import { TEST_HOST } from 'helpers/test_constants'; import userDataMock from '../../user_data_mock'; import UsersMockHelper from '../../../helpers/user_mock_data_helper'; diff --git a/spec/frontend/sidebar/confidential_issue_sidebar_spec.js b/spec/frontend/sidebar/confidential_issue_sidebar_spec.js index 1ec5a94ba68..68dde14880a 100644 --- a/spec/frontend/sidebar/confidential_issue_sidebar_spec.js +++ b/spec/frontend/sidebar/confidential_issue_sidebar_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import ConfidentialIssueSidebar from '~/sidebar/components/confidential/confidential_issue_sidebar.vue'; import { mockTracking, triggerEvent } from 'helpers/tracking_helper'; +import ConfidentialIssueSidebar from '~/sidebar/components/confidential/confidential_issue_sidebar.vue'; import EditForm from '~/sidebar/components/confidential/edit_form.vue'; import SidebarService from '~/sidebar/services/sidebar_service'; import createFlash from '~/flash'; diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js index 0b9cfa44409..b39b7375d80 100644 --- a/spec/frontend/test_setup.js +++ b/spec/frontend/test_setup.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import * as jqueryMatchers from 'custom-jquery-matchers'; import $ from 'jquery'; -import Translate from '~/vue_shared/translate'; import { config as testUtilsConfig } from '@vue/test-utils'; +import Translate from '~/vue_shared/translate'; import { initializeTestTimeout } from './helpers/timeout'; import { getJSONFixture, loadHTMLFixture, setHTMLFixture } from './helpers/fixtures'; import { setupManualMocks } from './mocks/mocks_helper'; diff --git a/spec/frontend/transfer_edit_spec.js b/spec/frontend/transfer_edit_spec.js index 3a1ede49068..dc9455a569d 100644 --- a/spec/frontend/transfer_edit_spec.js +++ b/spec/frontend/transfer_edit_spec.js @@ -1,7 +1,7 @@ import $ from 'jquery'; -import setupTransferEdit from '~/transfer_edit'; import { loadHTMLFixture } from 'helpers/fixtures'; +import setupTransferEdit from '~/transfer_edit'; describe('setupTransferEdit', () => { const formSelector = '.js-project-transfer-form'; diff --git a/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js b/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js index 7d593a77bf3..f979d173eff 100644 --- a/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js +++ b/spec/frontend/vue_mr_widget/components/artifacts_list_app_spec.js @@ -1,9 +1,9 @@ import { mount, createLocalVue } from '@vue/test-utils'; import Vuex from 'vuex'; import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; import { GlLoadingIcon } from '@gitlab/ui'; import { TEST_HOST } from 'helpers/test_constants'; +import axios from '~/lib/utils/axios_utils'; import ArtifactsListApp from '~/vue_merge_request_widget/components/artifacts_list_app.vue'; import createStore from '~/vue_merge_request_widget/stores/artifacts_list'; import { artifactsList } from './mock_data'; diff --git a/spec/frontend/vue_mr_widget/components/mr_collapsible_extension_spec.js b/spec/frontend/vue_mr_widget/components/mr_collapsible_extension_spec.js index ee107f297ef..5f101ba4cf6 100644 --- a/spec/frontend/vue_mr_widget/components/mr_collapsible_extension_spec.js +++ b/spec/frontend/vue_mr_widget/components/mr_collapsible_extension_spec.js @@ -1,6 +1,6 @@ import { mount } from '@vue/test-utils'; -import MrCollapsibleSection from '~/vue_merge_request_widget/components/mr_collapsible_extension.vue'; import { GlLoadingIcon } from '@gitlab/ui'; +import MrCollapsibleSection from '~/vue_merge_request_widget/components/mr_collapsible_extension.vue'; describe('Merge Request Collapsible Extension', () => { let wrapper; diff --git a/spec/frontend/vue_shared/components/content_viewer/viewers/image_viewer_spec.js b/spec/frontend/vue_shared/components/content_viewer/viewers/image_viewer_spec.js index 3ad8f3aec7c..ef785b9f0f5 100644 --- a/spec/frontend/vue_shared/components/content_viewer/viewers/image_viewer_spec.js +++ b/spec/frontend/vue_shared/components/content_viewer/viewers/image_viewer_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; -import ImageViewer from '~/vue_shared/components/content_viewer/viewers/image_viewer.vue'; import { GREEN_BOX_IMAGE_URL } from 'spec/test_constants'; +import ImageViewer from '~/vue_shared/components/content_viewer/viewers/image_viewer.vue'; describe('Image Viewer', () => { const requiredProps = { diff --git a/spec/frontend/vue_shared/components/gl_toggle_vuex_spec.js b/spec/frontend/vue_shared/components/gl_toggle_vuex_spec.js index f076c45e56c..d9badffb50d 100644 --- a/spec/frontend/vue_shared/components/gl_toggle_vuex_spec.js +++ b/spec/frontend/vue_shared/components/gl_toggle_vuex_spec.js @@ -1,7 +1,7 @@ import Vuex from 'vuex'; -import GlToggleVuex from '~/vue_shared/components/gl_toggle_vuex.vue'; import { GlToggle } from '@gitlab/ui'; import { mount, createLocalVue } from '@vue/test-utils'; +import GlToggleVuex from '~/vue_shared/components/gl_toggle_vuex.vue'; const localVue = createLocalVue(); localVue.use(Vuex); diff --git a/spec/frontend/vue_shared/components/issue/issue_warning_spec.js b/spec/frontend/vue_shared/components/issue/issue_warning_spec.js index 63880b85625..7bb054b4e6c 100644 --- a/spec/frontend/vue_shared/components/issue/issue_warning_spec.js +++ b/spec/frontend/vue_shared/components/issue/issue_warning_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import issueWarning from '~/vue_shared/components/issue/issue_warning.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import issueWarning from '~/vue_shared/components/issue/issue_warning.vue'; const IssueWarning = Vue.extend(issueWarning); diff --git a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js index cc9b569793d..1500bdf9c70 100644 --- a/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js +++ b/spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import { formatDate } from '~/lib/utils/datetime_utility'; import { mount, createLocalVue } from '@vue/test-utils'; +import { formatDate } from '~/lib/utils/datetime_utility'; import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue'; import { defaultAssignees, diff --git a/spec/frontend/vue_shared/components/markdown/field_spec.js b/spec/frontend/vue_shared/components/markdown/field_spec.js index b006f72b8ee..4cd0f62da0f 100644 --- a/spec/frontend/vue_shared/components/markdown/field_spec.js +++ b/spec/frontend/vue_shared/components/markdown/field_spec.js @@ -1,9 +1,9 @@ import { mount, createLocalVue } from '@vue/test-utils'; -import fieldComponent from '~/vue_shared/components/markdown/field.vue'; import { TEST_HOST } from 'spec/test_constants'; import AxiosMockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; import $ from 'jquery'; +import axios from '~/lib/utils/axios_utils'; +import fieldComponent from '~/vue_shared/components/markdown/field.vue'; const markdownPreviewPath = `${TEST_HOST}/preview`; const markdownDocsPath = `${TEST_HOST}/docs`; diff --git a/spec/frontend/vue_shared/components/memory_graph_spec.js b/spec/frontend/vue_shared/components/memory_graph_spec.js index 93f32f0b278..9a5ee544d8f 100644 --- a/spec/frontend/vue_shared/components/memory_graph_spec.js +++ b/spec/frontend/vue_shared/components/memory_graph_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import { shallowMount } from '@vue/test-utils'; -import MemoryGraph from '~/vue_shared/components/memory_graph.vue'; import { GlSparklineChart } from '@gitlab/ui/dist/charts'; +import MemoryGraph from '~/vue_shared/components/memory_graph.vue'; describe('MemoryGraph', () => { const Component = Vue.extend(MemoryGraph); diff --git a/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js index 976e38c15ee..81c5cd6a057 100644 --- a/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js +++ b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import placeholderSystemNote from '~/vue_shared/components/notes/placeholder_system_note.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import placeholderSystemNote from '~/vue_shared/components/notes/placeholder_system_note.vue'; describe('placeholder system note component', () => { let PlaceholderSystemNote; diff --git a/spec/frontend/vue_shared/components/paginated_list_spec.js b/spec/frontend/vue_shared/components/paginated_list_spec.js index 92b48ce9974..4e1b29a4d3a 100644 --- a/spec/frontend/vue_shared/components/paginated_list_spec.js +++ b/spec/frontend/vue_shared/components/paginated_list_spec.js @@ -1,6 +1,6 @@ +import { mount } from '@vue/test-utils'; import PaginatedList from '~/vue_shared/components/paginated_list.vue'; import { PREV, NEXT } from '~/vue_shared/components/pagination/constants'; -import { mount } from '@vue/test-utils'; describe('Pagination links component', () => { let wrapper; diff --git a/spec/frontend/vue_shared/components/resizable_chart_container_spec.js b/spec/frontend/vue_shared/components/resizable_chart_container_spec.js index 8f533e8ab24..552cfade7b6 100644 --- a/spec/frontend/vue_shared/components/resizable_chart_container_spec.js +++ b/spec/frontend/vue_shared/components/resizable_chart_container_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import { mount } from '@vue/test-utils'; -import ResizableChartContainer from '~/vue_shared/components/resizable_chart/resizable_chart_container.vue'; import $ from 'jquery'; +import ResizableChartContainer from '~/vue_shared/components/resizable_chart/resizable_chart_container.vue'; jest.mock('~/lib/utils/common_utils', () => ({ debounceByAnimationFrame(callback) { diff --git a/spec/frontend/vue_shared/components/sidebar/collapsed_calendar_icon_spec.js b/spec/frontend/vue_shared/components/sidebar/collapsed_calendar_icon_spec.js index 691ebe43d6b..31316a93ecd 100644 --- a/spec/frontend/vue_shared/components/sidebar/collapsed_calendar_icon_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/collapsed_calendar_icon_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import collapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import collapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue'; describe('collapsedCalendarIcon', () => { let vm; diff --git a/spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js b/spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js index 062ebfa01c9..65255968bc7 100644 --- a/spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import collapsedGroupedDatePicker from '~/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import collapsedGroupedDatePicker from '~/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue'; describe('collapsedGroupedDatePicker', () => { let vm; diff --git a/spec/frontend/vue_shared/components/sidebar/date_picker_spec.js b/spec/frontend/vue_shared/components/sidebar/date_picker_spec.js index 5e2bca6efc9..198af09c9f5 100644 --- a/spec/frontend/vue_shared/components/sidebar/date_picker_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/date_picker_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import sidebarDatePicker from '~/vue_shared/components/sidebar/date_picker.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import sidebarDatePicker from '~/vue_shared/components/sidebar/date_picker.vue'; describe('sidebarDatePicker', () => { let vm; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js index 91865dcea0a..da22034a8db 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; +import { shallowMount } from '@vue/test-utils'; import LabelsSelect from '~/labels_select'; import BaseComponent from '~/vue_shared/components/sidebar/labels_select/base.vue'; -import { shallowMount } from '@vue/test-utils'; import { mockConfig, mockLabels, diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_button_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_button_spec.js index bb33dc6ea0f..e2e11c94c0d 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_button_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_button_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import dropdownButtonComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_button.vue'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { mockConfig, mockLabels, diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js index 1c25d42682c..d0299523137 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import dropdownCreateLabelComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { mockSuggestedColors } from '../../../../../javascripts/vue_shared/components/sidebar/labels_select/mock_data'; const createComponent = headerTitle => { diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_footer_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_footer_spec.js index 989901a0012..784bbaf8e6a 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_footer_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_footer_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import dropdownFooterComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_footer.vue'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { mockConfig } from '../../../../../javascripts/vue_shared/components/sidebar/labels_select/mock_data'; const createComponent = ( diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js index c36a82e1a35..2e721d75b40 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_header_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import dropdownHeaderComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_header.vue'; - import mountComponent from 'helpers/vue_mount_component_helper'; +import dropdownHeaderComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_header.vue'; const createComponent = () => { const Component = Vue.extend(dropdownHeaderComponent); diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_search_input_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_search_input_spec.js index 2fffb2e495e..035af946d75 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_search_input_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_search_input_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import dropdownSearchInputComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue'; - import mountComponent from 'helpers/vue_mount_component_helper'; +import dropdownSearchInputComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue'; const createComponent = () => { const Component = Vue.extend(dropdownSearchInputComponent); diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_title_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_title_spec.js index 1616e657c81..2fffb31acf5 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_title_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_title_spec.js @@ -1,8 +1,7 @@ import Vue from 'vue'; -import dropdownTitleComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_title.vue'; - import mountComponent from 'helpers/vue_mount_component_helper'; +import dropdownTitleComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_title.vue'; const createComponent = (canEdit = true) => { const Component = Vue.extend(dropdownTitleComponent); diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js index 517f2c01c46..887c04268d1 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import dropdownValueCollapsedComponent from '~/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue'; -import mountComponent from 'helpers/vue_mount_component_helper'; import { mockLabels } from '../../../../../javascripts/vue_shared/components/sidebar/labels_select/mock_data'; const createComponent = (labels = mockLabels) => { diff --git a/spec/frontend/vue_shared/components/sidebar/toggle_sidebar_spec.js b/spec/frontend/vue_shared/components/sidebar/toggle_sidebar_spec.js index 5cf25ca6f81..4342f5e2105 100644 --- a/spec/frontend/vue_shared/components/sidebar/toggle_sidebar_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/toggle_sidebar_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import toggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue'; import mountComponent from 'helpers/vue_mount_component_helper'; +import toggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue'; describe('toggleSidebar', () => { let vm; diff --git a/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js b/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js index 2f87359a4a6..e76b2ca2d65 100644 --- a/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js +++ b/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; +import defaultAvatarUrl from 'images/no_avatar.png'; import { placeholderImage } from '~/lazy_loader'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; -import defaultAvatarUrl from 'images/no_avatar.png'; jest.mock('images/no_avatar.png', () => 'default-avatar-url'); diff --git a/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js b/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js index bdd18110629..7f5df02d51d 100644 --- a/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js +++ b/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js @@ -2,9 +2,9 @@ import _ from 'underscore'; import { trimText } from 'helpers/text_helper'; import { shallowMount } from '@vue/test-utils'; import { GlLink } from '@gitlab/ui'; +import { TEST_HOST } from 'spec/test_constants'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; -import { TEST_HOST } from 'spec/test_constants'; describe('User Avatar Link Component', () => { let wrapper; diff --git a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js index 2750b54521a..f2e743cc1f6 100644 --- a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js +++ b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js @@ -1,7 +1,7 @@ -import UserPopover from '~/vue_shared/components/user_popover/user_popover.vue'; import { GlSkeletonLoading } from '@gitlab/ui'; -import Icon from '~/vue_shared/components/icon.vue'; import { shallowMount } from '@vue/test-utils'; +import UserPopover from '~/vue_shared/components/user_popover/user_popover.vue'; +import Icon from '~/vue_shared/components/icon.vue'; const DEFAULT_PROPS = { loaded: true, diff --git a/spec/javascripts/badges/components/badge_form_spec.js b/spec/javascripts/badges/components/badge_form_spec.js index b40afc40ca0..c7aa7fa63b1 100644 --- a/spec/javascripts/badges/components/badge_form_spec.js +++ b/spec/javascripts/badges/components/badge_form_spec.js @@ -1,10 +1,10 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import axios from '~/lib/utils/axios_utils'; import store from '~/badges/store'; import createEmptyBadge from '~/badges/empty_badge'; import BadgeForm from '~/badges/components/badge_form.vue'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { DUMMY_IMAGE_URL, TEST_HOST } from '../../test_constants'; // avoid preview background process diff --git a/spec/javascripts/badges/components/badge_list_row_spec.js b/spec/javascripts/badges/components/badge_list_row_spec.js index 34a92cc2018..d1434737085 100644 --- a/spec/javascripts/badges/components/badge_list_row_spec.js +++ b/spec/javascripts/badges/components/badge_list_row_spec.js @@ -1,9 +1,9 @@ import $ from 'jquery'; import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { GROUP_BADGE, PROJECT_BADGE } from '~/badges/constants'; import store from '~/badges/store'; import BadgeListRow from '~/badges/components/badge_list_row.vue'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createDummyBadge } from '../dummy_badge'; describe('BadgeListRow component', () => { diff --git a/spec/javascripts/badges/components/badge_list_spec.js b/spec/javascripts/badges/components/badge_list_spec.js index 2fa807657de..3af194454e3 100644 --- a/spec/javascripts/badges/components/badge_list_spec.js +++ b/spec/javascripts/badges/components/badge_list_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { GROUP_BADGE, PROJECT_BADGE } from '~/badges/constants'; import store from '~/badges/store'; import BadgeList from '~/badges/components/badge_list.vue'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createDummyBadge } from '../dummy_badge'; describe('BadgeList component', () => { diff --git a/spec/javascripts/badges/components/badge_settings_spec.js b/spec/javascripts/badges/components/badge_settings_spec.js index aca26b736ca..479a905661b 100644 --- a/spec/javascripts/badges/components/badge_settings_spec.js +++ b/spec/javascripts/badges/components/badge_settings_spec.js @@ -1,8 +1,8 @@ import $ from 'jquery'; import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import store from '~/badges/store'; import BadgeSettings from '~/badges/components/badge_settings.vue'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createDummyBadge } from '../dummy_badge'; describe('BadgeSettings component', () => { diff --git a/spec/javascripts/badges/components/badge_spec.js b/spec/javascripts/badges/components/badge_spec.js index c82a03a628a..14490b1bbd1 100644 --- a/spec/javascripts/badges/components/badge_spec.js +++ b/spec/javascripts/badges/components/badge_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import Badge from '~/badges/components/badge.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { DUMMY_IMAGE_URL, TEST_HOST } from 'spec/test_constants'; +import Badge from '~/badges/components/badge.vue'; describe('Badge component', () => { const Component = Vue.extend(Badge); diff --git a/spec/javascripts/badges/dummy_badge.js b/spec/javascripts/badges/dummy_badge.js index ffc21c960b9..e8a460cdc76 100644 --- a/spec/javascripts/badges/dummy_badge.js +++ b/spec/javascripts/badges/dummy_badge.js @@ -1,6 +1,6 @@ import _ from 'underscore'; -import { PROJECT_BADGE } from '~/badges/constants'; import { DUMMY_IMAGE_URL, TEST_HOST } from 'spec/test_constants'; +import { PROJECT_BADGE } from '~/badges/constants'; export const createDummyBadge = () => { const id = _.uniqueId(); diff --git a/spec/javascripts/badges/store/actions_spec.js b/spec/javascripts/badges/store/actions_spec.js index a4cdff8129d..d92155d59b5 100644 --- a/spec/javascripts/badges/store/actions_spec.js +++ b/spec/javascripts/badges/store/actions_spec.js @@ -1,10 +1,10 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'spec/test_constants'; +import testAction from 'spec/helpers/vuex_action_helper'; +import axios from '~/lib/utils/axios_utils'; import actions, { transformBackendBadge } from '~/badges/store/actions'; import mutationTypes from '~/badges/store/mutation_types'; import createState from '~/badges/store/state'; -import { TEST_HOST } from 'spec/test_constants'; -import testAction from 'spec/helpers/vuex_action_helper'; import { createDummyBadge, createDummyBadgeResponse } from '../dummy_badge'; describe('Badges store actions', () => { diff --git a/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js b/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js index 33210794ba1..0c2b7b7392d 100644 --- a/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js +++ b/spec/javascripts/blob/balsamiq/balsamiq_viewer_integration_spec.js @@ -1,5 +1,5 @@ -import BalsamiqViewer from '~/blob/balsamiq/balsamiq_viewer'; import { FIXTURES_PATH } from 'spec/test_constants'; +import BalsamiqViewer from '~/blob/balsamiq/balsamiq_viewer'; const bmprPath = `${FIXTURES_PATH}/blob/balsamiq/test.bmpr`; diff --git a/spec/javascripts/blob/pdf/index_spec.js b/spec/javascripts/blob/pdf/index_spec.js index 6fa3890483c..6ea097da742 100644 --- a/spec/javascripts/blob/pdf/index_spec.js +++ b/spec/javascripts/blob/pdf/index_spec.js @@ -1,5 +1,5 @@ -import renderPDF from '~/blob/pdf'; import { FIXTURES_PATH } from 'spec/test_constants'; +import renderPDF from '~/blob/pdf'; const testPDF = `${FIXTURES_PATH}/blob/pdf/test.pdf`; diff --git a/spec/javascripts/blob_edit/blob_bundle_spec.js b/spec/javascripts/blob_edit/blob_bundle_spec.js index 48af0148e3f..06c6a603155 100644 --- a/spec/javascripts/blob_edit/blob_bundle_spec.js +++ b/spec/javascripts/blob_edit/blob_bundle_spec.js @@ -1,5 +1,5 @@ -import blobBundle from '~/blob_edit/blob_bundle'; import $ from 'jquery'; +import blobBundle from '~/blob_edit/blob_bundle'; describe('BlobBundle', () => { beforeEach(() => { diff --git a/spec/javascripts/boards/board_list_common_spec.js b/spec/javascripts/boards/board_list_common_spec.js index a92d885790d..b51a82f2a35 100644 --- a/spec/javascripts/boards/board_list_common_spec.js +++ b/spec/javascripts/boards/board_list_common_spec.js @@ -3,8 +3,8 @@ import MockAdapter from 'axios-mock-adapter'; import Vue from 'vue'; -import axios from '~/lib/utils/axios_utils'; import Sortable from 'sortablejs'; +import axios from '~/lib/utils/axios_utils'; import BoardList from '~/boards/components/board_list.vue'; import '~/boards/models/issue'; diff --git a/spec/javascripts/boards/boards_store_spec.js b/spec/javascripts/boards/boards_store_spec.js index 278930789e1..dfc74faf63c 100644 --- a/spec/javascripts/boards/boards_store_spec.js +++ b/spec/javascripts/boards/boards_store_spec.js @@ -1,8 +1,8 @@ /* global ListIssue */ import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; import Cookies from 'js-cookie'; +import axios from '~/lib/utils/axios_utils'; import '~/boards/models/label'; import '~/boards/models/assignee'; diff --git a/spec/javascripts/boards/components/board_form_spec.js b/spec/javascripts/boards/components/board_form_spec.js index e9014156a98..fd1c79d44e1 100644 --- a/spec/javascripts/boards/components/board_form_spec.js +++ b/spec/javascripts/boards/components/board_form_spec.js @@ -1,8 +1,8 @@ import $ from 'jquery'; import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import boardsStore from '~/boards/stores/boards_store'; import boardForm from '~/boards/components/board_form.vue'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; describe('board_form.vue', () => { const props = { diff --git a/spec/javascripts/boards/components/boards_selector_spec.js b/spec/javascripts/boards/components/boards_selector_spec.js index d1f36a0a652..16ec3b801cd 100644 --- a/spec/javascripts/boards/components/boards_selector_spec.js +++ b/spec/javascripts/boards/components/boards_selector_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import BoardsSelector from '~/boards/components/boards_selector.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { TEST_HOST } from 'spec/test_constants'; +import BoardsSelector from '~/boards/components/boards_selector.vue'; import boardsStore from '~/boards/stores/boards_store'; const throttleDuration = 1; diff --git a/spec/javascripts/boards/components/issue_card_inner_scoped_label_spec.js b/spec/javascripts/boards/components/issue_card_inner_scoped_label_spec.js index c62c5b9962d..6ac51ebdb2d 100644 --- a/spec/javascripts/boards/components/issue_card_inner_scoped_label_spec.js +++ b/spec/javascripts/boards/components/issue_card_inner_scoped_label_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import IssueCardInnerScopedLabel from '~/boards/components/issue_card_inner_scoped_label.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import IssueCardInnerScopedLabel from '~/boards/components/issue_card_inner_scoped_label.vue'; describe('IssueCardInnerScopedLabel Component', () => { let vm; diff --git a/spec/javascripts/boards/list_spec.js b/spec/javascripts/boards/list_spec.js index 374e7d76b1c..c340b62730c 100644 --- a/spec/javascripts/boards/list_spec.js +++ b/spec/javascripts/boards/list_spec.js @@ -4,8 +4,8 @@ /* global ListLabel */ import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; import _ from 'underscore'; +import axios from '~/lib/utils/axios_utils'; import '~/boards/models/label'; import '~/boards/models/assignee'; import '~/boards/models/issue'; diff --git a/spec/javascripts/ci_variable_list/ci_variable_list_spec.js b/spec/javascripts/ci_variable_list/ci_variable_list_spec.js index c8d6f789ed0..180ba979325 100644 --- a/spec/javascripts/ci_variable_list/ci_variable_list_spec.js +++ b/spec/javascripts/ci_variable_list/ci_variable_list_spec.js @@ -1,6 +1,6 @@ import $ from 'jquery'; -import VariableList from '~/ci_variable_list/ci_variable_list'; import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; +import VariableList from '~/ci_variable_list/ci_variable_list'; const HIDE_CLASS = 'hide'; diff --git a/spec/javascripts/commit/pipelines/pipelines_spec.js b/spec/javascripts/commit/pipelines/pipelines_spec.js index 46aca2b7f03..e2bbada3a49 100644 --- a/spec/javascripts/commit/pipelines/pipelines_spec.js +++ b/spec/javascripts/commit/pipelines/pipelines_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import axios from '~/lib/utils/axios_utils'; import Api from '~/api'; import pipelinesTable from '~/commit/pipelines/pipelines_table.vue'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; describe('Pipelines table in Commits and Merge requests', function() { const jsonFixtureName = 'pipelines/pipelines.json'; diff --git a/spec/javascripts/create_cluster/gke_cluster/components/gke_machine_type_dropdown_spec.js b/spec/javascripts/create_cluster/gke_cluster/components/gke_machine_type_dropdown_spec.js index 7aa7aa9a112..e687040ddf9 100644 --- a/spec/javascripts/create_cluster/gke_cluster/components/gke_machine_type_dropdown_spec.js +++ b/spec/javascripts/create_cluster/gke_cluster/components/gke_machine_type_dropdown_spec.js @@ -1,4 +1,5 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import GkeMachineTypeDropdown from '~/create_cluster/gke_cluster/components/gke_machine_type_dropdown.vue'; import { createStore } from '~/create_cluster/gke_cluster/store'; import { @@ -7,7 +8,6 @@ import { SET_ZONE, SET_MACHINE_TYPES, } from '~/create_cluster/gke_cluster/store/mutation_types'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { selectedZoneMock, selectedProjectMock, diff --git a/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js b/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js index 016ecfb35b8..4c89124454e 100644 --- a/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js +++ b/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import GkeProjectIdDropdown from '~/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue'; import { createStore } from '~/create_cluster/gke_cluster/store'; import { SET_PROJECTS } from '~/create_cluster/gke_cluster/store/mutation_types'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { emptyProjectMock, selectedProjectMock } from '../mock_data'; import { gapi } from '../helpers'; diff --git a/spec/javascripts/create_cluster/gke_cluster/components/gke_zone_dropdown_spec.js b/spec/javascripts/create_cluster/gke_cluster/components/gke_zone_dropdown_spec.js index 9cb9419e433..b2a7443422a 100644 --- a/spec/javascripts/create_cluster/gke_cluster/components/gke_zone_dropdown_spec.js +++ b/spec/javascripts/create_cluster/gke_cluster/components/gke_zone_dropdown_spec.js @@ -1,4 +1,5 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import GkeZoneDropdown from '~/create_cluster/gke_cluster/components/gke_zone_dropdown.vue'; import { createStore } from '~/create_cluster/gke_cluster/store'; import { @@ -6,7 +7,6 @@ import { SET_ZONES, SET_PROJECT_BILLING_STATUS, } from '~/create_cluster/gke_cluster/store/mutation_types'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { selectedZoneMock, selectedProjectMock, gapiZonesResponseMock } from '../mock_data'; const componentConfig = { diff --git a/spec/javascripts/cycle_analytics/banner_spec.js b/spec/javascripts/cycle_analytics/banner_spec.js index 3ce2c3c4f06..86408c18dda 100644 --- a/spec/javascripts/cycle_analytics/banner_spec.js +++ b/spec/javascripts/cycle_analytics/banner_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import banner from '~/cycle_analytics/components/banner.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import banner from '~/cycle_analytics/components/banner.vue'; describe('Cycle analytics banner', () => { let vm; diff --git a/spec/javascripts/cycle_analytics/total_time_component_spec.js b/spec/javascripts/cycle_analytics/total_time_component_spec.js index 691e03cb8a6..0269fc1b002 100644 --- a/spec/javascripts/cycle_analytics/total_time_component_spec.js +++ b/spec/javascripts/cycle_analytics/total_time_component_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import component from '~/cycle_analytics/components/total_time_component.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import component from '~/cycle_analytics/components/total_time_component.vue'; describe('Total time component', () => { let vm; diff --git a/spec/javascripts/deploy_keys/components/app_spec.js b/spec/javascripts/deploy_keys/components/app_spec.js index f81c0cb7124..c9a9814d122 100644 --- a/spec/javascripts/deploy_keys/components/app_spec.js +++ b/spec/javascripts/deploy_keys/components/app_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'spec/test_constants'; import axios from '~/lib/utils/axios_utils'; import eventHub from '~/deploy_keys/eventhub'; import deployKeysApp from '~/deploy_keys/components/app.vue'; -import { TEST_HOST } from 'spec/test_constants'; describe('Deploy keys app component', () => { const data = getJSONFixture('deploy_keys/keys.json'); diff --git a/spec/javascripts/diffs/components/app_spec.js b/spec/javascripts/diffs/components/app_spec.js index 7f028fb67c9..dbeff7284ce 100644 --- a/spec/javascripts/diffs/components/app_spec.js +++ b/spec/javascripts/diffs/components/app_spec.js @@ -2,10 +2,10 @@ import Vuex from 'vuex'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import { GlLoadingIcon } from '@gitlab/ui'; import { TEST_HOST } from 'spec/test_constants'; +import Mousetrap from 'mousetrap'; import App from '~/diffs/components/app.vue'; import NoChanges from '~/diffs/components/no_changes.vue'; import DiffFile from '~/diffs/components/diff_file.vue'; -import Mousetrap from 'mousetrap'; import CompareVersions from '~/diffs/components/compare_versions.vue'; import HiddenFilesWarning from '~/diffs/components/hidden_files_warning.vue'; import CommitWidget from '~/diffs/components/commit_widget.vue'; diff --git a/spec/javascripts/diffs/components/diff_expansion_cell_spec.js b/spec/javascripts/diffs/components/diff_expansion_cell_spec.js index 63c50c09fce..e8ff6778512 100644 --- a/spec/javascripts/diffs/components/diff_expansion_cell_spec.js +++ b/spec/javascripts/diffs/components/diff_expansion_cell_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import DiffExpansionCell from '~/diffs/components/diff_expansion_cell.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; const EXPAND_UP_CLASS = '.js-unfold'; diff --git a/spec/javascripts/diffs/components/diff_file_spec.js b/spec/javascripts/diffs/components/diff_file_spec.js index 6ffdb6ba85d..b4425b8e8a2 100644 --- a/spec/javascripts/diffs/components/diff_file_spec.js +++ b/spec/javascripts/diffs/components/diff_file_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; -import DiffFileComponent from '~/diffs/components/diff_file.vue'; -import { diffViewerModes, diffViewerErrors } from '~/ide/constants'; import { createStore } from 'ee_else_ce/mr_notes/stores'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; +import DiffFileComponent from '~/diffs/components/diff_file.vue'; +import { diffViewerModes, diffViewerErrors } from '~/ide/constants'; import diffFileMockDataReadable from '../mock_data/diff_file'; import diffFileMockDataUnreadable from '../mock_data/diff_file_unreadable'; diff --git a/spec/javascripts/diffs/components/diff_line_gutter_content_spec.js b/spec/javascripts/diffs/components/diff_line_gutter_content_spec.js index 6bb704658fb..8d20be9971d 100644 --- a/spec/javascripts/diffs/components/diff_line_gutter_content_spec.js +++ b/spec/javascripts/diffs/components/diff_line_gutter_content_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import DiffLineGutterContent from '~/diffs/components/diff_line_gutter_content.vue'; import { createStore } from '~/mr_notes/stores'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import discussionsMockData from '../mock_data/diff_discussions'; import diffFileMockData from '../mock_data/diff_file'; diff --git a/spec/javascripts/diffs/components/diff_line_note_form_spec.js b/spec/javascripts/diffs/components/diff_line_note_form_spec.js index 237cfccfa29..09263e5ce83 100644 --- a/spec/javascripts/diffs/components/diff_line_note_form_spec.js +++ b/spec/javascripts/diffs/components/diff_line_note_form_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import DiffLineNoteForm from '~/diffs/components/diff_line_note_form.vue'; import { createStore } from '~/mr_notes/stores'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; import { noteableDataMock } from '../../notes/mock_data'; diff --git a/spec/javascripts/diffs/components/diff_table_cell_spec.js b/spec/javascripts/diffs/components/diff_table_cell_spec.js index a5a042c577c..f91e3b56805 100644 --- a/spec/javascripts/diffs/components/diff_table_cell_spec.js +++ b/spec/javascripts/diffs/components/diff_table_cell_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import DiffTableCell from '~/diffs/components/diff_table_cell.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; describe('DiffTableCell', () => { diff --git a/spec/javascripts/diffs/components/file_row_stats_spec.js b/spec/javascripts/diffs/components/file_row_stats_spec.js index a8a7f3f1d82..59c5e592a59 100644 --- a/spec/javascripts/diffs/components/file_row_stats_spec.js +++ b/spec/javascripts/diffs/components/file_row_stats_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import FileRowStats from '~/diffs/components/file_row_stats.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import FileRowStats from '~/diffs/components/file_row_stats.vue'; describe('Diff file row stats', () => { let Component; diff --git a/spec/javascripts/diffs/components/image_diff_overlay_spec.js b/spec/javascripts/diffs/components/image_diff_overlay_spec.js index d76ab745fe1..c2e5c6c34aa 100644 --- a/spec/javascripts/diffs/components/image_diff_overlay_spec.js +++ b/spec/javascripts/diffs/components/image_diff_overlay_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import ImageDiffOverlay from '~/diffs/components/image_diff_overlay.vue'; import { createStore } from '~/mr_notes/stores'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { imageDiffDiscussions } from '../mock_data/diff_discussions'; describe('Diffs image diff overlay component', () => { diff --git a/spec/javascripts/diffs/components/inline_diff_expansion_row_spec.js b/spec/javascripts/diffs/components/inline_diff_expansion_row_spec.js index 290b3d7c803..852b8c4fbfc 100644 --- a/spec/javascripts/diffs/components/inline_diff_expansion_row_spec.js +++ b/spec/javascripts/diffs/components/inline_diff_expansion_row_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import InlineDiffExpansionRow from '~/diffs/components/inline_diff_expansion_row.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; describe('InlineDiffExpansionRow', () => { diff --git a/spec/javascripts/diffs/components/inline_diff_table_row_spec.js b/spec/javascripts/diffs/components/inline_diff_table_row_spec.js index 0ddffe926d9..67443e9aecc 100644 --- a/spec/javascripts/diffs/components/inline_diff_table_row_spec.js +++ b/spec/javascripts/diffs/components/inline_diff_table_row_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import InlineDiffTableRow from '~/diffs/components/inline_diff_table_row.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; describe('InlineDiffTableRow', () => { diff --git a/spec/javascripts/diffs/components/inline_diff_view_spec.js b/spec/javascripts/diffs/components/inline_diff_view_spec.js index 486d9629e26..76d88d4d9f0 100644 --- a/spec/javascripts/diffs/components/inline_diff_view_spec.js +++ b/spec/javascripts/diffs/components/inline_diff_view_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import '~/behaviors/markdown/render_gfm'; -import InlineDiffView from '~/diffs/components/inline_diff_view.vue'; import { createStore } from 'ee_else_ce/mr_notes/stores'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; +import InlineDiffView from '~/diffs/components/inline_diff_view.vue'; import diffFileMockData from '../mock_data/diff_file'; import discussionsMockData from '../mock_data/diff_discussions'; diff --git a/spec/javascripts/diffs/components/parallel_diff_expansion_row_spec.js b/spec/javascripts/diffs/components/parallel_diff_expansion_row_spec.js index a766ebb5efb..f6a5a1096f3 100644 --- a/spec/javascripts/diffs/components/parallel_diff_expansion_row_spec.js +++ b/spec/javascripts/diffs/components/parallel_diff_expansion_row_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import ParallelDiffExpansionRow from '~/diffs/components/parallel_diff_expansion_row.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; describe('ParallelDiffExpansionRow', () => { diff --git a/spec/javascripts/diffs/components/parallel_diff_table_row_spec.js b/spec/javascripts/diffs/components/parallel_diff_table_row_spec.js index 311eaaaa7c8..32c947bbd8e 100644 --- a/spec/javascripts/diffs/components/parallel_diff_table_row_spec.js +++ b/spec/javascripts/diffs/components/parallel_diff_table_row_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createStore } from '~/mr_notes/stores'; import ParallelDiffTableRow from '~/diffs/components/parallel_diff_table_row.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import diffFileMockData from '../mock_data/diff_file'; describe('ParallelDiffTableRow', () => { diff --git a/spec/javascripts/diffs/components/parallel_diff_view_spec.js b/spec/javascripts/diffs/components/parallel_diff_view_spec.js index 191313bf487..7daca25719b 100644 --- a/spec/javascripts/diffs/components/parallel_diff_view_spec.js +++ b/spec/javascripts/diffs/components/parallel_diff_view_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; -import ParallelDiffView from '~/diffs/components/parallel_diff_view.vue'; import { createStore } from 'ee_else_ce/mr_notes/stores'; -import * as constants from '~/diffs/constants'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; +import ParallelDiffView from '~/diffs/components/parallel_diff_view.vue'; +import * as constants from '~/diffs/constants'; import diffFileMockData from '../mock_data/diff_file'; describe('ParallelDiffView', () => { diff --git a/spec/javascripts/diffs/components/tree_list_spec.js b/spec/javascripts/diffs/components/tree_list_spec.js index cd7bf6405e5..0a6e433551c 100644 --- a/spec/javascripts/diffs/components/tree_list_spec.js +++ b/spec/javascripts/diffs/components/tree_list_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import Vuex from 'vuex'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import TreeList from '~/diffs/components/tree_list.vue'; import createStore from '~/diffs/store/modules'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; describe('Diffs tree list component', () => { let Component; diff --git a/spec/javascripts/diffs/store/actions_spec.js b/spec/javascripts/diffs/store/actions_spec.js index 12f76feb1ea..95fd43367e5 100644 --- a/spec/javascripts/diffs/store/actions_spec.js +++ b/spec/javascripts/diffs/store/actions_spec.js @@ -1,5 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import Cookies from 'js-cookie'; +import mockDiffFile from 'spec/diffs/mock_data/diff_file'; import { DIFF_VIEW_COOKIE_NAME, INLINE_DIFF_VIEW_TYPE, @@ -44,7 +45,6 @@ import actions, { import eventHub from '~/notes/event_hub'; import * as types from '~/diffs/store/mutation_types'; import axios from '~/lib/utils/axios_utils'; -import mockDiffFile from 'spec/diffs/mock_data/diff_file'; import testAction from '../../helpers/vuex_action_helper'; describe('DiffsStoreActions', () => { diff --git a/spec/javascripts/dropzone_input_spec.js b/spec/javascripts/dropzone_input_spec.js index 125dcdb3763..8d0f0d20d89 100644 --- a/spec/javascripts/dropzone_input_spec.js +++ b/spec/javascripts/dropzone_input_spec.js @@ -1,6 +1,6 @@ import $ from 'jquery'; -import dropzoneInput from '~/dropzone_input'; import { TEST_HOST } from 'spec/test_constants'; +import dropzoneInput from '~/dropzone_input'; const TEST_FILE = new File([], 'somefile.jpg'); TEST_FILE.upload = {}; diff --git a/spec/javascripts/environments/emtpy_state_spec.js b/spec/javascripts/environments/emtpy_state_spec.js index 1f986d49bc7..eec06a43a1e 100644 --- a/spec/javascripts/environments/emtpy_state_spec.js +++ b/spec/javascripts/environments/emtpy_state_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import emptyState from '~/environments/components/empty_state.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import emptyState from '~/environments/components/empty_state.vue'; describe('environments empty state', () => { let vm; diff --git a/spec/javascripts/environments/environment_actions_spec.js b/spec/javascripts/environments/environment_actions_spec.js index 787df757d32..a844660f7bf 100644 --- a/spec/javascripts/environments/environment_actions_spec.js +++ b/spec/javascripts/environments/environment_actions_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; -import eventHub from '~/environments/event_hub'; -import EnvironmentActions from '~/environments/components/environment_actions.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { TEST_HOST } from 'spec/test_constants'; +import eventHub from '~/environments/event_hub'; +import EnvironmentActions from '~/environments/components/environment_actions.vue'; describe('EnvironmentActions Component', () => { const Component = Vue.extend(EnvironmentActions); diff --git a/spec/javascripts/environments/environment_table_spec.js b/spec/javascripts/environments/environment_table_spec.js index a3f34232a85..e8c6fb1845d 100644 --- a/spec/javascripts/environments/environment_table_spec.js +++ b/spec/javascripts/environments/environment_table_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import environmentTableComp from '~/environments/components/environments_table.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import environmentTableComp from '~/environments/components/environments_table.vue'; describe('Environment table', () => { let Component; diff --git a/spec/javascripts/environments/environments_app_spec.js b/spec/javascripts/environments/environments_app_spec.js index 10d37c86ea7..9c8da4970f4 100644 --- a/spec/javascripts/environments/environments_app_spec.js +++ b/spec/javascripts/environments/environments_app_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import axios from '~/lib/utils/axios_utils'; import environmentsComponent from '~/environments/components/environments_app.vue'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { environment, folder } from './mock_data'; describe('Environment', () => { diff --git a/spec/javascripts/environments/folder/environments_folder_view_spec.js b/spec/javascripts/environments/folder/environments_folder_view_spec.js index f1c323df4be..d217bbb3078 100644 --- a/spec/javascripts/environments/folder/environments_folder_view_spec.js +++ b/spec/javascripts/environments/folder/environments_folder_view_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; -import axios from '~/lib/utils/axios_utils'; -import environmentsFolderViewComponent from '~/environments/folder/environments_folder_view.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { removeBreakLine, removeWhitespace } from 'spec/helpers/text_helper'; +import axios from '~/lib/utils/axios_utils'; +import environmentsFolderViewComponent from '~/environments/folder/environments_folder_view.vue'; import { environmentsList } from '../mock_data'; describe('Environments Folder View', () => { diff --git a/spec/javascripts/jobs/components/job_app_spec.js b/spec/javascripts/jobs/components/job_app_spec.js index 57ab1aa73f7..0fcd6080106 100644 --- a/spec/javascripts/jobs/components/job_app_spec.js +++ b/spec/javascripts/jobs/components/job_app_spec.js @@ -1,11 +1,11 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; +import { waitForMutation } from 'spec/helpers/vue_test_utils_helper'; import axios from '~/lib/utils/axios_utils'; import jobApp from '~/jobs/components/job_app.vue'; import createStore from '~/jobs/store'; import * as types from '~/jobs/store/mutation_types'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; -import { waitForMutation } from 'spec/helpers/vue_test_utils_helper'; import { resetStore } from '../store/helpers'; import job from '../mock_data'; diff --git a/spec/javascripts/jobs/components/job_container_item_spec.js b/spec/javascripts/jobs/components/job_container_item_spec.js index 2d108f1ad7f..99f6d9a14d9 100644 --- a/spec/javascripts/jobs/components/job_container_item_spec.js +++ b/spec/javascripts/jobs/components/job_container_item_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import JobContainerItem from '~/jobs/components/job_container_item.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import JobContainerItem from '~/jobs/components/job_container_item.vue'; import job from '../mock_data'; describe('JobContainerItem', () => { diff --git a/spec/javascripts/jobs/components/job_log_spec.js b/spec/javascripts/jobs/components/job_log_spec.js index 4d782e5bd0e..fcaf2b3bb64 100644 --- a/spec/javascripts/jobs/components/job_log_spec.js +++ b/spec/javascripts/jobs/components/job_log_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import component from '~/jobs/components/job_log.vue'; import createStore from '~/jobs/store'; -import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { resetStore } from '../store/helpers'; describe('Job Log', () => { diff --git a/spec/javascripts/jobs/components/stages_dropdown_spec.js b/spec/javascripts/jobs/components/stages_dropdown_spec.js index a34337310d6..e091aece564 100644 --- a/spec/javascripts/jobs/components/stages_dropdown_spec.js +++ b/spec/javascripts/jobs/components/stages_dropdown_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import component from '~/jobs/components/stages_dropdown.vue'; import { trimText } from 'spec/helpers/text_helper'; +import component from '~/jobs/components/stages_dropdown.vue'; import mountComponent from '../../helpers/vue_mount_component_helper'; describe('Stages Dropdown', () => { diff --git a/spec/javascripts/jobs/mixins/delayed_job_mixin_spec.js b/spec/javascripts/jobs/mixins/delayed_job_mixin_spec.js index 48a6b80b365..b67187f1d50 100644 --- a/spec/javascripts/jobs/mixins/delayed_job_mixin_spec.js +++ b/spec/javascripts/jobs/mixins/delayed_job_mixin_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin'; describe('DelayedJobMixin', () => { const delayedJobFixture = getJSONFixture('jobs/delayed.json'); diff --git a/spec/javascripts/jobs/store/actions_spec.js b/spec/javascripts/jobs/store/actions_spec.js index 91d1942bdbf..c0e8dbf9b22 100644 --- a/spec/javascripts/jobs/store/actions_spec.js +++ b/spec/javascripts/jobs/store/actions_spec.js @@ -1,4 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; +import testAction from 'spec/helpers/vuex_action_helper'; +import { TEST_HOST } from 'spec/test_constants'; import axios from '~/lib/utils/axios_utils'; import { setJobEndpoint, @@ -27,8 +29,6 @@ import { } from '~/jobs/store/actions'; import state from '~/jobs/store/state'; import * as types from '~/jobs/store/mutation_types'; -import testAction from 'spec/helpers/vuex_action_helper'; -import { TEST_HOST } from 'spec/test_constants'; describe('Job State actions', () => { let mockedState; diff --git a/spec/javascripts/labels_issue_sidebar_spec.js b/spec/javascripts/labels_issue_sidebar_spec.js index 5ae5643aefc..9d05bdeee20 100644 --- a/spec/javascripts/labels_issue_sidebar_spec.js +++ b/spec/javascripts/labels_issue_sidebar_spec.js @@ -2,10 +2,10 @@ import $ from 'jquery'; import MockAdapter from 'axios-mock-adapter'; +import _ from 'underscore'; import axios from '~/lib/utils/axios_utils'; import IssuableContext from '~/issuable_context'; import LabelsSelect from '~/labels_select'; -import _ from 'underscore'; import '~/gl_dropdown'; import 'select2'; diff --git a/spec/javascripts/landing_spec.js b/spec/javascripts/landing_spec.js index 2fe5a47b63e..bffef8fc64f 100644 --- a/spec/javascripts/landing_spec.js +++ b/spec/javascripts/landing_spec.js @@ -1,5 +1,5 @@ -import Landing from '~/landing'; import Cookies from 'js-cookie'; +import Landing from '~/landing'; describe('Landing', function() { describe('class constructor', function() { diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index 8956bc92e6b..484133c9ac4 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -1,6 +1,6 @@ +import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; import * as commonUtils from '~/lib/utils/common_utils'; -import MockAdapter from 'axios-mock-adapter'; import { faviconDataUrl, overlayDataUrl, faviconWithOverlayDataUrl } from './mock_data'; import breakpointInstance from '~/breakpoints'; diff --git a/spec/javascripts/notebook/cells/markdown_spec.js b/spec/javascripts/notebook/cells/markdown_spec.js index 6114ce8d51f..07b18d97cd9 100644 --- a/spec/javascripts/notebook/cells/markdown_spec.js +++ b/spec/javascripts/notebook/cells/markdown_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import MarkdownComponent from '~/notebook/cells/markdown.vue'; import katex from 'katex'; +import MarkdownComponent from '~/notebook/cells/markdown.vue'; const Component = Vue.extend(MarkdownComponent); diff --git a/spec/javascripts/notes/components/diff_with_note_spec.js b/spec/javascripts/notes/components/diff_with_note_spec.js index f849fe9d8bb..573aac2c3e0 100644 --- a/spec/javascripts/notes/components/diff_with_note_spec.js +++ b/spec/javascripts/notes/components/diff_with_note_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { mountComponentWithStore } from 'spec/helpers'; import DiffWithNote from '~/notes/components/diff_with_note.vue'; import { createStore } from '~/mr_notes/stores'; -import { mountComponentWithStore } from 'spec/helpers'; const discussionFixture = 'merge_requests/diff_discussion.json'; const imageDiscussionFixture = 'merge_requests/image_diff_discussion.json'; diff --git a/spec/javascripts/notes/components/discussion_counter_spec.js b/spec/javascripts/notes/components/discussion_counter_spec.js index 2ad9428dd6f..de1fd87517a 100644 --- a/spec/javascripts/notes/components/discussion_counter_spec.js +++ b/spec/javascripts/notes/components/discussion_counter_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import createStore from '~/notes/stores'; import DiscussionCounter from '~/notes/components/discussion_counter.vue'; -import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { noteableDataMock, discussionMock, notesDataMock } from '../mock_data'; describe('DiscussionCounter component', () => { diff --git a/spec/javascripts/notes/components/discussion_resolve_with_issue_button_spec.js b/spec/javascripts/notes/components/discussion_resolve_with_issue_button_spec.js index b2a91c9919a..3be1f0be0d0 100644 --- a/spec/javascripts/notes/components/discussion_resolve_with_issue_button_spec.js +++ b/spec/javascripts/notes/components/discussion_resolve_with_issue_button_spec.js @@ -1,7 +1,7 @@ import { GlButton } from '@gitlab/ui'; -import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import { TEST_HOST } from 'spec/test_constants'; +import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue'; const localVue = createLocalVue(); diff --git a/spec/javascripts/notes/components/note_actions_spec.js b/spec/javascripts/notes/components/note_actions_spec.js index 3439873168c..2e0694869ba 100644 --- a/spec/javascripts/notes/components/note_actions_spec.js +++ b/spec/javascripts/notes/components/note_actions_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import { shallowMount, createLocalVue, createWrapper } from '@vue/test-utils'; +import { TEST_HOST } from 'spec/test_constants'; import createStore from '~/notes/stores'; import noteActions from '~/notes/components/note_actions.vue'; -import { TEST_HOST } from 'spec/test_constants'; import { userDataMock } from '../mock_data'; describe('noteActions', () => { diff --git a/spec/javascripts/notes/components/toggle_replies_widget_spec.js b/spec/javascripts/notes/components/toggle_replies_widget_spec.js index 2ead8cc6e6a..8485ec0262f 100644 --- a/spec/javascripts/notes/components/toggle_replies_widget_spec.js +++ b/spec/javascripts/notes/components/toggle_replies_widget_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import toggleRepliesWidget from '~/notes/components/toggle_replies_widget.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import toggleRepliesWidget from '~/notes/components/toggle_replies_widget.vue'; import { note } from '../mock_data'; const deepCloneObject = obj => JSON.parse(JSON.stringify(obj)); diff --git a/spec/javascripts/notes/stores/actions_spec.js b/spec/javascripts/notes/stores/actions_spec.js index e3cc025cf49..3e0c90277ee 100644 --- a/spec/javascripts/notes/stores/actions_spec.js +++ b/spec/javascripts/notes/stores/actions_spec.js @@ -1,6 +1,7 @@ import $ from 'jquery'; -import Api from '~/api'; import { TEST_HOST } from 'spec/test_constants'; +import AxiosMockAdapter from 'axios-mock-adapter'; +import Api from '~/api'; import actionsModule, * as actions from '~/notes/stores/actions'; import * as mutationTypes from '~/notes/stores/mutation_types'; import * as notesConstants from '~/notes/constants'; @@ -15,7 +16,6 @@ import { noteableDataMock, individualNote, } from '../mock_data'; -import AxiosMockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; const TEST_ERROR_MESSAGE = 'Test error message'; diff --git a/spec/javascripts/performance_bar/index_spec.js b/spec/javascripts/performance_bar/index_spec.js index 1444d1bb3cb..de0ef25e7fa 100644 --- a/spec/javascripts/performance_bar/index_spec.js +++ b/spec/javascripts/performance_bar/index_spec.js @@ -1,4 +1,5 @@ import axios from '~/lib/utils/axios_utils'; +import '~/performance_bar/components/performance_bar_app.vue'; import performanceBar from '~/performance_bar'; import PerformanceBarService from '~/performance_bar/services/performance_bar_service'; diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index 14ace66c2f1..8f4af90edd7 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -165,48 +165,3 @@ describe('test errors', () => { } }); }); - -// if we're generating coverage reports, make sure to include all files so -// that we can catch files with 0% coverage -// see: https://github.com/deepsweet/istanbul-instrumenter-loader/issues/15 -if (process.env.BABEL_ENV === 'coverage') { - // exempt these files from the coverage report - const troubleMakers = [ - './pages/admin/application_settings/general/index.js', - './geo_designs/index.js', - ]; - - describe('Uncovered files', function() { - const sourceFilesContexts = [require.context('~', true, /\.(js|vue)$/)]; - - if (process.env.IS_EE) { - sourceFilesContexts.push(require.context('ee', true, /\.(js|vue)$/)); - } - - const allTestFiles = testContexts.reduce( - (accumulator, context) => accumulator.concat(context.keys()), - [], - ); - - $.holdReady(true); - - sourceFilesContexts.forEach(context => { - context.keys().forEach(path => { - // ignore if there is a matching spec file - if (allTestFiles.indexOf(`${path.replace(/\.(js|vue)$/, '')}_spec`) > -1) { - return; - } - - it(`includes '${path}'`, function() { - try { - context(path); - } catch (err) { - if (troubleMakers.indexOf(path) === -1) { - expect(err).toBeNull(); - } - } - }); - }); - }); - }); -} diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js index 8ec17efffb9..bd567f1f93a 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_alert_message_spec.js @@ -1,6 +1,6 @@ import { shallowMount, createLocalVue } from '@vue/test-utils'; -import MrWidgetAlertMessage from '~/vue_merge_request_widget/components/mr_widget_alert_message.vue'; import { GlLink } from '@gitlab/ui'; +import MrWidgetAlertMessage from '~/vue_merge_request_widget/components/mr_widget_alert_message.vue'; describe('MrWidgetAlertMessage', () => { let wrapper; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_author_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_author_spec.js index b69082082ba..a942a9dec87 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_author_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_author_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import MrWidgetAuthor from '~/vue_merge_request_widget/components/mr_widget_author.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import MrWidgetAuthor from '~/vue_merge_request_widget/components/mr_widget_author.vue'; describe('MrWidgetAuthor', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js index 787f44e478d..55af2baa924 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import MrWidgetAuthorTime from '~/vue_merge_request_widget/components/mr_widget_author_time.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import MrWidgetAuthorTime from '~/vue_merge_request_widget/components/mr_widget_author_time.vue'; describe('MrWidgetAuthorTime', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js index cd77b0ab815..de1d351677c 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import headerComponent from '~/vue_merge_request_widget/components/mr_widget_header.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import headerComponent from '~/vue_merge_request_widget/components/mr_widget_header.vue'; describe('MRWidgetHeader', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js index 2c554f3f3ab..b566876fe1d 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import mergeHelpComponent from '~/vue_merge_request_widget/components/mr_widget_merge_help.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import mergeHelpComponent from '~/vue_merge_request_widget/components/mr_widget_merge_help.vue'; describe('MRWidgetMergeHelp', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js index 67e85763fae..032fb90ca3c 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { trimText } from 'spec/helpers/text_helper'; +import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue'; import mockData from '../mock_data'; describe('MRWidgetPipeline', () => { diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js index 7216ad00cc1..5b293862b16 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import eventHub from '~/vue_merge_request_widget/event_hub'; import component from '~/vue_merge_request_widget/components/states/mr_widget_rebase.vue'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; describe('Merge request widget rebase component', () => { let Component; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_related_links_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_related_links_spec.js index 7a5d0efdea5..a152bd01916 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_related_links_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_related_links_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import relatedLinksComponent from '~/vue_merge_request_widget/components/mr_widget_related_links.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import relatedLinksComponent from '~/vue_merge_request_widget/components/mr_widget_related_links.vue'; describe('MRWidgetRelatedLinks', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_status_icon_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_status_icon_spec.js index 5aac37d28df..20bda024d89 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_status_icon_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_status_icon_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import mrStatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import mrStatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue'; describe('MR widget status icon component', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/review_app_link_spec.js b/spec/javascripts/vue_mr_widget/components/review_app_link_spec.js index d8d84d087bc..bd481f93413 100644 --- a/spec/javascripts/vue_mr_widget/components/review_app_link_spec.js +++ b/spec/javascripts/vue_mr_widget/components/review_app_link_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import component from '~/vue_merge_request_widget/components/review_app_link.vue'; import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper'; +import component from '~/vue_merge_request_widget/components/review_app_link.vue'; import mountComponent from '../../helpers/vue_mount_component_helper'; describe('review app link', () => { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_archived_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_archived_spec.js index b90f5881a4d..29a257b0e24 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_archived_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_archived_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import archivedComponent from '~/vue_merge_request_widget/components/states/mr_widget_archived.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import archivedComponent from '~/vue_merge_request_widget/components/states/mr_widget_archived.vue'; describe('MRWidgetArchived', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js index 2ea8c169add..73b65178ecf 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import { trimText } from 'spec/helpers/text_helper'; import autoMergeEnabledComponent from '~/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue'; import MRWidgetService from '~/vue_merge_request_widget/services/mr_widget_service'; import eventHub from '~/vue_merge_request_widget/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; -import { trimText } from 'spec/helpers/text_helper'; import { MWPS_MERGE_STRATEGY } from '~/vue_merge_request_widget/constants'; describe('MRWidgetAutoMergeEnabled', () => { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_checking_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_checking_spec.js index 70c70eca746..4f6451473e8 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_checking_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_checking_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import checkingComponent from '~/vue_merge_request_widget/components/states/mr_widget_checking.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import checkingComponent from '~/vue_merge_request_widget/components/states/mr_widget_checking.vue'; describe('MRWidgetChecking', () => { let Component; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js index 9523e7d5474..bbbaed0d2f5 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_closed_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import closedComponent from '~/vue_merge_request_widget/components/states/mr_widget_closed.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import closedComponent from '~/vue_merge_request_widget/components/states/mr_widget_closed.vue'; describe('MRWidgetClosed', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_conflicts_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_conflicts_spec.js index 55073f5537c..9035bc6f65d 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_conflicts_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_conflicts_spec.js @@ -1,7 +1,7 @@ import $ from 'jquery'; import { createLocalVue, shallowMount } from '@vue/test-utils'; -import ConflictsComponent from '~/vue_merge_request_widget/components/states/mr_widget_conflicts.vue'; import { removeBreakLine } from 'spec/helpers/text_helper'; +import ConflictsComponent from '~/vue_merge_request_widget/components/states/mr_widget_conflicts.vue'; describe('MRWidgetConflicts', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js index 780bed1bf69..ef76e617c07 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import failedToMergeComponent from '~/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue'; import eventHub from '~/vue_merge_request_widget/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; describe('MRWidgetFailedToMerge', () => { const dummyIntervalId = 1337; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js index 1683da805b9..423c800bfbc 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mergedComponent from '~/vue_merge_request_widget/components/states/mr_widget_merged.vue'; import eventHub from '~/vue_merge_request_widget/event_hub'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; describe('MRWidgetMerged', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merging_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merging_spec.js index 57773d1648a..06d236064dd 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merging_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merging_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import mergingComponent from '~/vue_merge_request_widget/components/states/mr_widget_merging.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import mergingComponent from '~/vue_merge_request_widget/components/states/mr_widget_merging.vue'; describe('MRWidgetMerging', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js index 5fd8093bf5c..47b989e2022 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import missingBranchComponent from '~/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import missingBranchComponent from '~/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue'; describe('MRWidgetMissingBranch', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_not_allowed_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_not_allowed_spec.js index 6b95ca3460b..b1cb91663c9 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_not_allowed_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_not_allowed_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import notAllowedComponent from '~/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import notAllowedComponent from '~/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue'; describe('MRWidgetNotAllowed', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_blocked_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_blocked_spec.js index 1d2f3e41509..0bca86b12b2 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_blocked_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_blocked_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import pipelineBlockedComponent from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper'; +import pipelineBlockedComponent from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue'; describe('MRWidgetPipelineBlocked', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_failed_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_failed_spec.js index 3e4ce2c3696..85f65d024a8 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_failed_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_pipeline_failed_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import PipelineFailed from '~/vue_merge_request_widget/components/states/pipeline_failed.vue'; import { removeBreakLine } from 'spec/helpers/text_helper'; +import PipelineFailed from '~/vue_merge_request_widget/components/states/pipeline_failed.vue'; describe('PipelineFailed', () => { describe('template', () => { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js index 9324c83bf4b..11eb0fef9b2 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import ShaMismatch from '~/vue_merge_request_widget/components/states/sha_mismatch.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; import { removeBreakLine } from 'spec/helpers/text_helper'; +import ShaMismatch from '~/vue_merge_request_widget/components/states/sha_mismatch.vue'; describe('ShaMismatch', () => { let vm; diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js index 5bd1af56bcc..e8367caa438 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import UnresolvedDiscussions from '~/vue_merge_request_widget/components/states/unresolved_discussions.vue'; import mountComponent from 'spec/helpers/vue_mount_component_helper'; +import UnresolvedDiscussions from '~/vue_merge_request_widget/components/states/unresolved_discussions.vue'; describe('UnresolvedDiscussions', () => { const Component = Vue.extend(UnresolvedDiscussions); diff --git a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js index 36e4ce7177f..296be43f793 100644 --- a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js +++ b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js @@ -1,11 +1,11 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; +import mountComponent from 'spec/helpers/vue_mount_component_helper'; import axios from '~/lib/utils/axios_utils'; import mrWidgetOptions from '~/vue_merge_request_widget/mr_widget_options.vue'; import eventHub from '~/vue_merge_request_widget/event_hub'; import notify from '~/lib/utils/notify'; import { stateKey } from '~/vue_merge_request_widget/stores/state_maps'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mockData from './mock_data'; import { faviconDataUrl, overlayDataUrl } from '../lib/utils/mock_data'; import { SUCCESS } from '~/vue_merge_request_widget/components/deployment/constants'; diff --git a/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js b/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js index 4c4bebcb4cd..5070e74b5d2 100644 --- a/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js +++ b/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js @@ -1,4 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; +import testAction from 'spec/helpers/vuex_action_helper'; +import { TEST_HOST } from 'spec/test_constants'; import axios from '~/lib/utils/axios_utils'; import { setEndpoint, @@ -11,8 +13,6 @@ import { } from '~/vue_merge_request_widget/stores/artifacts_list/actions'; import state from '~/vue_merge_request_widget/stores/artifacts_list/state'; import * as types from '~/vue_merge_request_widget/stores/artifacts_list/mutation_types'; -import testAction from 'spec/helpers/vuex_action_helper'; -import { TEST_HOST } from 'spec/test_constants'; describe('Artifacts App Store Actions', () => { let mockedState; diff --git a/spec/lib/gitlab/diff/highlight_cache_spec.rb b/spec/lib/gitlab/diff/highlight_cache_spec.rb index 97ebe6ae0e4..163a140b6c2 100644 --- a/spec/lib/gitlab/diff/highlight_cache_spec.rb +++ b/spec/lib/gitlab/diff/highlight_cache_spec.rb @@ -98,6 +98,16 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do expect { cache.send(:write_to_redis_hash, diff_hash) } .to change { Gitlab::Redis::Cache.with { |r| r.hgetall(cache_key) } } end + + # Note that this spec and the code it confirms can be removed when + # :hset_redis_diff_caching is fully launched. + # + it 'attempts to clear deprecated cache entries' do + expect_any_instance_of(Gitlab::Diff::DeprecatedHighlightCache) + .to receive(:clear).and_call_original + + cache.send(:write_to_redis_hash, diff_hash) + end end describe '#clear' do diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index 7292e7a6a4e..9b3762877e0 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -326,7 +326,7 @@ describe API::Internal::Base do expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) - expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true') + expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true', 'gitaly-feature-filter-shas-with-signatures-go' => 'true') expect(user.reload.last_activity_on).to eql(Date.today) end end @@ -346,7 +346,7 @@ describe API::Internal::Base do expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) - expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true') + expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true', 'gitaly-feature-filter-shas-with-signatures-go' => 'true') expect(user.reload.last_activity_on).to be_nil end end @@ -588,7 +588,7 @@ describe API::Internal::Base do expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) - expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true') + expect(json_response["gitaly"]["features"]).to eq('gitaly-feature-get-all-lfs-pointers-go' => 'true', 'gitaly-feature-inforef-uploadpack-cache' => 'true', 'gitaly-feature-get-tag-messages-go' => 'true', 'gitaly-feature-filter-shas-with-signatures-go' => 'true') end end |