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
SecurityConfigurationApp
from
'
ee/security_configuration/components/app.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Security Configuration App
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
SecurityConfigurationApp
,
{
localVue
,
propsData
:
{
features
:
[],
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
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
...
...
@@ -13,8 +13,6 @@ import createStore from 'ee/security_dashboard/store';
import
{
getParameterValues
}
from
'
~/lib/utils/url_utility
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
const
localVue
=
createLocalVue
();
const
pipelineId
=
123
;
const
vulnerabilitiesEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities`
;
const
vulnerabilitiesCountEndpoint
=
`
${
TEST_HOST
}
/vulnerabilities_summary`
;
...
...
@@ -41,7 +39,6 @@ describe('Security Dashboard app', () => {
const
createComponent
=
props
=>
{
store
=
createStore
();
wrapper
=
shallowMount
(
SecurityDashboardApp
,
{
localVue
,
store
,
sync
:
false
,
methods
:
{
...
...
@@ -104,7 +101,7 @@ describe('Security Dashboard app', () => {
const
newCount
=
3
;
beforeEach
(()
=>
{
localVue
.
set
(
store
.
state
.
vulnerabilities
.
pageInfo
,
'
total
'
,
newCount
)
;
store
.
state
.
vulnerabilities
.
pageInfo
=
{
total
:
newCount
}
;
});
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
ProjectList
from
'
ee/security_dashboard/components/project_list.vue
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
const
localVue
=
createLocalVue
();
const
getArrayWithLength
=
n
=>
[...
Array
(
n
).
keys
()];
const
generateMockProjects
=
(
projectsCount
,
mockProject
=
{})
=>
getArrayWithLength
(
projectsCount
).
map
(
id
=>
({
id
,
...
mockProject
}));
...
...
@@ -16,7 +14,6 @@ describe('Project List component', () => {
const
factory
=
({
projects
=
[],
stubs
=
{},
showLoadingIndicator
=
false
}
=
{})
=>
{
wrapper
=
shallowMount
(
ProjectList
,
{
stubs
,
localVue
,
propsData
:
{
projects
,
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