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
9ad2fbd2
Commit
9ad2fbd2
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
28 deletions
+11
-28
ee/spec/frontend/environments_dashboard/components/environment_header_spec.js
...ironments_dashboard/components/environment_header_spec.js
+5
-12
ee/spec/frontend/environments_dashboard/components/environment_spec.js
...end/environments_dashboard/components/environment_spec.js
+4
-10
ee/spec/frontend/environments_dashboard/components/project_header_spec.js
.../environments_dashboard/components/project_header_spec.js
+2
-6
No files found.
ee/spec/frontend/environments_dashboard/components/environment_header_spec.js
View file @
9ad2fbd2
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
,
GlBadge
}
from
'
@gitlab/ui
'
;
import
component
from
'
ee/environments_dashboard/components/dashboard/environment_header.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
ReviewAppLink
from
'
~/vue_merge_request_widget/components/review_app_link.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Environment Header
'
,
()
=>
{
const
Component
=
localVue
.
extend
(
component
);
let
wrapper
;
let
propsData
;
...
...
@@ -27,11 +24,10 @@ describe('Environment Header', () => {
describe
(
'
renders name and link to app
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
propsData
,
localVue
,
});
});
...
...
@@ -64,11 +60,10 @@ describe('Environment Header', () => {
propsData
.
environment
.
within_folder
=
true
;
propsData
.
environment
.
name
=
'
review/testing
'
;
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
propsData
,
localVue
,
});
});
...
...
@@ -91,11 +86,10 @@ describe('Environment Header', () => {
beforeEach
(()
=>
{
propsData
.
hasErrors
=
true
;
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
propsData
,
localVue
,
});
});
...
...
@@ -108,11 +102,10 @@ describe('Environment Header', () => {
beforeEach
(()
=>
{
propsData
.
hasPipelineFailed
=
true
;
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
propsData
,
localVue
,
});
});
...
...
ee/spec/frontend/environments_dashboard/components/environment_spec.js
View file @
9ad2fbd2
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
component
from
'
ee/environments_dashboard/components/dashboard/environment.vue
'
;
import
EnvironmentHeader
from
'
ee/environments_dashboard/components/dashboard/environment_header.vue
'
;
import
Alert
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
Commit
from
'
~/vue_shared/components/commit.vue
'
;
import
environment
from
'
./mock_environment.json
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Environment
'
,
()
=>
{
const
Component
=
localVue
.
extend
(
component
);
let
wrapper
;
let
propsData
;
...
...
@@ -16,10 +13,9 @@ describe('Environment', () => {
propsData
=
{
environment
,
};
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
localVue
,
propsData
,
});
});
...
...
@@ -95,10 +91,9 @@ describe('Environment', () => {
last_deployment
:
null
,
},
};
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
localVue
,
propsData
,
});
...
...
@@ -115,10 +110,9 @@ describe('Environment', () => {
},
},
};
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
localVue
,
propsData
,
});
...
...
ee/spec/frontend/environments_dashboard/components/project_header_spec.js
View file @
9ad2fbd2
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
component
from
'
ee/environments_dashboard/components/dashboard/project_header.vue
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Project Header
'
,
()
=>
{
const
Component
=
localVue
.
extend
(
component
);
let
wrapper
;
let
propsData
;
...
...
@@ -24,11 +21,10 @@ describe('Project Header', () => {
});
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
C
omponent
,
{
wrapper
=
shallowMount
(
c
omponent
,
{
sync
:
false
,
attachToDocument
:
true
,
propsData
,
localVue
,
});
});
...
...
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