diff options
Diffstat (limited to 'spec/frontend/vue_shared')
24 files changed, 26 insertions, 29 deletions
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, |