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
e161c7ca
Commit
e161c7ca
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
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
26 deletions
+19
-26
spec/frontend/vue_shared/components/gl_modal_vuex_spec.js
spec/frontend/vue_shared/components/gl_modal_vuex_spec.js
+5
-5
spec/frontend/vue_shared/components/markdown/field_spec.js
spec/frontend/vue_shared/components/markdown/field_spec.js
+11
-12
spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js
...ue_shared/components/markdown/suggestion_diff_row_spec.js
+1
-4
spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js
...ue_shared/components/user_avatar/user_avatar_list_spec.js
+2
-5
No files found.
spec/frontend/vue_shared/components/gl_modal_vuex_spec.js
View file @
e161c7ca
...
...
@@ -33,7 +33,7 @@ describe('GlModalVuex', () => {
...
options
.
propsData
,
};
wrapper
=
shallowMount
(
localVue
.
extend
(
GlModalVuex
)
,
{
wrapper
=
shallowMount
(
GlModalVuex
,
{
...
options
,
localVue
,
store
,
...
...
@@ -123,8 +123,8 @@ describe('GlModalVuex', () => {
state
.
isVisible
=
true
;
localVue
.
nextTick
()
wrapper
.
vm
.
$
nextTick
()
.
then
(()
=>
{
expect
(
rootEmit
).
toHaveBeenCalledWith
(
'
bv::show::modal
'
,
TEST_MODAL_ID
);
})
...
...
@@ -140,8 +140,8 @@ describe('GlModalVuex', () => {
state
.
isVisible
=
false
;
localVue
.
nextTick
()
wrapper
.
vm
.
$
nextTick
()
.
then
(()
=>
{
expect
(
rootEmit
).
toHaveBeenCalledWith
(
'
bv::hide::modal
'
,
TEST_MODAL_ID
);
})
...
...
spec/frontend/vue_shared/components/markdown/field_spec.js
View file @
e161c7ca
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
fieldComponent
from
'
~/vue_shared/components/markdown/field.vue
'
;
import
{
TEST_HOST
,
FIXTURES_PATH
}
from
'
spec/test_constants
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
...
...
@@ -50,7 +50,6 @@ const getVideo = wrapper => wrapper.find('video');
describe
(
'
Markdown field component
'
,
()
=>
{
let
axiosMock
;
const
localVue
=
createLocalVue
();
beforeEach
(()
=>
{
axiosMock
=
new
AxiosMockAdapter
(
axios
);
...
...
@@ -84,7 +83,7 @@ describe('Markdown field component', () => {
previewLink
=
getPreviewLink
(
wrapper
);
previewLink
.
trigger
(
'
click
'
);
return
localVue
.
nextTick
().
then
(()
=>
{
return
wrapper
.
vm
.
$
nextTick
().
then
(()
=>
{
expect
(
previewLink
.
element
.
parentNode
.
classList
.
contains
(
'
active
'
)).
toBeTruthy
();
});
});
...
...
@@ -94,7 +93,7 @@ describe('Markdown field component', () => {
previewLink
=
getPreviewLink
(
wrapper
);
previewLink
.
trigger
(
'
click
'
);
localVue
.
nextTick
(()
=>
{
wrapper
.
vm
.
$
nextTick
(()
=>
{
expect
(
wrapper
.
find
(
'
.md-preview-holder
'
).
element
.
textContent
.
trim
()).
toContain
(
'
Loading…
'
,
);
...
...
@@ -155,17 +154,17 @@ describe('Markdown field component', () => {
previewLink
=
getPreviewLink
(
wrapper
);
writeLink
.
trigger
(
'
click
'
);
return
localVue
.
nextTick
()
return
wrapper
.
vm
.
$
nextTick
()
.
then
(()
=>
assertMarkdownTabs
(
true
,
writeLink
,
previewLink
,
wrapper
))
.
then
(()
=>
writeLink
.
trigger
(
'
click
'
))
.
then
(()
=>
localVue
.
nextTick
())
.
then
(()
=>
wrapper
.
vm
.
$
nextTick
())
.
then
(()
=>
assertMarkdownTabs
(
true
,
writeLink
,
previewLink
,
wrapper
))
.
then
(()
=>
previewLink
.
trigger
(
'
click
'
))
.
then
(()
=>
localVue
.
nextTick
())
.
then
(()
=>
wrapper
.
vm
.
$
nextTick
())
.
then
(()
=>
assertMarkdownTabs
(
false
,
writeLink
,
previewLink
,
wrapper
))
.
then
(()
=>
previewLink
.
trigger
(
'
click
'
))
.
then
(()
=>
localVue
.
nextTick
())
.
then
(()
=>
wrapper
.
vm
.
$
nextTick
())
.
then
(()
=>
assertMarkdownTabs
(
false
,
writeLink
,
previewLink
,
wrapper
));
});
});
...
...
@@ -178,7 +177,7 @@ describe('Markdown field component', () => {
const
markdownButton
=
getMarkdownButton
(
wrapper
);
markdownButton
.
trigger
(
'
click
'
);
localVue
.
nextTick
(()
=>
{
wrapper
.
vm
.
$
nextTick
(()
=>
{
expect
(
textarea
.
value
).
toContain
(
'
**testing**
'
);
});
});
...
...
@@ -190,7 +189,7 @@ describe('Markdown field component', () => {
const
markdownButton
=
getAllMarkdownButtons
(
wrapper
).
wrappers
[
5
];
markdownButton
.
trigger
(
'
click
'
);
localVue
.
nextTick
(()
=>
{
wrapper
.
vm
.
$
nextTick
(()
=>
{
expect
(
textarea
.
value
).
toContain
(
'
* testing
'
);
});
});
...
...
@@ -202,7 +201,7 @@ describe('Markdown field component', () => {
const
markdownButton
=
getAllMarkdownButtons
(
wrapper
).
wrappers
[
5
];
markdownButton
.
trigger
(
'
click
'
);
localVue
.
nextTick
(()
=>
{
wrapper
.
vm
.
$
nextTick
(()
=>
{
expect
(
textarea
.
value
).
toContain
(
'
* testing
\n
* 123
'
);
});
});
...
...
spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js
View file @
e161c7ca
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
SuggestionDiffRow
from
'
~/vue_shared/components/markdown/suggestion_diff_row.vue
'
;
const
oldLine
=
{
...
...
@@ -27,10 +27,7 @@ describe('SuggestionDiffRow', () => {
let
wrapper
;
const
factory
=
(
options
=
{})
=>
{
const
localVue
=
createLocalVue
();
wrapper
=
shallowMount
(
SuggestionDiffRow
,
{
localVue
,
...
options
,
});
};
...
...
spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js
View file @
e161c7ca
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
TEST_HOST
}
from
'
spec/test_constants
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
...
...
@@ -20,8 +20,6 @@ const createList = n =>
.
fill
(
1
)
.
map
((
x
,
id
)
=>
createUser
(
id
));
const
localVue
=
createLocalVue
();
describe
(
'
UserAvatarList
'
,
()
=>
{
let
props
;
let
wrapper
;
...
...
@@ -32,9 +30,8 @@ describe('UserAvatarList', () => {
...
options
.
propsData
,
};
wrapper
=
shallowMount
(
localVue
.
extend
(
UserAvatarList
)
,
{
wrapper
=
shallowMount
(
UserAvatarList
,
{
...
options
,
localVue
,
propsData
,
});
};
...
...
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