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
b7fb3613
Commit
b7fb3613
authored
Jan 08, 2020
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
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
13 deletions
+4
-13
ee/spec/frontend/security_configuration/components/app_spec.js
...ec/frontend/security_configuration/components/app_spec.js
+1
-4
ee/spec/frontend/security_dashboard/components/app_spec.js
ee/spec/frontend/security_dashboard/components/app_spec.js
+2
-5
ee/spec/frontend/security_dashboard/components/project_list_spec.js
...ontend/security_dashboard/components/project_list_spec.js
+1
-4
No files found.
ee/spec/frontend/security_configuration/components/app_spec.js
View file @
b7fb3613
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
SecurityConfigurationApp
from
'
ee/security_configuration/components/app.vue
'
;
import
SecurityConfigurationApp
from
'
ee/security_configuration/components/app.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Security Configuration App
'
,
()
=>
{
describe
(
'
Security Configuration App
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
SecurityConfigurationApp
,
{
wrapper
=
shallowMount
(
SecurityConfigurationApp
,
{
localVue
,
propsData
:
{
propsData
:
{
features
:
[],
features
:
[],
autoDevopsEnabled
:
false
,
autoDevopsEnabled
:
false
,
...
...
ee/spec/frontend/security_dashboard/components/app_spec.js
View file @
b7fb3613
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
...
@@ -13,8 +13,6 @@ import createStore from 'ee/security_dashboard/store';
...
@@ -13,8 +13,6 @@ import createStore from 'ee/security_dashboard/store';
import
{
getParameterValues
}
from
'
~/lib/utils/url_utility
'
;
import
{
getParameterValues
}
from
'
~/lib/utils/url_utility
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
const
localVue
=
createLocalVue
();
const
pipelineId
=
123
;
const
pipelineId
=
123
;
const
vulnerabilitiesEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities`
;
const
vulnerabilitiesEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities`
;
const
vulnerabilitiesCountEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities_summary`
;
const
vulnerabilitiesCountEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities_summary`
;
...
@@ -41,7 +39,6 @@ describe('Security Dashboard app', () => {
...
@@ -41,7 +39,6 @@ describe('Security Dashboard app', () => {
const
createComponent
=
props
=>
{
const
createComponent
=
props
=>
{
store
=
createStore
();
store
=
createStore
();
wrapper
=
shallowMount
(
SecurityDashboardApp
,
{
wrapper
=
shallowMount
(
SecurityDashboardApp
,
{
localVue
,
store
,
store
,
sync
:
false
,
sync
:
false
,
methods
:
{
methods
:
{
...
@@ -104,7 +101,7 @@ describe('Security Dashboard app', () => {
...
@@ -104,7 +101,7 @@ describe('Security Dashboard app', () => {
const
newCount
=
3
;
const
newCount
=
3
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
localVue
.
set
(
store
.
state
.
vulnerabilities
.
pageInfo
,
'
total
'
,
newCount
)
;
store
.
state
.
vulnerabilities
.
pageInfo
=
{
total
:
newCount
}
;
});
});
it
(
'
emits a vulnerabilitiesCountChanged event
'
,
()
=>
{
it
(
'
emits a vulnerabilitiesCountChanged event
'
,
()
=>
{
...
...
ee/spec/frontend/security_dashboard/components/project_list_spec.js
View file @
b7fb3613
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlBadge
,
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlBadge
,
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
ProjectList
from
'
ee/security_dashboard/components/project_list.vue
'
;
import
ProjectList
from
'
ee/security_dashboard/components/project_list.vue
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
const
localVue
=
createLocalVue
();
const
getArrayWithLength
=
n
=>
[...
Array
(
n
).
keys
()];
const
getArrayWithLength
=
n
=>
[...
Array
(
n
).
keys
()];
const
generateMockProjects
=
(
projectsCount
,
mockProject
=
{})
=>
const
generateMockProjects
=
(
projectsCount
,
mockProject
=
{})
=>
getArrayWithLength
(
projectsCount
).
map
(
id
=>
({
id
,
...
mockProject
}));
getArrayWithLength
(
projectsCount
).
map
(
id
=>
({
id
,
...
mockProject
}));
...
@@ -16,7 +14,6 @@ describe('Project List component', () => {
...
@@ -16,7 +14,6 @@ describe('Project List component', () => {
const
factory
=
({
projects
=
[],
stubs
=
{},
showLoadingIndicator
=
false
}
=
{})
=>
{
const
factory
=
({
projects
=
[],
stubs
=
{},
showLoadingIndicator
=
false
}
=
{})
=>
{
wrapper
=
shallowMount
(
ProjectList
,
{
wrapper
=
shallowMount
(
ProjectList
,
{
stubs
,
stubs
,
localVue
,
propsData
:
{
propsData
:
{
projects
,
projects
,
showLoadingIndicator
,
showLoadingIndicator
,
...
...
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