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
4658cdaa
Commit
4658cdaa
authored
5 years ago
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove incorrect localVue usage
localVue is required only with use method
parent
4372a6c9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
19 deletions
+8
-19
spec/frontend/monitoring/components/dashboard_spec.js
spec/frontend/monitoring/components/dashboard_spec.js
+2
-4
spec/frontend/monitoring/components/dashboard_time_url_spec.js
...frontend/monitoring/components/dashboard_time_url_spec.js
+2
-5
spec/frontend/monitoring/components/dashboard_time_window_spec.js
...ntend/monitoring/components/dashboard_time_window_spec.js
+2
-5
spec/frontend/monitoring/components/graph_group_spec.js
spec/frontend/monitoring/components/graph_group_spec.js
+2
-5
No files found.
spec/frontend/monitoring/components/dashboard_spec.js
View file @
4658cdaa
...
...
@@ -24,13 +24,12 @@ const localVue = createLocalVue();
const
expectedPanelCount
=
2
;
describe
(
'
Dashboard
'
,
()
=>
{
let
DashboardComponent
;
let
store
;
let
wrapper
;
let
mock
;
const
createShallowWrapper
=
(
props
=
{},
options
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
DashboardComponent
)
,
{
wrapper
=
shallowMount
(
Dashboard
,
{
localVue
,
sync
:
false
,
propsData
:
{
...
propsData
,
...
props
},
...
...
@@ -40,7 +39,7 @@ describe('Dashboard', () => {
};
const
createMountedWrapper
=
(
props
=
{},
options
=
{})
=>
{
wrapper
=
mount
(
localVue
.
extend
(
DashboardComponent
)
,
{
wrapper
=
mount
(
Dashboard
,
{
localVue
,
sync
:
false
,
propsData
:
{
...
propsData
,
...
props
},
...
...
@@ -51,7 +50,6 @@ describe('Dashboard', () => {
beforeEach
(()
=>
{
store
=
createStore
();
DashboardComponent
=
localVue
.
extend
(
Dashboard
);
mock
=
new
MockAdapter
(
axios
);
});
...
...
This diff is collapsed.
Click to expand it.
spec/frontend/monitoring/components/dashboard_time_url_spec.js
View file @
4658cdaa
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
createFlash
from
'
~/flash
'
;
import
Dashboard
from
'
~/monitoring/components/dashboard.vue
'
;
import
{
createStore
}
from
'
~/monitoring/stores
'
;
import
{
propsData
}
from
'
../init_utils
'
;
const
localVue
=
createLocalVue
();
jest
.
mock
(
'
~/flash
'
);
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
...
...
@@ -17,8 +15,7 @@ describe('dashboard invalid url parameters', () => {
let
wrapper
;
const
createMountedWrapper
=
(
props
=
{},
options
=
{})
=>
{
wrapper
=
mount
(
localVue
.
extend
(
Dashboard
),
{
localVue
,
wrapper
=
mount
(
Dashboard
,
{
sync
:
false
,
propsData
:
{
...
propsData
,
...
props
},
store
,
...
...
This diff is collapsed.
Click to expand it.
spec/frontend/monitoring/components/dashboard_time_window_spec.js
View file @
4658cdaa
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -8,8 +8,6 @@ import { createStore } from '~/monitoring/stores';
import
{
propsData
,
setupComponentStore
}
from
'
../init_utils
'
;
import
{
metricsGroupsAPIResponse
,
mockApiEndpoint
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
getParameterValues
:
jest
.
fn
().
mockImplementation
(
param
=>
{
if
(
param
===
'
start
'
)
return
[
'
2019-10-01T18:27:47.000Z
'
];
...
...
@@ -25,8 +23,7 @@ describe('dashboard time window', () => {
let
mock
;
const
createComponentWrapperMounted
=
(
props
=
{},
options
=
{})
=>
{
wrapper
=
mount
(
localVue
.
extend
(
Dashboard
),
{
localVue
,
wrapper
=
mount
(
Dashboard
,
{
sync
:
false
,
propsData
:
{
...
propsData
,
...
props
},
store
,
...
...
This diff is collapsed.
Click to expand it.
spec/frontend/monitoring/components/graph_group_spec.js
View file @
4658cdaa
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
GraphGroup
from
'
~/monitoring/components/graph_group.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Graph group component
'
,
()
=>
{
let
wrapper
;
...
...
@@ -12,10 +10,9 @@ describe('Graph group component', () => {
const
findCaretIcon
=
()
=>
wrapper
.
find
(
Icon
);
const
createComponent
=
propsData
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
GraphGroup
)
,
{
wrapper
=
shallowMount
(
GraphGroup
,
{
propsData
,
sync
:
false
,
localVue
,
});
};
...
...
This diff is collapsed.
Click to expand it.
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