Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0c6a3dcb
Commit
0c6a3dcb
authored
Jan 21, 2022
by
Stanislav Lashmanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove localVue usage from EE tests without VueApollo
Epic:
https://gitlab.com/gitlab-org/gitlab/-/issues/220482
parent
6d0438a4
Changes
63
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
178 additions
and
255 deletions
+178
-255
ee/spec/frontend/billings/subscriptions/components/app_spec.js
...ec/frontend/billings/subscriptions/components/app_spec.js
+3
-4
ee/spec/frontend/billings/subscriptions/components/subscription_table_row_spec.js
...s/subscriptions/components/subscription_table_row_spec.js
+3
-4
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
...lings/subscriptions/components/subscription_table_spec.js
+3
-4
ee/spec/frontend/boards/components/board_new_epic_spec.js
ee/spec/frontend/boards/components/board_new_epic_spec.js
+3
-5
ee/spec/frontend/boards/toggle_labels_spec.js
ee/spec/frontend/boards/toggle_labels_spec.js
+3
-4
ee/spec/frontend/codequality_report/codequality_report_spec.js
...ec/frontend/codequality_report/codequality_report_spec.js
+3
-4
ee/spec/frontend/diffs/components/diff_line_note_form_spec.js
...pec/frontend/diffs/components/diff_line_note_form_spec.js
+3
-4
ee/spec/frontend/diffs/components/diff_view_spec.js
ee/spec/frontend/diffs/components/diff_view_spec.js
+3
-5
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
...geo_node_form/components/geo_node_form_capacities_spec.js
+3
-4
ee/spec/frontend/geo_node_form/components/geo_node_form_core_spec.js
...ntend/geo_node_form/components/geo_node_form_core_spec.js
+3
-4
ee/spec/frontend/geo_node_form/components/geo_node_form_namespaces_spec.js
...geo_node_form/components/geo_node_form_namespaces_spec.js
+3
-4
ee/spec/frontend/geo_node_form/components/geo_node_form_spec.js
...c/frontend/geo_node_form/components/geo_node_form_spec.js
+3
-3
ee/spec/frontend/geo_replicable/components/app_spec.js
ee/spec/frontend/geo_replicable/components/app_spec.js
+3
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_empty_state_spec.js
..._replicable/components/geo_replicable_empty_state_spec.js
+3
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_item_spec.js
...end/geo_replicable/components/geo_replicable_item_spec.js
+3
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_spec.js
...frontend/geo_replicable/components/geo_replicable_spec.js
+3
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
...d/geo_replicable/components/geo_replicable_status_spec.js
+3
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_time_ago_spec.js
...geo_replicable/components/geo_replicable_time_ago_spec.js
+3
-4
ee/spec/frontend/geo_settings/components/app_spec.js
ee/spec/frontend/geo_settings/components/app_spec.js
+3
-3
ee/spec/frontend/geo_settings/components/geo_settings_form_spec.js
...rontend/geo_settings/components/geo_settings_form_spec.js
+3
-3
ee/spec/frontend/insights/components/insights_page_spec.js
ee/spec/frontend/insights/components/insights_page_spec.js
+3
-4
ee/spec/frontend/insights/components/insights_spec.js
ee/spec/frontend/insights/components/insights_spec.js
+3
-4
ee/spec/frontend/issues/show/components/incidents/metrics_image_spec.js
...nd/issues/show/components/incidents/metrics_image_spec.js
+3
-4
ee/spec/frontend/issues/show/components/incidents/metrics_tab_spec.js
...tend/issues/show/components/incidents/metrics_tab_spec.js
+3
-4
ee/spec/frontend/issues/show/components/incidents/store/actions_spec.js
...nd/issues/show/components/incidents/store/actions_spec.js
+2
-3
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
...tend/issues_analytics/components/issues_analytics_spec.js
+3
-4
ee/spec/frontend/maintenance_mode_settings/components/app_spec.js
...frontend/maintenance_mode_settings/components/app_spec.js
+3
-4
ee/spec/frontend/members/components/ldap/ldap_dropdown_item_spec.js
...ontend/members/components/ldap/ldap_dropdown_item_spec.js
+3
-4
ee/spec/frontend/members/components/ldap/ldap_override_button_spec.js
...tend/members/components/ldap/ldap_override_button_spec.js
+3
-4
ee/spec/frontend/members/components/ldap/ldap_override_confirmation_modal_spec.js
.../components/ldap/ldap_override_confirmation_modal_spec.js
+3
-5
ee/spec/frontend/members/components/table/member_table_cell_spec.js
...ontend/members/components/table/member_table_cell_spec.js
+4
-5
ee/spec/frontend/members/components/table/members_table_spec.js
...c/frontend/members/components/table/members_table_spec.js
+3
-4
ee/spec/frontend/notes/components/note_header_spec.js
ee/spec/frontend/notes/components/note_header_spec.js
+3
-4
ee/spec/frontend/operations/components/dashboard/dashboard_spec.js
...rontend/operations/components/dashboard/dashboard_spec.js
+3
-4
ee/spec/frontend/operations/components/dashboard/project_spec.js
.../frontend/operations/components/dashboard/project_spec.js
+3
-4
ee/spec/frontend/pages/groups/saml_providers/saml_members/index_spec.js
...nd/pages/groups/saml_providers/saml_members/index_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/create_epic_form_spec.js
...nd/related_items_tree/components/create_epic_form_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
...d/related_items_tree/components/create_issue_form_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/related_items_tree_app_spec.js
...ated_items_tree/components/related_items_tree_app_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/related_items_tree_header_spec.js
...d_items_tree/components/related_items_tree_header_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/tree_item_remove_modal_spec.js
...ated_items_tree/components/tree_item_remove_modal_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/tree_item_spec.js
.../frontend/related_items_tree/components/tree_item_spec.js
+3
-4
ee/spec/frontend/related_items_tree/components/tree_root_spec.js
.../frontend/related_items_tree/components/tree_root_spec.js
+3
-4
ee/spec/frontend/reports/browser_performance_report/grouped_browser_performance_reports_app_spec.js
...ce_report/grouped_browser_performance_reports_app_spec.js
+1
-4
ee/spec/frontend/reports/load_performance_report/grouped_load_performance_reports_app_spec.js
...mance_report/grouped_load_performance_reports_app_spec.js
+1
-4
ee/spec/frontend/roadmap/components/epics_list_section_spec.js
...ec/frontend/roadmap/components/epics_list_section_spec.js
+0
-4
ee/spec/frontend/roadmap/components/milestones_list_section_spec.js
...ontend/roadmap/components/milestones_list_section_spec.js
+1
-3
ee/spec/frontend/roadmap/components/roadmap_shell_spec.js
ee/spec/frontend/roadmap/components/roadmap_shell_spec.js
+3
-4
ee/spec/frontend/seat_usage/components/remove_billable_member_modal_spec.js
...eat_usage/components/remove_billable_member_modal_spec.js
+3
-5
ee/spec/frontend/seat_usage/components/subscription_seat_details_spec.js
...d/seat_usage/components/subscription_seat_details_spec.js
+3
-4
ee/spec/frontend/seat_usage/components/subscription_seats_spec.js
...frontend/seat_usage/components/subscription_seats_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/pipeline/filters_spec.js
...nd/security_dashboard/components/pipeline/filters_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/pipeline/security_dashboard_table_row_spec.js
.../components/pipeline/security_dashboard_table_row_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/pipeline/security_dashboard_table_spec.js
...oard/components/pipeline/security_dashboard_table_spec.js
+3
-5
ee/spec/frontend/security_dashboard/components/pipeline/selection_summary_vuex_spec.js
...hboard/components/pipeline/selection_summary_vuex_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/shared/filters/scanner_filter_spec.js
...ashboard/components/shared/filters/scanner_filter_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/shared/filters/simple_filter_spec.js
...dashboard/components/shared/filters/simple_filter_spec.js
+3
-4
ee/spec/frontend/security_dashboard/components/shared/vulnerability_report/vulnerability_report_tabs_spec.js
...ed/vulnerability_report/vulnerability_report_tabs_spec.js
+2
-5
ee/spec/frontend/security_dashboard/components/shared/vulnerability_report_spec.js
..._dashboard/components/shared/vulnerability_report_spec.js
+1
-4
ee/spec/frontend/subscriptions/new/components/checkout/order_summary_spec.js
...bscriptions/new/components/checkout/order_summary_spec.js
+2
-4
ee/spec/frontend/subscriptions/new/components/checkout/zuora_spec.js
...ntend/subscriptions/new/components/checkout/zuora_spec.js
+5
-6
ee/spec/frontend/subscriptions/new/components/checkout_spec.js
...ec/frontend/subscriptions/new/components/checkout_spec.js
+3
-3
ee/spec/frontend/threat_monitoring/components/statistics_history_spec.js
...d/threat_monitoring/components/statistics_history_spec.js
+3
-4
No files found.
ee/spec/frontend/billings/subscriptions/components/app_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SubscriptionApp
from
'
ee/billings/subscriptions/components/app.vue
'
;
import
SubscriptionApp
from
'
ee/billings/subscriptions/components/app.vue
'
;
import
initialStore
from
'
ee/billings/subscriptions/store
'
;
import
initialStore
from
'
ee/billings/subscriptions/store
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
SubscriptionApp component
'
,
()
=>
{
describe
(
'
SubscriptionApp component
'
,
()
=>
{
let
store
;
let
store
;
...
@@ -26,7 +26,6 @@ describe('SubscriptionApp component', () => {
...
@@ -26,7 +26,6 @@ describe('SubscriptionApp component', () => {
provide
:
{
provide
:
{
...
providedFields
,
...
providedFields
,
},
},
localVue
,
});
});
};
};
...
...
ee/spec/frontend/billings/subscriptions/components/subscription_table_row_spec.js
View file @
0c6a3dcb
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SubscriptionTableRow
from
'
ee/billings/subscriptions/components/subscription_table_row.vue
'
;
import
SubscriptionTableRow
from
'
ee/billings/subscriptions/components/subscription_table_row.vue
'
;
import
initialStore
from
'
ee/billings/subscriptions/store
'
;
import
initialStore
from
'
ee/billings/subscriptions/store
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
import
Popover
from
'
~/vue_shared/components/help_popover.vue
'
;
import
Popover
from
'
~/vue_shared/components/help_popover.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
subscription table row
'
,
()
=>
{
describe
(
'
subscription table row
'
,
()
=>
{
let
store
;
let
store
;
...
@@ -49,7 +49,6 @@ describe('subscription table row', () => {
...
@@ -49,7 +49,6 @@ describe('subscription table row', () => {
billableSeatsHref
,
billableSeatsHref
,
},
},
store
,
store
,
localVue
,
});
});
};
};
...
...
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
View file @
0c6a3dcb
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SubscriptionTable
from
'
ee/billings/subscriptions/components/subscription_table.vue
'
;
import
SubscriptionTable
from
'
ee/billings/subscriptions/components/subscription_table.vue
'
;
...
@@ -21,8 +22,7 @@ const defaultInjectedProps = {
...
@@ -21,8 +22,7 @@ const defaultInjectedProps = {
planName
:
'
Gold
'
,
planName
:
'
Gold
'
,
};
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
SubscriptionTable component
'
,
()
=>
{
describe
(
'
SubscriptionTable component
'
,
()
=>
{
let
store
;
let
store
;
...
@@ -40,7 +40,6 @@ describe('SubscriptionTable component', () => {
...
@@ -40,7 +40,6 @@ describe('SubscriptionTable component', () => {
wrapper
=
extendedWrapper
(
wrapper
=
extendedWrapper
(
mount
(
SubscriptionTable
,
{
mount
(
SubscriptionTable
,
{
store
,
store
,
localVue
,
provide
:
{
provide
:
{
...
defaultInjectedProps
,
...
defaultInjectedProps
,
...
provide
,
...
provide
,
...
...
ee/spec/frontend/boards/components/board_new_epic_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
BoardNewEpic
from
'
ee/boards/components/board_new_epic.vue
'
;
import
BoardNewEpic
from
'
ee/boards/components/board_new_epic.vue
'
;
...
@@ -8,16 +9,13 @@ import { mockList } from 'jest/boards/mock_data';
...
@@ -8,16 +9,13 @@ import { mockList } from 'jest/boards/mock_data';
import
BoardNewItem
from
'
~/boards/components/board_new_item.vue
'
;
import
BoardNewItem
from
'
~/boards/components/board_new_item.vue
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
addListNewEpicSpy
=
jest
.
fn
().
mockResolvedValue
();
const
addListNewEpicSpy
=
jest
.
fn
().
mockResolvedValue
();
const
mockActions
=
{
addListNewEpic
:
addListNewEpicSpy
};
const
mockActions
=
{
addListNewEpic
:
addListNewEpicSpy
};
const
createComponent
=
({
actions
=
mockActions
,
getters
=
{
isGroupBoard
:
()
=>
true
}
}
=
{})
=>
const
createComponent
=
({
actions
=
mockActions
,
getters
=
{
isGroupBoard
:
()
=>
true
}
}
=
{})
=>
shallowMount
(
BoardNewEpic
,
{
shallowMount
(
BoardNewEpic
,
{
localVue
,
store
:
new
Vuex
.
Store
({
store
:
new
Vuex
.
Store
({
actions
,
actions
,
getters
,
getters
,
...
...
ee/spec/frontend/boards/toggle_labels_spec.js
View file @
0c6a3dcb
import
{
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
ToggleLabels
from
'
ee/boards/components/toggle_labels.vue
'
;
import
ToggleLabels
from
'
ee/boards/components/toggle_labels.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
ToggleLabels component
'
,
()
=>
{
describe
(
'
ToggleLabels component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -14,7 +14,6 @@ describe('ToggleLabels component', () => {
...
@@ -14,7 +14,6 @@ describe('ToggleLabels component', () => {
function
createComponent
(
state
=
{})
{
function
createComponent
(
state
=
{})
{
setShowLabels
=
jest
.
fn
();
setShowLabels
=
jest
.
fn
();
return
shallowMount
(
ToggleLabels
,
{
return
shallowMount
(
ToggleLabels
,
{
localVue
,
store
:
new
Vuex
.
Store
({
store
:
new
Vuex
.
Store
({
state
:
{
state
:
{
isShowingLabels
:
true
,
isShowingLabels
:
true
,
...
...
ee/spec/frontend/codequality_report/codequality_report_spec.js
View file @
0c6a3dcb
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
CodequalityReportApp
from
'
ee/codequality_report/codequality_report.vue
'
;
import
CodequalityReportApp
from
'
ee/codequality_report/codequality_report.vue
'
;
import
PaginationLinks
from
'
~/vue_shared/components/pagination_links.vue
'
;
import
PaginationLinks
from
'
~/vue_shared/components/pagination_links.vue
'
;
...
@@ -6,8 +7,7 @@ import { parsedIssues } from './mock_data';
...
@@ -6,8 +7,7 @@ import { parsedIssues } from './mock_data';
jest
.
mock
(
'
~/flash
'
);
jest
.
mock
(
'
~/flash
'
);
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Codequality report app
'
,
()
=>
{
describe
(
'
Codequality report app
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -27,7 +27,6 @@ describe('Codequality report app', () => {
...
@@ -27,7 +27,6 @@ describe('Codequality report app', () => {
});
});
wrapper
=
mountFn
(
CodequalityReportApp
,
{
wrapper
=
mountFn
(
CodequalityReportApp
,
{
localVue
,
store
,
store
,
provide
:
{
provide
:
{
glFeatures
,
glFeatures
,
...
...
ee/spec/frontend/diffs/components/diff_line_note_form_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
diffFileMockData
from
'
jest/diffs/mock_data/diff_file
'
;
import
diffFileMockData
from
'
jest/diffs/mock_data/diff_file
'
;
import
note
from
'
jest/notes/mock_data
'
;
import
note
from
'
jest/notes/mock_data
'
;
import
DiffLineNoteForm
from
'
~/diffs/components/diff_line_note_form.vue
'
;
import
DiffLineNoteForm
from
'
~/diffs/components/diff_line_note_form.vue
'
;
import
NoteForm
from
'
~/notes/components/note_form.vue
'
;
import
NoteForm
from
'
~/notes/components/note_form.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
EE DiffLineNoteForm
'
,
()
=>
{
describe
(
'
EE DiffLineNoteForm
'
,
()
=>
{
let
storeOptions
;
let
storeOptions
;
...
@@ -66,7 +66,6 @@ describe('EE DiffLineNoteForm', () => {
...
@@ -66,7 +66,6 @@ describe('EE DiffLineNoteForm', () => {
...
props
,
...
props
,
},
},
store
,
store
,
localVue
,
});
});
};
};
...
...
ee/spec/frontend/diffs/components/diff_view_spec.js
View file @
0c6a3dcb
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
diffFileMockDataReadable
from
'
jest/diffs/mock_data/diff_file
'
;
import
diffFileMockDataReadable
from
'
jest/diffs/mock_data/diff_file
'
;
...
@@ -10,9 +11,8 @@ const getReadableFile = () => JSON.parse(JSON.stringify(diffFileMockDataReadable
...
@@ -10,9 +11,8 @@ const getReadableFile = () => JSON.parse(JSON.stringify(diffFileMockDataReadable
function
createComponent
({
withCodequality
=
true
,
provide
=
{}
})
{
function
createComponent
({
withCodequality
=
true
,
provide
=
{}
})
{
const
diffFile
=
getReadableFile
();
const
diffFile
=
getReadableFile
();
const
localVue
=
createLocalVue
();
local
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
const
store
=
new
Vuex
.
Store
({
const
store
=
new
Vuex
.
Store
({
modules
:
{
modules
:
{
...
@@ -39,7 +39,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
...
@@ -39,7 +39,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
const
wrapper
=
mount
(
DiffViewComponent
,
{
const
wrapper
=
mount
(
DiffViewComponent
,
{
store
,
store
,
localVue
,
propsData
:
{
propsData
:
{
diffFile
,
diffFile
,
diffLines
:
[],
diffLines
:
[],
...
@@ -48,7 +47,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
...
@@ -48,7 +47,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
});
});
return
{
return
{
localVue
,
wrapper
,
wrapper
,
store
,
store
,
};
};
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
View file @
0c6a3dcb
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoNodeFormCapacities
from
'
ee/geo_node_form/components/geo_node_form_capacities.vue
'
;
import
GeoNodeFormCapacities
from
'
ee/geo_node_form/components/geo_node_form_capacities.vue
'
;
import
{
import
{
...
@@ -9,8 +10,7 @@ import {
...
@@ -9,8 +10,7 @@ import {
}
from
'
ee/geo_node_form/constants
'
;
}
from
'
ee/geo_node_form/constants
'
;
import
{
MOCK_NODE
}
from
'
../mock_data
'
;
import
{
MOCK_NODE
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoNodeFormCapacities
'
,
()
=>
{
describe
(
'
GeoNodeFormCapacities
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -36,7 +36,6 @@ describe('GeoNodeFormCapacities', () => {
...
@@ -36,7 +36,6 @@ describe('GeoNodeFormCapacities', () => {
});
});
wrapper
=
mount
(
GeoNodeFormCapacities
,
{
wrapper
=
mount
(
GeoNodeFormCapacities
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
...
defaultProps
,
...
defaultProps
,
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_core_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoNodeFormCore
from
'
ee/geo_node_form/components/geo_node_form_core.vue
'
;
import
GeoNodeFormCore
from
'
ee/geo_node_form/components/geo_node_form_core.vue
'
;
import
{
import
{
...
@@ -8,8 +9,7 @@ import {
...
@@ -8,8 +9,7 @@ import {
}
from
'
ee/geo_node_form/constants
'
;
}
from
'
ee/geo_node_form/constants
'
;
import
{
MOCK_NODE
,
STRING_OVER_255
}
from
'
../mock_data
'
;
import
{
MOCK_NODE
,
STRING_OVER_255
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoNodeFormCore
'
,
()
=>
{
describe
(
'
GeoNodeFormCore
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -35,7 +35,6 @@ describe('GeoNodeFormCore', () => {
...
@@ -35,7 +35,6 @@ describe('GeoNodeFormCore', () => {
});
});
wrapper
=
mount
(
GeoNodeFormCore
,
{
wrapper
=
mount
(
GeoNodeFormCore
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
...
defaultProps
,
...
defaultProps
,
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_namespaces_spec.js
View file @
0c6a3dcb
import
{
GlIcon
,
GlSearchBoxByType
,
GlDropdown
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlSearchBoxByType
,
GlDropdown
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoNodeFormNamespaces
from
'
ee/geo_node_form/components/geo_node_form_namespaces.vue
'
;
import
GeoNodeFormNamespaces
from
'
ee/geo_node_form/components/geo_node_form_namespaces.vue
'
;
import
{
MOCK_SYNC_NAMESPACES
}
from
'
../mock_data
'
;
import
{
MOCK_SYNC_NAMESPACES
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
jest
.
mock
(
'
~/flash
'
);
jest
.
mock
(
'
~/flash
'
);
...
@@ -32,7 +32,6 @@ describe('GeoNodeFormNamespaces', () => {
...
@@ -32,7 +32,6 @@ describe('GeoNodeFormNamespaces', () => {
});
});
wrapper
=
shallowMount
(
GeoNodeFormNamespaces
,
{
wrapper
=
shallowMount
(
GeoNodeFormNamespaces
,
{
localVue
,
store
:
fakeStore
,
store
:
fakeStore
,
propsData
:
{
propsData
:
{
...
defaultProps
,
...
defaultProps
,
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoNodeForm
from
'
ee/geo_node_form/components/geo_node_form.vue
'
;
import
GeoNodeForm
from
'
ee/geo_node_form/components/geo_node_form.vue
'
;
import
GeoNodeFormCapacities
from
'
ee/geo_node_form/components/geo_node_form_capacities.vue
'
;
import
GeoNodeFormCapacities
from
'
ee/geo_node_form/components/geo_node_form_capacities.vue
'
;
...
@@ -13,8 +14,7 @@ import {
...
@@ -13,8 +14,7 @@ import {
MOCK_NODES_PATH
,
MOCK_NODES_PATH
,
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
jest
.
mock
(
'
~/helpers/help_page_helper
'
);
jest
.
mock
(
'
~/helpers/help_page_helper
'
);
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
...
...
ee/spec/frontend/geo_replicable/components/app_spec.js
View file @
0c6a3dcb
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicableApp
from
'
ee/geo_replicable/components/app.vue
'
;
import
GeoReplicableApp
from
'
ee/geo_replicable/components/app.vue
'
;
import
GeoReplicable
from
'
ee/geo_replicable/components/geo_replicable.vue
'
;
import
GeoReplicable
from
'
ee/geo_replicable/components/geo_replicable.vue
'
;
...
@@ -14,8 +15,7 @@ import {
...
@@ -14,8 +15,7 @@ import {
MOCK_GRAPHQL_REGISTRY
,
MOCK_GRAPHQL_REGISTRY
,
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicableApp
'
,
()
=>
{
describe
(
'
GeoReplicableApp
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -33,7 +33,6 @@ describe('GeoReplicableApp', () => {
...
@@ -33,7 +33,6 @@ describe('GeoReplicableApp', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
GeoReplicableApp
,
{
wrapper
=
shallowMount
(
GeoReplicableApp
,
{
localVue
,
store
,
store
,
propsData
,
propsData
,
});
});
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_empty_state_spec.js
View file @
0c6a3dcb
import
{
getByRole
}
from
'
@testing-library/dom
'
;
import
{
getByRole
}
from
'
@testing-library/dom
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicableEmptyState
from
'
ee/geo_replicable/components/geo_replicable_empty_state.vue
'
;
import
GeoReplicableEmptyState
from
'
ee/geo_replicable/components/geo_replicable_empty_state.vue
'
;
import
createStore
from
'
ee/geo_replicable/store
'
;
import
createStore
from
'
ee/geo_replicable/store
'
;
...
@@ -9,8 +10,7 @@ import {
...
@@ -9,8 +10,7 @@ import {
MOCK_REPLICABLE_TYPE
,
MOCK_REPLICABLE_TYPE
,
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicableEmptyState
'
,
()
=>
{
describe
(
'
GeoReplicableEmptyState
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -22,7 +22,6 @@ describe('GeoReplicableEmptyState', () => {
...
@@ -22,7 +22,6 @@ describe('GeoReplicableEmptyState', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
mount
(
GeoReplicableEmptyState
,
{
wrapper
=
mount
(
GeoReplicableEmptyState
,
{
localVue
,
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
propsData
,
propsData
,
});
});
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_item_spec.js
View file @
0c6a3dcb
import
{
GlLink
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicableItem
from
'
ee/geo_replicable/components/geo_replicable_item.vue
'
;
import
GeoReplicableItem
from
'
ee/geo_replicable/components/geo_replicable_item.vue
'
;
import
{
ACTION_TYPES
}
from
'
ee/geo_replicable/constants
'
;
import
{
ACTION_TYPES
}
from
'
ee/geo_replicable/constants
'
;
import
{
getStoreConfig
}
from
'
ee/geo_replicable/store
'
;
import
{
getStoreConfig
}
from
'
ee/geo_replicable/store
'
;
import
{
MOCK_BASIC_FETCH_DATA_MAP
,
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
import
{
MOCK_BASIC_FETCH_DATA_MAP
,
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicableItem
'
,
()
=>
{
describe
(
'
GeoReplicableItem
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -33,7 +33,6 @@ describe('GeoReplicableItem', () => {
...
@@ -33,7 +33,6 @@ describe('GeoReplicableItem', () => {
});
});
wrapper
=
mount
(
GeoReplicableItem
,
{
wrapper
=
mount
(
GeoReplicableItem
,
{
localVue
,
store
:
fakeStore
,
store
:
fakeStore
,
propsData
:
{
propsData
:
{
...
defaultProps
,
...
defaultProps
,
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_spec.js
View file @
0c6a3dcb
import
{
GlPagination
}
from
'
@gitlab/ui
'
;
import
{
GlPagination
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicable
from
'
ee/geo_replicable/components/geo_replicable.vue
'
;
import
GeoReplicable
from
'
ee/geo_replicable/components/geo_replicable.vue
'
;
import
GeoReplicableItem
from
'
ee/geo_replicable/components/geo_replicable_item.vue
'
;
import
GeoReplicableItem
from
'
ee/geo_replicable/components/geo_replicable_item.vue
'
;
...
@@ -14,8 +15,7 @@ import {
...
@@ -14,8 +15,7 @@ import {
MOCK_GRAPHQL_REGISTRY
,
MOCK_GRAPHQL_REGISTRY
,
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicable
'
,
()
=>
{
describe
(
'
GeoReplicable
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -28,7 +28,6 @@ describe('GeoReplicable', () => {
...
@@ -28,7 +28,6 @@ describe('GeoReplicable', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
GeoReplicable
,
{
wrapper
=
shallowMount
(
GeoReplicable
,
{
localVue
,
store
,
store
,
});
});
};
};
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
View file @
0c6a3dcb
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicableStatus
from
'
ee/geo_replicable/components/geo_replicable_status.vue
'
;
import
GeoReplicableStatus
from
'
ee/geo_replicable/components/geo_replicable_status.vue
'
;
import
{
import
{
...
@@ -11,8 +12,7 @@ import {
...
@@ -11,8 +12,7 @@ import {
import
createStore
from
'
ee/geo_replicable/store
'
;
import
createStore
from
'
ee/geo_replicable/store
'
;
import
{
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
import
{
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicableStatus
'
,
()
=>
{
describe
(
'
GeoReplicableStatus
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -23,7 +23,6 @@ describe('GeoReplicableStatus', () => {
...
@@ -23,7 +23,6 @@ describe('GeoReplicableStatus', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
mount
(
GeoReplicableStatus
,
{
wrapper
=
mount
(
GeoReplicableStatus
,
{
localVue
,
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
propsData
,
propsData
,
});
});
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_time_ago_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoReplicableTimeAgo
from
'
ee/geo_replicable/components/geo_replicable_time_ago.vue
'
;
import
GeoReplicableTimeAgo
from
'
ee/geo_replicable/components/geo_replicable_time_ago.vue
'
;
import
createStore
from
'
ee/geo_replicable/store
'
;
import
createStore
from
'
ee/geo_replicable/store
'
;
...
@@ -6,8 +7,7 @@ import { useFakeDate } from 'helpers/fake_date';
...
@@ -6,8 +7,7 @@ import { useFakeDate } from 'helpers/fake_date';
import
TimeAgo
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
TimeAgo
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
{
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
import
{
MOCK_REPLICABLE_TYPE
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoReplicableTimeAgo
'
,
()
=>
{
describe
(
'
GeoReplicableTimeAgo
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -20,7 +20,6 @@ describe('GeoReplicableTimeAgo', () => {
...
@@ -20,7 +20,6 @@ describe('GeoReplicableTimeAgo', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
mount
(
GeoReplicableTimeAgo
,
{
wrapper
=
mount
(
GeoReplicableTimeAgo
,
{
localVue
,
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
store
:
createStore
({
replicableType
:
MOCK_REPLICABLE_TYPE
,
graphqlFieldName
:
null
}),
propsData
,
propsData
,
});
});
...
...
ee/spec/frontend/geo_settings/components/app_spec.js
View file @
0c6a3dcb
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoSettingsApp
from
'
ee/geo_settings/components/app.vue
'
;
import
GeoSettingsApp
from
'
ee/geo_settings/components/app.vue
'
;
...
@@ -7,8 +8,7 @@ import GeoSettingsForm from 'ee/geo_settings/components/geo_settings_form.vue';
...
@@ -7,8 +8,7 @@ import GeoSettingsForm from 'ee/geo_settings/components/geo_settings_form.vue';
import
initStore
from
'
ee/geo_settings/store
'
;
import
initStore
from
'
ee/geo_settings/store
'
;
import
*
as
types
from
'
ee/geo_settings/store/mutation_types
'
;
import
*
as
types
from
'
ee/geo_settings/store/mutation_types
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
GeoSettingsApp
'
,
()
=>
{
describe
(
'
GeoSettingsApp
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
...
ee/spec/frontend/geo_settings/components/geo_settings_form_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GeoSettingsForm
from
'
ee/geo_settings/components/geo_settings_form.vue
'
;
import
GeoSettingsForm
from
'
ee/geo_settings/components/geo_settings_form.vue
'
;
import
initStore
from
'
ee/geo_settings/store
'
;
import
initStore
from
'
ee/geo_settings/store
'
;
...
@@ -6,8 +7,7 @@ import * as types from 'ee/geo_settings/store/mutation_types';
...
@@ -6,8 +7,7 @@ import * as types from 'ee/geo_settings/store/mutation_types';
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
STRING_OVER_255
,
MOCK_NODES_PATH
}
from
'
../mock_data
'
;
import
{
STRING_OVER_255
,
MOCK_NODES_PATH
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
visitUrl
:
jest
.
fn
().
mockName
(
'
visitUrlMock
'
),
visitUrl
:
jest
.
fn
().
mockName
(
'
visitUrlMock
'
),
...
...
ee/spec/frontend/insights/components/insights_page_spec.js
View file @
0c6a3dcb
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlColumnChart
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
GlColumnChart
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
InsightsChart
from
'
ee/insights/components/insights_chart.vue
'
;
import
InsightsChart
from
'
ee/insights/components/insights_chart.vue
'
;
...
@@ -9,8 +10,7 @@ import { createStore } from 'ee/insights/stores';
...
@@ -9,8 +10,7 @@ import { createStore } from 'ee/insights/stores';
import
{
chartInfo
,
pageInfo
,
pageInfoNoCharts
,
barChartData
}
from
'
ee_jest/insights/mock_data
'
;
import
{
chartInfo
,
pageInfo
,
pageInfoNoCharts
,
barChartData
}
from
'
ee_jest/insights/mock_data
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Insights page component
'
,
()
=>
{
describe
(
'
Insights page component
'
,
()
=>
{
let
store
;
let
store
;
...
@@ -18,7 +18,6 @@ describe('Insights page component', () => {
...
@@ -18,7 +18,6 @@ describe('Insights page component', () => {
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
InsightsPage
,
{
wrapper
=
shallowMount
(
InsightsPage
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
queryEndpoint
:
`
${
TEST_HOST
}
/query`
,
queryEndpoint
:
`
${
TEST_HOST
}
/query`
,
...
...
ee/spec/frontend/insights/components/insights_spec.js
View file @
0c6a3dcb
import
{
GlAlert
,
GlDropdown
,
GlDropdownItem
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlAlert
,
GlDropdown
,
GlDropdownItem
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -8,8 +9,7 @@ import { createStore } from 'ee/insights/stores';
...
@@ -8,8 +9,7 @@ import { createStore } from 'ee/insights/stores';
import
{
pageInfo
}
from
'
ee_jest/insights/mock_data
'
;
import
{
pageInfo
}
from
'
ee_jest/insights/mock_data
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
defaultMocks
=
{
const
defaultMocks
=
{
$route
:
{
$route
:
{
params
:
{},
params
:
{},
...
@@ -23,7 +23,6 @@ const defaultMocks = {
...
@@ -23,7 +23,6 @@ const defaultMocks = {
const
createComponent
=
(
store
,
options
=
{})
=>
{
const
createComponent
=
(
store
,
options
=
{})
=>
{
const
{
mocks
=
defaultMocks
}
=
options
;
const
{
mocks
=
defaultMocks
}
=
options
;
return
shallowMount
(
Insights
,
{
return
shallowMount
(
Insights
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
endpoint
:
TEST_HOST
,
endpoint
:
TEST_HOST
,
...
...
ee/spec/frontend/issues/show/components/incidents/metrics_image_spec.js
View file @
0c6a3dcb
import
{
GlLink
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
,
mount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
merge
from
'
lodash/merge
'
;
import
merge
from
'
lodash/merge
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
MetricsImage
from
'
ee/issues/show/components/incidents/metrics_image.vue
'
;
import
MetricsImage
from
'
ee/issues/show/components/incidents/metrics_image.vue
'
;
...
@@ -14,8 +15,7 @@ const defaultProps = {
...
@@ -14,8 +15,7 @@ const defaultProps = {
const
mockEvent
=
{
preventDefault
:
jest
.
fn
()
};
const
mockEvent
=
{
preventDefault
:
jest
.
fn
()
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Metrics upload item
'
,
()
=>
{
describe
(
'
Metrics upload item
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -28,7 +28,6 @@ describe('Metrics upload item', () => {
...
@@ -28,7 +28,6 @@ describe('Metrics upload item', () => {
MetricsImage
,
MetricsImage
,
merge
(
merge
(
{
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
...
defaultProps
,
...
defaultProps
,
...
...
ee/spec/frontend/issues/show/components/incidents/metrics_tab_spec.js
View file @
0c6a3dcb
import
{
GlFormInput
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlFormInput
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
merge
from
'
lodash/merge
'
;
import
merge
from
'
lodash/merge
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
MetricsImage
from
'
ee/issues/show/components/incidents/metrics_image.vue
'
;
import
MetricsImage
from
'
ee/issues/show/components/incidents/metrics_image.vue
'
;
...
@@ -16,8 +17,7 @@ jest.mock('ee/issues/show/components/incidents/service', () => ({
...
@@ -16,8 +17,7 @@ jest.mock('ee/issues/show/components/incidents/service', () => ({
const
mockEvent
=
{
preventDefault
:
jest
.
fn
()
};
const
mockEvent
=
{
preventDefault
:
jest
.
fn
()
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Metrics tab
'
,
()
=>
{
describe
(
'
Metrics tab
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -30,7 +30,6 @@ describe('Metrics tab', () => {
...
@@ -30,7 +30,6 @@ describe('Metrics tab', () => {
MetricsTab
,
MetricsTab
,
merge
(
merge
(
{
{
localVue
,
store
,
store
,
provide
:
{
provide
:
{
canUpdate
:
true
,
canUpdate
:
true
,
...
...
ee/spec/frontend/issues/show/components/incidents/store/actions_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
import
{
getMetricImages
,
getMetricImages
,
...
@@ -25,8 +25,7 @@ const defaultState = {
...
@@ -25,8 +25,7 @@ const defaultState = {
projectId
:
'
2
'
,
projectId
:
'
2
'
,
};
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Metrics tab store actions
'
,
()
=>
{
describe
(
'
Metrics tab store actions
'
,
()
=>
{
let
store
;
let
store
;
...
...
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
View file @
0c6a3dcb
import
{
GlEmptyState
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -15,8 +16,7 @@ jest.mock('ee/issues_analytics/filtered_search_issues_analytics', () =>
...
@@ -15,8 +16,7 @@ jest.mock('ee/issues_analytics/filtered_search_issues_analytics', () =>
})),
})),
);
);
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Issue Analytics component
'
,
()
=>
{
describe
(
'
Issue Analytics component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -42,7 +42,6 @@ describe('Issue Analytics component', () => {
...
@@ -42,7 +42,6 @@ describe('Issue Analytics component', () => {
};
};
return
shallowMount
(
IssuesAnalytics
,
{
return
shallowMount
(
IssuesAnalytics
,
{
localVue
,
propsData
,
propsData
,
stubs
:
{
stubs
:
{
GlColumnChart
:
true
,
GlColumnChart
:
true
,
...
...
ee/spec/frontend/maintenance_mode_settings/components/app_spec.js
View file @
0c6a3dcb
import
{
GlToggle
,
GlFormTextarea
,
GlForm
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlToggle
,
GlFormTextarea
,
GlForm
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
MaintenanceModeSettingsApp
from
'
ee/maintenance_mode_settings/components/app.vue
'
;
import
MaintenanceModeSettingsApp
from
'
ee/maintenance_mode_settings/components/app.vue
'
;
import
{
MOCK_BASIC_SETTINGS_DATA
}
from
'
../mock_data
'
;
import
{
MOCK_BASIC_SETTINGS_DATA
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
MaintenanceModeSettingsApp
'
,
()
=>
{
describe
(
'
MaintenanceModeSettingsApp
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -26,7 +26,6 @@ describe('MaintenanceModeSettingsApp', () => {
...
@@ -26,7 +26,6 @@ describe('MaintenanceModeSettingsApp', () => {
});
});
wrapper
=
shallowMount
(
MaintenanceModeSettingsApp
,
{
wrapper
=
shallowMount
(
MaintenanceModeSettingsApp
,
{
localVue
,
store
,
store
,
});
});
};
};
...
...
ee/spec/frontend/members/components/ldap/ldap_dropdown_item_spec.js
View file @
0c6a3dcb
import
{
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
LdapDropdownItem
from
'
ee/members/components/ldap/ldap_dropdown_item.vue
'
;
import
LdapDropdownItem
from
'
ee/members/components/ldap/ldap_dropdown_item.vue
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
LdapDropdownItem
'
,
()
=>
{
describe
(
'
LdapDropdownItem
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -36,7 +36,6 @@ describe('LdapDropdownItem', () => {
...
@@ -36,7 +36,6 @@ describe('LdapDropdownItem', () => {
memberId
:
1
,
memberId
:
1
,
...
propsData
,
...
propsData
,
},
},
localVue
,
store
:
createStore
(),
store
:
createStore
(),
provide
:
{
provide
:
{
namespace
:
MEMBER_TYPES
.
user
,
namespace
:
MEMBER_TYPES
.
user
,
...
...
ee/spec/frontend/members/components/ldap/ldap_override_button_spec.js
View file @
0c6a3dcb
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
LdapOverrideButton
from
'
ee/members/components/ldap/ldap_override_button.vue
'
;
import
LdapOverrideButton
from
'
ee/members/components/ldap/ldap_override_button.vue
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
member
}
from
'
jest/members/mock_data
'
;
import
{
member
}
from
'
jest/members/mock_data
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
LdapOverrideButton
'
,
()
=>
{
describe
(
'
LdapOverrideButton
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -30,7 +30,6 @@ describe('LdapOverrideButton', () => {
...
@@ -30,7 +30,6 @@ describe('LdapOverrideButton', () => {
const
createComponent
=
(
propsData
=
{})
=>
{
const
createComponent
=
(
propsData
=
{})
=>
{
wrapper
=
mount
(
LdapOverrideButton
,
{
wrapper
=
mount
(
LdapOverrideButton
,
{
localVue
,
propsData
:
{
propsData
:
{
member
,
member
,
...
propsData
,
...
propsData
,
...
...
ee/spec/frontend/members/components/ldap/ldap_override_confirmation_modal_spec.js
View file @
0c6a3dcb
import
{
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlModal
}
from
'
@gitlab/ui
'
;
import
{
within
}
from
'
@testing-library/dom
'
;
import
{
within
}
from
'
@testing-library/dom
'
;
import
{
mount
,
create
LocalVue
,
create
Wrapper
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createWrapper
}
from
'
@vue/test-utils
'
;
import
{
nextTick
}
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
LdapOverrideConfirmationModal
from
'
ee/members/components/ldap/ldap_override_confirmation_modal.vue
'
;
import
LdapOverrideConfirmationModal
from
'
ee/members/components/ldap/ldap_override_confirmation_modal.vue
'
;
import
{
LDAP_OVERRIDE_CONFIRMATION_MODAL_ID
}
from
'
ee/members/constants
'
;
import
{
LDAP_OVERRIDE_CONFIRMATION_MODAL_ID
}
from
'
ee/members/constants
'
;
...
@@ -9,8 +9,7 @@ import waitForPromises from 'helpers/wait_for_promises';
...
@@ -9,8 +9,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import
{
member
}
from
'
jest/members/mock_data
'
;
import
{
member
}
from
'
jest/members/mock_data
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
LdapOverrideConfirmationModal
'
,
()
=>
{
describe
(
'
LdapOverrideConfirmationModal
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -48,7 +47,6 @@ describe('LdapOverrideConfirmationModal', () => {
...
@@ -48,7 +47,6 @@ describe('LdapOverrideConfirmationModal', () => {
const
createComponent
=
(
state
)
=>
{
const
createComponent
=
(
state
)
=>
{
wrapper
=
mount
(
LdapOverrideConfirmationModal
,
{
wrapper
=
mount
(
LdapOverrideConfirmationModal
,
{
localVue
,
store
:
createStore
(
state
),
store
:
createStore
(
state
),
provide
:
{
provide
:
{
namespace
:
MEMBER_TYPES
.
user
,
namespace
:
MEMBER_TYPES
.
user
,
...
...
ee/spec/frontend/members/components/table/member_table_cell_spec.js
View file @
0c6a3dcb
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
MembersTableCell
from
'
ee/members/components/table/members_table_cell.vue
'
;
import
MembersTableCell
from
'
ee/members/components/table/members_table_cell.vue
'
;
import
{
member
as
memberMock
,
directMember
}
from
'
jest/members/mock_data
'
;
import
{
member
as
memberMock
,
directMember
}
from
'
jest/members/mock_data
'
;
...
@@ -28,9 +29,8 @@ describe('MemberTableCell', () => {
...
@@ -28,9 +29,8 @@ describe('MemberTableCell', () => {
},
},
};
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
Vue
.
component
(
'
WrappedComponent
'
,
WrappedComponent
);
localVue
.
component
(
'
WrappedComponent
'
,
WrappedComponent
);
const
createStore
=
(
state
=
{})
=>
{
const
createStore
=
(
state
=
{})
=>
{
return
new
Vuex
.
Store
({
return
new
Vuex
.
Store
({
...
@@ -42,7 +42,6 @@ describe('MemberTableCell', () => {
...
@@ -42,7 +42,6 @@ describe('MemberTableCell', () => {
const
createComponent
=
(
propsData
,
state
=
{})
=>
{
const
createComponent
=
(
propsData
,
state
=
{})
=>
{
wrapper
=
mount
(
MembersTableCell
,
{
wrapper
=
mount
(
MembersTableCell
,
{
localVue
,
propsData
,
propsData
,
store
:
createStore
(
state
),
store
:
createStore
(
state
),
provide
:
{
provide
:
{
...
...
ee/spec/frontend/members/components/table/members_table_spec.js
View file @
0c6a3dcb
import
{
within
}
from
'
@testing-library/dom
'
;
import
{
within
}
from
'
@testing-library/dom
'
;
import
{
mount
,
createLocalVue
,
createWrapper
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createWrapper
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
member
as
memberMock
,
directMember
,
members
}
from
'
jest/members/mock_data
'
;
import
{
member
as
memberMock
,
directMember
,
members
}
from
'
jest/members/mock_data
'
;
import
MembersTable
from
'
~/members/components/table/members_table.vue
'
;
import
MembersTable
from
'
~/members/components/table/members_table.vue
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
import
{
MEMBER_TYPES
}
from
'
~/members/constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
MemberList
'
,
()
=>
{
describe
(
'
MemberList
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -33,7 +33,6 @@ describe('MemberList', () => {
...
@@ -33,7 +33,6 @@ describe('MemberList', () => {
const
createComponent
=
(
state
)
=>
{
const
createComponent
=
(
state
)
=>
{
wrapper
=
mount
(
MembersTable
,
{
wrapper
=
mount
(
MembersTable
,
{
localVue
,
store
:
createStore
(
state
),
store
:
createStore
(
state
),
provide
:
{
provide
:
{
sourceId
:
1
,
sourceId
:
1
,
...
...
ee/spec/frontend/notes/components/note_header_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
GitlabTeamMemberBadge
from
'
ee/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue
'
;
import
GitlabTeamMemberBadge
from
'
ee/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue
'
;
import
NoteHeader
from
'
~/notes/components/note_header.vue
'
;
import
NoteHeader
from
'
~/notes/components/note_header.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
NoteHeader component
'
,
()
=>
{
describe
(
'
NoteHeader component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -20,7 +20,6 @@ describe('NoteHeader component', () => {
...
@@ -20,7 +20,6 @@ describe('NoteHeader component', () => {
const
createComponent
=
(
props
)
=>
{
const
createComponent
=
(
props
)
=>
{
wrapper
=
shallowMount
(
NoteHeader
,
{
wrapper
=
shallowMount
(
NoteHeader
,
{
localVue
,
store
:
new
Vuex
.
Store
(),
store
:
new
Vuex
.
Store
(),
propsData
:
{
...
props
},
propsData
:
{
...
props
},
});
});
...
...
ee/spec/frontend/operations/components/dashboard/dashboard_spec.js
View file @
0c6a3dcb
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Dashboard
from
'
ee/operations/components/dashboard/dashboard.vue
'
;
import
Dashboard
from
'
ee/operations/components/dashboard/dashboard.vue
'
;
...
@@ -9,8 +10,7 @@ import waitForPromises from 'helpers/wait_for_promises';
...
@@ -9,8 +10,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
mockProjectData
,
mockText
}
from
'
../../mock_data
'
;
import
{
mockProjectData
,
mockText
}
from
'
../../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
dashboard component
'
,
()
=>
{
describe
(
'
dashboard component
'
,
()
=>
{
const
mockAddEndpoint
=
'
mock-addPath
'
;
const
mockAddEndpoint
=
'
mock-addPath
'
;
...
@@ -25,7 +25,6 @@ describe('dashboard component', () => {
...
@@ -25,7 +25,6 @@ describe('dashboard component', () => {
const
mountComponent
=
({
stubs
=
{},
state
=
{}
}
=
{})
=>
const
mountComponent
=
({
stubs
=
{},
state
=
{}
}
=
{})
=>
mount
(
Dashboard
,
{
mount
(
Dashboard
,
{
store
,
store
,
localVue
,
propsData
:
{
propsData
:
{
addPath
:
mockAddEndpoint
,
addPath
:
mockAddEndpoint
,
listPath
:
mockListEndpoint
,
listPath
:
mockListEndpoint
,
...
...
ee/spec/frontend/operations/components/dashboard/project_spec.js
View file @
0c6a3dcb
import
{
GlSprintf
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlSprintf
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Project
from
'
ee/operations/components/dashboard/project.vue
'
;
import
Project
from
'
ee/operations/components/dashboard/project.vue
'
;
import
ProjectHeader
from
'
ee/operations/components/dashboard/project_header.vue
'
;
import
ProjectHeader
from
'
ee/operations/components/dashboard/project_header.vue
'
;
...
@@ -8,8 +9,7 @@ import store from 'ee/vue_shared/dashboards/store';
...
@@ -8,8 +9,7 @@ import store from 'ee/vue_shared/dashboards/store';
import
Commit
from
'
~/vue_shared/components/commit.vue
'
;
import
Commit
from
'
~/vue_shared/components/commit.vue
'
;
import
{
mockOneProject
}
from
'
../../mock_data
'
;
import
{
mockOneProject
}
from
'
../../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
project component
'
,
()
=>
{
describe
(
'
project component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -17,7 +17,6 @@ describe('project component', () => {
...
@@ -17,7 +17,6 @@ describe('project component', () => {
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
Project
,
{
wrapper
=
shallowMount
(
Project
,
{
store
,
store
,
localVue
,
propsData
:
{
propsData
:
{
project
:
mockOneProject
,
project
:
mockOneProject
,
...
props
,
...
props
,
...
...
ee/spec/frontend/pages/groups/saml_providers/saml_members/index_spec.js
View file @
0c6a3dcb
import
{
GlTable
,
GlDeprecatedSkeletonLoading
as
GlSkeletonLoading
}
from
'
@gitlab/ui
'
;
import
{
GlTable
,
GlDeprecatedSkeletonLoading
as
GlSkeletonLoading
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
MembersApp
from
'
ee/pages/groups/saml_providers/saml_members/index.vue
'
;
import
MembersApp
from
'
ee/pages/groups/saml_providers/saml_members/index.vue
'
;
import
createInitialState
from
'
ee/pages/groups/saml_providers/saml_members/store/state
'
;
import
createInitialState
from
'
ee/pages/groups/saml_providers/saml_members/store/state
'
;
import
TablePagination
from
'
~/vue_shared/components/pagination/table_pagination.vue
'
;
import
TablePagination
from
'
~/vue_shared/components/pagination/table_pagination.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
SAML providers members app
'
,
()
=>
{
describe
(
'
SAML providers members app
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -25,7 +25,6 @@ describe('SAML providers members app', () => {
...
@@ -25,7 +25,6 @@ describe('SAML providers members app', () => {
wrapper
=
shallowMount
(
MembersApp
,
{
wrapper
=
shallowMount
(
MembersApp
,
{
store
,
store
,
localVue
,
});
});
};
};
...
...
ee/spec/frontend/related_items_tree/components/create_epic_form_spec.js
View file @
0c6a3dcb
import
{
GlFormInput
,
GlButton
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlFormInput
,
GlButton
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -9,8 +10,7 @@ import createDefaultStore from 'ee/related_items_tree/store';
...
@@ -9,8 +10,7 @@ import createDefaultStore from 'ee/related_items_tree/store';
import
{
mockInitialConfig
,
mockParentItem
}
from
'
../mock_data
'
;
import
{
mockInitialConfig
,
mockParentItem
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
(
isSubmitting
=
false
)
=>
{
const
createComponent
=
(
isSubmitting
=
false
)
=>
{
const
store
=
createDefaultStore
();
const
store
=
createDefaultStore
();
...
@@ -19,7 +19,6 @@ const createComponent = (isSubmitting = false) => {
...
@@ -19,7 +19,6 @@ const createComponent = (isSubmitting = false) => {
store
.
dispatch
(
'
setInitialParentItem
'
,
mockParentItem
);
store
.
dispatch
(
'
setInitialParentItem
'
,
mockParentItem
);
return
shallowMount
(
CreateEpicForm
,
{
return
shallowMount
(
CreateEpicForm
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
isSubmitting
,
isSubmitting
,
...
...
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
View file @
0c6a3dcb
...
@@ -8,7 +8,8 @@ import {
...
@@ -8,7 +8,8 @@ import {
GlDropdownDivider
,
GlDropdownDivider
,
GlDropdownSectionHeader
,
GlDropdownSectionHeader
,
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
mockProjects
from
'
test_fixtures_static/projects.json
'
;
import
mockProjects
from
'
test_fixtures_static/projects.json
'
;
...
@@ -23,8 +24,7 @@ import {
...
@@ -23,8 +24,7 @@ import {
mockMixedFrequentlyUsedProjects
,
mockMixedFrequentlyUsedProjects
,
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
const
store
=
createDefaultStore
();
const
store
=
createDefaultStore
();
...
@@ -33,7 +33,6 @@ const createComponent = () => {
...
@@ -33,7 +33,6 @@ const createComponent = () => {
store
.
dispatch
(
'
setInitialParentItem
'
,
mockParentItem
);
store
.
dispatch
(
'
setInitialParentItem
'
,
mockParentItem
);
return
shallowMount
(
CreateIssueForm
,
{
return
shallowMount
(
CreateIssueForm
,
{
localVue
,
store
,
store
,
});
});
};
};
...
...
ee/spec/frontend/related_items_tree/components/related_items_tree_app_spec.js
View file @
0c6a3dcb
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -15,8 +16,7 @@ import { issuableTypesMap } from '~/related_issues/constants';
...
@@ -15,8 +16,7 @@ import { issuableTypesMap } from '~/related_issues/constants';
import
{
mockInitialConfig
,
mockParentItem
,
mockEpics
,
mockIssues
}
from
'
../mock_data
'
;
import
{
mockInitialConfig
,
mockParentItem
,
mockEpics
,
mockIssues
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
const
store
=
createDefaultStore
();
const
store
=
createDefaultStore
();
...
@@ -29,7 +29,6 @@ const createComponent = () => {
...
@@ -29,7 +29,6 @@ const createComponent = () => {
});
});
return
shallowMount
(
RelatedItemsTreeApp
,
{
return
shallowMount
(
RelatedItemsTreeApp
,
{
localVue
,
store
,
store
,
stubs
:
{
stubs
:
{
SlotSwitch
,
SlotSwitch
,
...
...
ee/spec/frontend/related_items_tree/components/related_items_tree_header_spec.js
View file @
0c6a3dcb
import
{
GlTooltip
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlTooltip
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
EpicHealthStatus
from
'
ee/related_items_tree/components/epic_health_status.vue
'
;
import
EpicHealthStatus
from
'
ee/related_items_tree/components/epic_health_status.vue
'
;
...
@@ -12,8 +13,7 @@ import * as epicUtils from 'ee/related_items_tree/utils/epic_utils';
...
@@ -12,8 +13,7 @@ import * as epicUtils from 'ee/related_items_tree/utils/epic_utils';
import
{
issuableTypesMap
}
from
'
~/related_issues/constants
'
;
import
{
issuableTypesMap
}
from
'
~/related_issues/constants
'
;
import
{
mockInitialConfig
,
mockParentItem
,
mockQueryResponse
}
from
'
../mock_data
'
;
import
{
mockInitialConfig
,
mockParentItem
,
mockQueryResponse
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
({
slots
}
=
{})
=>
{
const
createComponent
=
({
slots
}
=
{})
=>
{
const
store
=
createDefaultStore
();
const
store
=
createDefaultStore
();
...
@@ -37,7 +37,6 @@ const createComponent = ({ slots } = {}) => {
...
@@ -37,7 +37,6 @@ const createComponent = ({ slots } = {}) => {
store
.
dispatch
(
'
setChildrenCount
'
,
mockParentItem
.
descendantCounts
);
store
.
dispatch
(
'
setChildrenCount
'
,
mockParentItem
.
descendantCounts
);
return
shallowMount
(
RelatedItemsTreeHeader
,
{
return
shallowMount
(
RelatedItemsTreeHeader
,
{
localVue
,
store
,
store
,
slots
,
slots
,
});
});
...
...
ee/spec/frontend/related_items_tree/components/tree_item_remove_modal_spec.js
View file @
0c6a3dcb
import
{
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlModal
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
TreeItemRemoveModal
from
'
ee/related_items_tree/components/tree_item_remove_modal.vue
'
;
import
TreeItemRemoveModal
from
'
ee/related_items_tree/components/tree_item_remove_modal.vue
'
;
...
@@ -11,8 +12,7 @@ import { PathIdSeparator } from '~/related_issues/constants';
...
@@ -11,8 +12,7 @@ import { PathIdSeparator } from '~/related_issues/constants';
import
{
mockParentItem
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
import
{
mockParentItem
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
mockItem
=
{
const
mockItem
=
{
...
mockIssue1
,
...
mockIssue1
,
...
@@ -41,7 +41,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
...
@@ -41,7 +41,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
});
});
return
shallowMount
(
TreeItemRemoveModal
,
{
return
shallowMount
(
TreeItemRemoveModal
,
{
localVue
,
store
,
store
,
});
});
};
};
...
...
ee/spec/frontend/related_items_tree/components/tree_item_spec.js
View file @
0c6a3dcb
import
{
GlButton
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
TreeItem
from
'
ee/related_items_tree/components/tree_item.vue
'
;
import
TreeItem
from
'
ee/related_items_tree/components/tree_item.vue
'
;
...
@@ -15,8 +16,7 @@ import { mockParentItem, mockQueryResponse, mockEpic1 } from '../mock_data';
...
@@ -15,8 +16,7 @@ import { mockParentItem, mockQueryResponse, mockEpic1 } from '../mock_data';
const
mockItem
=
{
...
mockEpic1
,
type
:
ChildType
.
Epic
,
pathIdSeparator
:
PathIdSeparator
.
Epic
};
const
mockItem
=
{
...
mockEpic1
,
type
:
ChildType
.
Epic
,
pathIdSeparator
:
PathIdSeparator
.
Epic
};
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
(
parentItem
=
mockParentItem
,
item
=
mockItem
)
=>
{
const
createComponent
=
(
parentItem
=
mockParentItem
,
item
=
mockItem
)
=>
{
const
store
=
createDefaultStore
();
const
store
=
createDefaultStore
();
...
@@ -39,7 +39,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
...
@@ -39,7 +39,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
});
});
return
shallowMount
(
TreeItem
,
{
return
shallowMount
(
TreeItem
,
{
localVue
,
store
,
store
,
stubs
:
{
stubs
:
{
'
tree-root
'
:
TreeRoot
,
'
tree-root
'
:
TreeRoot
,
...
...
ee/spec/frontend/related_items_tree/components/tree_root_spec.js
View file @
0c6a3dcb
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Draggable
from
'
vuedraggable
'
;
import
Draggable
from
'
vuedraggable
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -19,8 +20,7 @@ import {
...
@@ -19,8 +20,7 @@ import {
const
{
epic
}
=
mockQueryResponse
.
data
.
group
;
const
{
epic
}
=
mockQueryResponse
.
data
.
group
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
createComponent
=
({
const
createComponent
=
({
parentItem
=
mockParentItem
,
parentItem
=
mockParentItem
,
...
@@ -48,7 +48,6 @@ const createComponent = ({
...
@@ -48,7 +48,6 @@ const createComponent = ({
});
});
return
shallowMount
(
TreeRoot
,
{
return
shallowMount
(
TreeRoot
,
{
localVue
,
store
,
store
,
stubs
:
{
stubs
:
{
'
tree-item
'
:
true
,
'
tree-item
'
:
true
,
...
...
ee/spec/frontend/reports/browser_performance_report/grouped_browser_performance_reports_app_spec.js
View file @
0c6a3dcb
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
GroupedBrowserPerformanceReportsApp
from
'
ee/reports/browser_performance_report/grouped_browser_performance_reports_app.vue
'
;
import
GroupedBrowserPerformanceReportsApp
from
'
ee/reports/browser_performance_report/grouped_browser_performance_reports_app.vue
'
;
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
jest
.
mock
(
'
~/api.js
'
);
jest
.
mock
(
'
~/api.js
'
);
const
localVue
=
createLocalVue
();
describe
(
'
Grouped test reports app
'
,
()
=>
{
describe
(
'
Grouped test reports app
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
mountComponent
=
()
=>
{
const
mountComponent
=
()
=>
{
wrapper
=
mount
(
GroupedBrowserPerformanceReportsApp
,
{
wrapper
=
mount
(
GroupedBrowserPerformanceReportsApp
,
{
localVue
,
propsData
:
{
propsData
:
{
status
:
''
,
status
:
''
,
loadingText
:
''
,
loadingText
:
''
,
...
...
ee/spec/frontend/reports/load_performance_report/grouped_load_performance_reports_app_spec.js
View file @
0c6a3dcb
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
GroupedLoadPerformanceReportsApp
from
'
ee/reports/load_performance_report/grouped_load_performance_reports_app.vue
'
;
import
GroupedLoadPerformanceReportsApp
from
'
ee/reports/load_performance_report/grouped_load_performance_reports_app.vue
'
;
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
jest
.
mock
(
'
~/api.js
'
);
jest
.
mock
(
'
~/api.js
'
);
const
localVue
=
createLocalVue
();
describe
(
'
Grouped load performance reports app
'
,
()
=>
{
describe
(
'
Grouped load performance reports app
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
mountComponent
=
()
=>
{
const
mountComponent
=
()
=>
{
wrapper
=
mount
(
GroupedLoadPerformanceReportsApp
,
{
wrapper
=
mount
(
GroupedLoadPerformanceReportsApp
,
{
localVue
,
propsData
:
{
propsData
:
{
status
:
''
,
status
:
''
,
loadingText
:
''
,
loadingText
:
''
,
...
...
ee/spec/frontend/roadmap/components/epics_list_section_spec.js
View file @
0c6a3dcb
import
{
GlIntersectionObserver
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlIntersectionObserver
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
EpicItem
from
'
ee/roadmap/components/epic_item.vue
'
;
import
EpicItem
from
'
ee/roadmap/components/epic_item.vue
'
;
import
EpicsListSection
from
'
ee/roadmap/components/epics_list_section.vue
'
;
import
EpicsListSection
from
'
ee/roadmap/components/epics_list_section.vue
'
;
import
{
import
{
...
@@ -56,8 +55,6 @@ const mockEpics = store.state.epics;
...
@@ -56,8 +55,6 @@ const mockEpics = store.state.epics;
store
.
state
.
childrenEpics
[
mockEpics
[
0
].
id
]
=
[
mockFormattedChildEpic1
,
mockFormattedChildEpic2
];
store
.
state
.
childrenEpics
[
mockEpics
[
0
].
id
]
=
[
mockFormattedChildEpic1
,
mockFormattedChildEpic2
];
const
localVue
=
createLocalVue
();
const
createComponent
=
({
const
createComponent
=
({
epics
=
mockEpics
,
epics
=
mockEpics
,
timeframe
=
mockTimeframeMonths
,
timeframe
=
mockTimeframeMonths
,
...
@@ -66,7 +63,6 @@ const createComponent = ({
...
@@ -66,7 +63,6 @@ const createComponent = ({
hasFiltersApplied
=
false
,
hasFiltersApplied
=
false
,
}
=
{})
=>
{
}
=
{})
=>
{
return
shallowMountExtended
(
EpicsListSection
,
{
return
shallowMountExtended
(
EpicsListSection
,
{
localVue
,
store
,
store
,
stubs
:
{
stubs
:
{
EpicItem
:
false
,
EpicItem
:
false
,
...
...
ee/spec/frontend/roadmap/components/milestones_list_section_spec.js
View file @
0c6a3dcb
import
{
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
MilestoneTimeline
from
'
ee/roadmap/components/milestone_timeline.vue
'
;
import
MilestoneTimeline
from
'
ee/roadmap/components/milestone_timeline.vue
'
;
import
milestonesListSectionComponent
from
'
ee/roadmap/components/milestones_list_section.vue
'
;
import
milestonesListSectionComponent
from
'
ee/roadmap/components/milestones_list_section.vue
'
;
import
{
import
{
...
@@ -56,9 +56,7 @@ describe('MilestonesListSectionComponent', () => {
...
@@ -56,9 +56,7 @@ describe('MilestonesListSectionComponent', () => {
};
};
const
createWrapper
=
(
props
=
{})
=>
{
const
createWrapper
=
(
props
=
{})
=>
{
const
localVue
=
createLocalVue
();
wrapper
=
shallowMount
(
milestonesListSectionComponent
,
{
wrapper
=
shallowMount
(
milestonesListSectionComponent
,
{
localVue
,
store
,
store
,
stubs
:
{
stubs
:
{
MilestoneTimeline
:
false
,
MilestoneTimeline
:
false
,
...
...
ee/spec/frontend/roadmap/components/roadmap_shell_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
EpicsListSection
from
'
ee/roadmap/components/epics_list_section.vue
'
;
import
EpicsListSection
from
'
ee/roadmap/components/epics_list_section.vue
'
;
...
@@ -26,8 +27,7 @@ const mockTimeframeMonths = getTimeframeForRangeType({
...
@@ -26,8 +27,7 @@ const mockTimeframeMonths = getTimeframeForRangeType({
});
});
describe
(
'
RoadmapShell
'
,
()
=>
{
describe
(
'
RoadmapShell
'
,
()
=>
{
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
let
store
;
let
store
;
let
wrapper
;
let
wrapper
;
...
@@ -51,7 +51,6 @@ describe('RoadmapShell', () => {
...
@@ -51,7 +51,6 @@ describe('RoadmapShell', () => {
el
,
el
,
)
=>
{
)
=>
{
wrapper
=
shallowMount
(
RoadmapShell
,
{
wrapper
=
shallowMount
(
RoadmapShell
,
{
localVue
,
store
,
store
,
attachTo
:
el
,
attachTo
:
el
,
propsData
:
{
propsData
:
{
...
...
ee/spec/frontend/seat_usage/components/remove_billable_member_modal_spec.js
View file @
0c6a3dcb
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
nextTick
}
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
RemoveBillableMemberModal
from
'
ee/seat_usage/components/remove_billable_member_modal.vue
'
;
import
RemoveBillableMemberModal
from
'
ee/seat_usage/components/remove_billable_member_modal.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
RemoveBillableMemberModal
'
,
()
=>
{
describe
(
'
RemoveBillableMemberModal
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -32,7 +31,6 @@ describe('RemoveBillableMemberModal', () => {
...
@@ -32,7 +31,6 @@ describe('RemoveBillableMemberModal', () => {
stubs
:
{
stubs
:
{
GlSprintf
,
GlSprintf
,
},
},
localVue
,
});
});
};
};
...
...
ee/spec/frontend/seat_usage/components/subscription_seat_details_spec.js
View file @
0c6a3dcb
import
{
GlTable
}
from
'
@gitlab/ui
'
;
import
{
GlTable
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
SubscriptionSeatDetails
from
'
ee/seat_usage/components/subscription_seat_details.vue
'
;
import
SubscriptionSeatDetails
from
'
ee/seat_usage/components/subscription_seat_details.vue
'
;
...
@@ -9,8 +10,7 @@ import initState from 'ee/seat_usage/store/state';
...
@@ -9,8 +10,7 @@ import initState from 'ee/seat_usage/store/state';
import
{
mockMemberDetails
}
from
'
ee_jest/seat_usage/mock_data
'
;
import
{
mockMemberDetails
}
from
'
ee_jest/seat_usage/mock_data
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
SubscriptionSeatDetails
'
,
()
=>
{
describe
(
'
SubscriptionSeatDetails
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -26,7 +26,6 @@ describe('SubscriptionSeatDetails', () => {
...
@@ -26,7 +26,6 @@ describe('SubscriptionSeatDetails', () => {
seatMemberId
:
1
,
seatMemberId
:
1
,
},
},
store
:
new
Vuex
.
Store
({
...
store
,
actions
}),
store
:
new
Vuex
.
Store
({
...
store
,
actions
}),
localVue
,
stubs
:
{
stubs
:
{
GlTable
:
stubComponent
(
GlTable
),
GlTable
:
stubComponent
(
GlTable
),
},
},
...
...
ee/spec/frontend/seat_usage/components/subscription_seats_spec.js
View file @
0c6a3dcb
...
@@ -8,7 +8,8 @@ import {
...
@@ -8,7 +8,8 @@ import {
GlBadge
,
GlBadge
,
GlModal
,
GlModal
,
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
{
mount
,
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SubscriptionSeats
from
'
ee/seat_usage/components/subscription_seats.vue
'
;
import
SubscriptionSeats
from
'
ee/seat_usage/components/subscription_seats.vue
'
;
import
{
CANNOT_REMOVE_BILLABLE_MEMBER_MODAL_CONTENT
}
from
'
ee/seat_usage/constants
'
;
import
{
CANNOT_REMOVE_BILLABLE_MEMBER_MODAL_CONTENT
}
from
'
ee/seat_usage/constants
'
;
...
@@ -16,8 +17,7 @@ import { mockDataSeats, mockTableItems } from 'ee_jest/seat_usage/mock_data';
...
@@ -16,8 +17,7 @@ import { mockDataSeats, mockTableItems } from 'ee_jest/seat_usage/mock_data';
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
FilterSortContainerRoot
from
'
~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
'
;
import
FilterSortContainerRoot
from
'
~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
const
actionSpies
=
{
const
actionSpies
=
{
fetchBillableMembersList
:
jest
.
fn
(),
fetchBillableMembersList
:
jest
.
fn
(),
...
@@ -64,7 +64,6 @@ describe('Subscription Seats', () => {
...
@@ -64,7 +64,6 @@ describe('Subscription Seats', () => {
return
extendedWrapper
(
return
extendedWrapper
(
mountFn
(
SubscriptionSeats
,
{
mountFn
(
SubscriptionSeats
,
{
store
:
fakeStore
({
initialState
,
initialGetters
}),
store
:
fakeStore
({
initialState
,
initialGetters
}),
localVue
,
}),
}),
);
);
};
};
...
...
ee/spec/frontend/security_dashboard/components/pipeline/filters_spec.js
View file @
0c6a3dcb
import
{
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Filters
from
'
ee/security_dashboard/components/pipeline/filters.vue
'
;
import
Filters
from
'
ee/security_dashboard/components/pipeline/filters.vue
'
;
import
{
simpleScannerFilter
}
from
'
ee/security_dashboard/helpers
'
;
import
{
simpleScannerFilter
}
from
'
ee/security_dashboard/helpers
'
;
...
@@ -7,8 +8,7 @@ import createStore from 'ee/security_dashboard/store';
...
@@ -7,8 +8,7 @@ import createStore from 'ee/security_dashboard/store';
import
state
from
'
ee/security_dashboard/store/modules/filters/state
'
;
import
state
from
'
ee/security_dashboard/store/modules/filters/state
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Filter component
'
,
()
=>
{
describe
(
'
Filter component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -17,7 +17,6 @@ describe('Filter component', () => {
...
@@ -17,7 +17,6 @@ describe('Filter component', () => {
const
createWrapper
=
({
mountFn
=
shallowMount
}
=
{})
=>
{
const
createWrapper
=
({
mountFn
=
shallowMount
}
=
{})
=>
{
wrapper
=
extendedWrapper
(
wrapper
=
extendedWrapper
(
mountFn
(
Filters
,
{
mountFn
(
Filters
,
{
localVue
,
store
,
store
,
slots
:
{
slots
:
{
buttons
:
'
<div class="button-slot"></div>
'
,
buttons
:
'
<div class="button-slot"></div>
'
,
...
...
ee/spec/frontend/security_dashboard/components/pipeline/security_dashboard_table_row_spec.js
View file @
0c6a3dcb
import
{
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
mount
,
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SecurityDashboardTableRow
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue
'
;
import
SecurityDashboardTableRow
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue
'
;
import
VulnerabilityActionButtons
from
'
ee/security_dashboard/components/pipeline/vulnerability_action_buttons.vue
'
;
import
VulnerabilityActionButtons
from
'
ee/security_dashboard/components/pipeline/vulnerability_action_buttons.vue
'
;
...
@@ -11,8 +12,7 @@ import { trimText } from 'helpers/text_helper';
...
@@ -11,8 +12,7 @@ import { trimText } from 'helpers/text_helper';
import
{
BV_SHOW_MODAL
}
from
'
~/lib/utils/constants
'
;
import
{
BV_SHOW_MODAL
}
from
'
~/lib/utils/constants
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Security Dashboard Table Row
'
,
()
=>
{
describe
(
'
Security Dashboard Table Row
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -20,7 +20,6 @@ describe('Security Dashboard Table Row', () => {
...
@@ -20,7 +20,6 @@ describe('Security Dashboard Table Row', () => {
const
createComponent
=
(
mountFunc
,
{
props
=
{}
}
=
{})
=>
{
const
createComponent
=
(
mountFunc
,
{
props
=
{}
}
=
{})
=>
{
wrapper
=
mountFunc
(
SecurityDashboardTableRow
,
{
wrapper
=
mountFunc
(
SecurityDashboardTableRow
,
{
localVue
,
store
,
store
,
propsData
:
{
propsData
:
{
...
props
,
...
props
,
...
...
ee/spec/frontend/security_dashboard/components/pipeline/security_dashboard_table_spec.js
View file @
0c6a3dcb
import
{
GlEmptyState
,
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
SecurityDashboardTable
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table.vue
'
;
import
SecurityDashboardTable
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table.vue
'
;
import
SecurityDashboardTableRow
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue
'
;
import
SecurityDashboardTableRow
from
'
ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue
'
;
...
@@ -12,8 +13,7 @@ import {
...
@@ -12,8 +13,7 @@ import {
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
describe
(
'
Security Dashboard Table
'
,
()
=>
{
describe
(
'
Security Dashboard Table
'
,
()
=>
{
const
vulnerabilitiesEndpoint
=
'
/vulnerabilitiesEndpoint.json
'
;
const
vulnerabilitiesEndpoint
=
'
/vulnerabilitiesEndpoint.json
'
;
...
@@ -23,7 +23,6 @@ describe('Security Dashboard Table', () => {
...
@@ -23,7 +23,6 @@ describe('Security Dashboard Table', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
store
=
createStore
();
store
=
createStore
();
wrapper
=
shallowMountExtended
(
SecurityDashboardTable
,
{
wrapper
=
shallowMountExtended
(
SecurityDashboardTable
,
{
localVue
,
store
,
store
,
});
});
store
.
state
.
vulnerabilities
.
vulnerabilitiesEndpoint
=
vulnerabilitiesEndpoint
;
store
.
state
.
vulnerabilities
.
vulnerabilitiesEndpoint
=
vulnerabilitiesEndpoint
;
...
@@ -113,7 +112,6 @@ describe('Security Dashboard Table', () => {
...
@@ -113,7 +112,6 @@ describe('Security Dashboard Table', () => {
describe
(
'
with a custom empty state
'
,
()
=>
{
describe
(
'
with a custom empty state
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
SecurityDashboardTable
,
{
wrapper
=
shallowMount
(
SecurityDashboardTable
,
{
localVue
,
store
,
store
,
slots
:
{
slots
:
{
'
empty-state
'
:
'
<div class="customEmptyState">Hello World</div>
'
,
'
empty-state
'
:
'
<div class="customEmptyState">Hello World</div>
'
,
...
...
ee/spec/frontend/security_dashboard/components/pipeline/selection_summary_vuex_spec.js
View file @
0c6a3dcb
import
{
GlButton
,
GlFormSelect
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlFormSelect
}
from
'
@gitlab/ui
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -13,8 +14,7 @@ import waitForPromises from 'helpers/wait_for_promises';
...
@@ -13,8 +14,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import
httpStatus
from
'
~/lib/utils/http_status
'
;
import
httpStatus
from
'
~/lib/utils/http_status
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
import
mockDataVulnerabilities
from
'
../../store/modules/vulnerabilities/data/mock_data_vulnerabilities
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
jest
.
mock
(
'
~/vue_shared/plugins/global_toast
'
);
jest
.
mock
(
'
~/vue_shared/plugins/global_toast
'
);
...
@@ -26,7 +26,6 @@ describe('Selection Summary', () => {
...
@@ -26,7 +26,6 @@ describe('Selection Summary', () => {
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
store
=
createStore
();
store
=
createStore
();
wrapper
=
mount
(
SelectionSummary
,
{
wrapper
=
mount
(
SelectionSummary
,
{
localVue
,
store
,
store
,
});
});
...
...
ee/spec/frontend/security_dashboard/components/shared/filters/scanner_filter_spec.js
View file @
0c6a3dcb
import
{
GlDropdownItem
,
GlDropdownDivider
}
from
'
@gitlab/ui
'
;
import
{
GlDropdownItem
,
GlDropdownDivider
}
from
'
@gitlab/ui
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
{
sampleSize
,
cloneDeep
}
from
'
lodash
'
;
import
{
sampleSize
,
cloneDeep
}
from
'
lodash
'
;
import
VueRouter
from
'
vue-router
'
;
import
VueRouter
from
'
vue-router
'
;
import
FilterItem
from
'
ee/security_dashboard/components/shared/filters/filter_item.vue
'
;
import
FilterItem
from
'
ee/security_dashboard/components/shared/filters/filter_item.vue
'
;
...
@@ -7,8 +8,7 @@ import ScannerFilter from 'ee/security_dashboard/components/shared/filters/scann
...
@@ -7,8 +8,7 @@ import ScannerFilter from 'ee/security_dashboard/components/shared/filters/scann
import
{
DEFAULT_SCANNER
,
SCANNER_ID_PREFIX
}
from
'
ee/security_dashboard/constants
'
;
import
{
DEFAULT_SCANNER
,
SCANNER_ID_PREFIX
}
from
'
ee/security_dashboard/constants
'
;
import
{
vendorScannerFilterNoClusterImage
}
from
'
ee/security_dashboard/helpers
'
;
import
{
vendorScannerFilterNoClusterImage
}
from
'
ee/security_dashboard/helpers
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
VueRouter
);
localVue
.
use
(
VueRouter
);
const
router
=
new
VueRouter
();
const
router
=
new
VueRouter
();
const
createScannerConfig
=
(
vendor
,
reportType
,
id
)
=>
({
const
createScannerConfig
=
(
vendor
,
reportType
,
id
)
=>
({
...
@@ -44,7 +44,6 @@ describe('Scanner Filter component', () => {
...
@@ -44,7 +44,6 @@ describe('Scanner Filter component', () => {
filter
=
cloneDeep
(
vendorScannerFilterNoClusterImage
);
filter
=
cloneDeep
(
vendorScannerFilterNoClusterImage
);
wrapper
=
shallowMount
(
ScannerFilter
,
{
wrapper
=
shallowMount
(
ScannerFilter
,
{
localVue
,
router
,
router
,
propsData
:
{
filter
},
propsData
:
{
filter
},
provide
:
{
scanners
},
provide
:
{
scanners
},
...
...
ee/spec/frontend/security_dashboard/components/shared/filters/simple_filter_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
VueRouter
from
'
vue-router
'
;
import
VueRouter
from
'
vue-router
'
;
import
SimpleFilter
from
'
ee/security_dashboard/components/shared/filters/simple_filter.vue
'
;
import
SimpleFilter
from
'
ee/security_dashboard/components/shared/filters/simple_filter.vue
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
VueRouter
);
localVue
.
use
(
VueRouter
);
const
router
=
new
VueRouter
();
const
router
=
new
VueRouter
();
const
generateOptions
=
(
length
)
=>
const
generateOptions
=
(
length
)
=>
...
@@ -24,7 +24,6 @@ describe('Simple Filter component', () => {
...
@@ -24,7 +24,6 @@ describe('Simple Filter component', () => {
const
createWrapper
=
(
filterOptions
,
props
)
=>
{
const
createWrapper
=
(
filterOptions
,
props
)
=>
{
wrapper
=
shallowMount
(
SimpleFilter
,
{
wrapper
=
shallowMount
(
SimpleFilter
,
{
localVue
,
router
,
router
,
propsData
:
{
filter
:
{
...
filter
,
...
filterOptions
},
...
props
},
propsData
:
{
filter
:
{
...
filter
,
...
filterOptions
},
...
props
},
});
});
...
...
ee/spec/frontend/security_dashboard/components/shared/vulnerability_report/vulnerability_report_tabs_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
GlTabs
,
GlTab
,
GlBadge
}
from
'
@gitlab/ui
'
;
import
{
GlTabs
,
GlTab
,
GlBadge
}
from
'
@gitlab/ui
'
;
import
{
nextTick
}
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
VueRouter
from
'
vue-router
'
;
import
VueRouter
from
'
vue-router
'
;
import
VulnerabilityReportTabs
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report_tabs.vue
'
;
import
VulnerabilityReportTabs
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report_tabs.vue
'
;
import
VulnerabilityReport
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report.vue
'
;
import
VulnerabilityReport
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report.vue
'
;
...
@@ -11,8 +10,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
...
@@ -11,8 +10,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import
{
DASHBOARD_TYPES
}
from
'
ee/security_dashboard/store/constants
'
;
import
{
DASHBOARD_TYPES
}
from
'
ee/security_dashboard/store/constants
'
;
import
{
REPORT_TAB
}
from
'
ee/security_dashboard/components/shared/vulnerability_report/constants
'
;
import
{
REPORT_TAB
}
from
'
ee/security_dashboard/components/shared/vulnerability_report/constants
'
;
const
localVue
=
createLocalVue
();
Vue
.
use
(
VueRouter
);
localVue
.
use
(
VueRouter
);
const
router
=
new
VueRouter
();
const
router
=
new
VueRouter
();
const
countsDevelopment
=
[
const
countsDevelopment
=
[
...
@@ -37,7 +35,6 @@ describe('Vulnerability report tabs component', () => {
...
@@ -37,7 +35,6 @@ describe('Vulnerability report tabs component', () => {
const
createWrapper
=
({
showProjectFilter
=
false
}
=
{})
=>
{
const
createWrapper
=
({
showProjectFilter
=
false
}
=
{})
=>
{
wrapper
=
shallowMountExtended
(
VulnerabilityReportTabs
,
{
wrapper
=
shallowMountExtended
(
VulnerabilityReportTabs
,
{
localVue
,
router
,
router
,
provide
:
{
provide
:
{
fullPath
:
'
/full/path
'
,
fullPath
:
'
/full/path
'
,
...
...
ee/spec/frontend/security_dashboard/components/shared/vulnerability_report_spec.js
View file @
0c6a3dcb
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
{
PortalTarget
}
from
'
portal-vue
'
;
import
{
PortalTarget
}
from
'
portal-vue
'
;
import
{
nextTick
}
from
'
vue
'
;
import
{
nextTick
}
from
'
vue
'
;
...
@@ -36,10 +36,7 @@ describe('Vulnerability Report', () => {
...
@@ -36,10 +36,7 @@ describe('Vulnerability Report', () => {
const
findHeader
=
()
=>
wrapper
.
find
(
'
h2
'
);
const
findHeader
=
()
=>
wrapper
.
find
(
'
h2
'
);
const
createWrapper
=
({
data
=
{},
mocks
,
provide
})
=>
{
const
createWrapper
=
({
data
=
{},
mocks
,
provide
})
=>
{
const
localVue
=
createLocalVue
();
return
shallowMount
(
VulnerabilityReport
,
{
return
shallowMount
(
VulnerabilityReport
,
{
localVue
,
data
:
()
=>
data
,
data
:
()
=>
data
,
mocks
,
mocks
,
provide
:
{
provide
:
{
...
...
ee/spec/frontend/subscriptions/new/components/checkout/order_summary_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Component
from
'
ee/subscriptions/new/components/order_summary.vue
'
;
import
Component
from
'
ee/subscriptions/new/components/order_summary.vue
'
;
import
createStore
from
'
ee/subscriptions/new/store
'
;
import
createStore
from
'
ee/subscriptions/new/store
'
;
...
@@ -6,8 +6,7 @@ import * as types from 'ee/subscriptions/new/store/mutation_types';
...
@@ -6,8 +6,7 @@ import * as types from 'ee/subscriptions/new/store/mutation_types';
import
{
mountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
mountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
describe
(
'
Order Summary
'
,
()
=>
{
describe
(
'
Order Summary
'
,
()
=>
{
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
let
wrapper
;
let
wrapper
;
...
@@ -30,7 +29,6 @@ describe('Order Summary', () => {
...
@@ -30,7 +29,6 @@ describe('Order Summary', () => {
const
store
=
createStore
(
initialData
);
const
store
=
createStore
(
initialData
);
const
createComponent
=
(
opts
=
{})
=>
{
const
createComponent
=
(
opts
=
{})
=>
{
wrapper
=
mountExtended
(
Component
,
{
wrapper
=
mountExtended
(
Component
,
{
localVue
,
store
,
store
,
...
opts
,
...
opts
,
});
});
...
...
ee/spec/frontend/subscriptions/new/components/checkout/zuora_spec.js
View file @
0c6a3dcb
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
Component
from
'
ee/subscriptions/new/components/checkout/zuora.vue
'
;
import
Component
from
'
ee/subscriptions/new/components/checkout/zuora.vue
'
;
import
{
getStoreConfig
}
from
'
ee/subscriptions/new/store
'
;
import
{
getStoreConfig
}
from
'
ee/subscriptions/new/store
'
;
import
*
as
types
from
'
ee/subscriptions/new/store/mutation_types
'
;
import
*
as
types
from
'
ee/subscriptions/new/store/mutation_types
'
;
describe
(
'
Zuora
'
,
()
=>
{
describe
(
'
Zuora
'
,
()
=>
{
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
let
store
;
let
store
;
let
wrapper
;
let
wrapper
;
...
@@ -34,7 +34,6 @@ describe('Zuora', () => {
...
@@ -34,7 +34,6 @@ describe('Zuora', () => {
active
:
true
,
active
:
true
,
...
props
,
...
props
,
},
},
localVue
,
store
,
store
,
});
});
};
};
...
@@ -81,7 +80,7 @@ describe('Zuora', () => {
...
@@ -81,7 +80,7 @@ describe('Zuora', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
store
.
commit
(
types
.
UPDATE_IS_LOADING_PAYMENT_METHOD
,
true
);
store
.
commit
(
types
.
UPDATE_IS_LOADING_PAYMENT_METHOD
,
true
);
return
localVue
.
nextTick
();
return
nextTick
();
});
});
it
(
'
shows the loading icon
'
,
()
=>
{
it
(
'
shows the loading icon
'
,
()
=>
{
...
@@ -116,7 +115,7 @@ describe('Zuora', () => {
...
@@ -116,7 +115,7 @@ describe('Zuora', () => {
store
.
commit
(
types
.
UPDATE_PAYMENT_FORM_PARAMS
,
{});
store
.
commit
(
types
.
UPDATE_PAYMENT_FORM_PARAMS
,
{});
return
localVue
.
nextTick
().
then
(()
=>
{
return
nextTick
().
then
(()
=>
{
expect
(
actionMocks
.
zuoraIframeRendered
).
toHaveBeenCalled
();
expect
(
actionMocks
.
zuoraIframeRendered
).
toHaveBeenCalled
();
});
});
});
});
...
...
ee/spec/frontend/subscriptions/new/components/checkout_spec.js
View file @
0c6a3dcb
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
ProgressBar
from
'
ee/registrations/components/progress_bar.vue
'
;
import
ProgressBar
from
'
ee/registrations/components/progress_bar.vue
'
;
import
Component
from
'
ee/subscriptions/new/components/checkout.vue
'
;
import
Component
from
'
ee/subscriptions/new/components/checkout.vue
'
;
import
createStore
from
'
ee/subscriptions/new/store
'
;
import
createStore
from
'
ee/subscriptions/new/store
'
;
describe
(
'
Checkout
'
,
()
=>
{
describe
(
'
Checkout
'
,
()
=>
{
const
localVue
=
createLocalVue
();
Vue
.
use
(
Vuex
);
localVue
.
use
(
Vuex
);
let
store
;
let
store
;
let
wrapper
;
let
wrapper
;
...
...
ee/spec/frontend/threat_monitoring/components/statistics_history_spec.js
View file @
0c6a3dcb
import
{
GlAreaChart
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
GlAreaChart
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
{
TOTAL_REQUESTS
,
ANOMALOUS_REQUESTS
}
from
'
ee/threat_monitoring/components/constants
'
;
import
{
TOTAL_REQUESTS
,
ANOMALOUS_REQUESTS
}
from
'
ee/threat_monitoring/components/constants
'
;
import
StatisticsHistory
from
'
ee/threat_monitoring/components/statistics_history.vue
'
;
import
StatisticsHistory
from
'
ee/threat_monitoring/components/statistics_history.vue
'
;
import
{
mockNominalHistory
,
mockAnomalousHistory
}
from
'
../mocks/mock_data
'
;
import
{
mockNominalHistory
,
mockAnomalousHistory
}
from
'
../mocks/mock_data
'
;
...
@@ -20,15 +21,13 @@ const MockResizeObserverDirective = {
...
@@ -20,15 +21,13 @@ const MockResizeObserverDirective = {
},
},
};
};
const
localVue
=
createLocalVue
();
Vue
.
directive
(
'
gl-resize-observer-directive
'
,
MockResizeObserverDirective
);
localVue
.
directive
(
'
gl-resize-observer-directive
'
,
MockResizeObserverDirective
);
describe
(
'
StatisticsHistory component
'
,
()
=>
{
describe
(
'
StatisticsHistory component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
factory
=
({
options
}
=
{})
=>
{
const
factory
=
({
options
}
=
{})
=>
{
wrapper
=
shallowMount
(
StatisticsHistory
,
{
wrapper
=
shallowMount
(
StatisticsHistory
,
{
localVue
,
propsData
:
{
propsData
:
{
data
:
{
data
:
{
anomalous
:
{
title
:
'
Anomoulous
'
,
values
:
mockAnomalousHistory
},
anomalous
:
{
title
:
'
Anomoulous
'
,
values
:
mockAnomalousHistory
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment