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
069d9156
Commit
069d9156
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
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
24 deletions
+8
-24
spec/frontend/notes/components/diff_discussion_header_spec.js
.../frontend/notes/components/diff_discussion_header_spec.js
+1
-3
spec/frontend/notes/components/discussion_actions_spec.js
spec/frontend/notes/components/discussion_actions_spec.js
+1
-3
spec/frontend/notes/components/discussion_notes_spec.js
spec/frontend/notes/components/discussion_notes_spec.js
+1
-4
spec/frontend/notes/components/discussion_reply_placeholder_spec.js
...end/notes/components/discussion_reply_placeholder_spec.js
+1
-3
spec/frontend/notes/components/discussion_resolve_button_spec.js
...ontend/notes/components/discussion_resolve_button_spec.js
+2
-5
spec/frontend/notes/components/note_app_spec.js
spec/frontend/notes/components/note_app_spec.js
+1
-3
spec/frontend/notes/components/note_edited_text_spec.js
spec/frontend/notes/components/note_edited_text_spec.js
+1
-3
No files found.
spec/frontend/notes/components/diff_discussion_header_spec.js
View file @
069d9156
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
createStore
from
'
~/notes/stores
'
;
import
diffDiscussionHeader
from
'
~/notes/components/diff_discussion_header.vue
'
;
...
...
@@ -18,11 +18,9 @@ describe('diff_discussion_header component', () => {
window
.
mrTabs
=
{};
store
=
createStore
();
const
localVue
=
createLocalVue
();
wrapper
=
mount
(
diffDiscussionHeader
,
{
store
,
propsData
:
{
discussion
:
discussionMock
},
localVue
,
sync
:
false
,
});
});
...
...
spec/frontend/notes/components/discussion_actions_spec.js
View file @
069d9156
import
{
shallowMount
,
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
mount
}
from
'
@vue/test-utils
'
;
import
{
discussionMock
}
from
'
../../notes/mock_data
'
;
import
DiscussionActions
from
'
~/notes/components/discussion_actions.vue
'
;
import
ReplyPlaceholder
from
'
~/notes/components/discussion_reply_placeholder.vue
'
;
...
...
@@ -22,12 +22,10 @@ const createUnallowedNote = () =>
describe
(
'
DiscussionActions
'
,
()
=>
{
let
wrapper
;
const
createComponentFactory
=
(
shallow
=
true
)
=>
props
=>
{
const
localVue
=
createLocalVue
();
const
store
=
createStore
();
const
mountFn
=
shallow
?
shallowMount
:
mount
;
wrapper
=
mountFn
(
DiscussionActions
,
{
localVue
,
store
,
propsData
:
{
discussion
:
discussionMock
,
...
...
spec/frontend/notes/components/discussion_notes_spec.js
View file @
069d9156
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
'
~/behaviors/markdown/render_gfm
'
;
import
{
SYSTEM_NOTE
}
from
'
~/notes/constants
'
;
import
DiscussionNotes
from
'
~/notes/components/discussion_notes.vue
'
;
...
...
@@ -9,8 +9,6 @@ import SystemNote from '~/vue_shared/components/notes/system_note.vue';
import
createStore
from
'
~/notes/stores
'
;
import
{
noteableDataMock
,
discussionMock
,
notesDataMock
}
from
'
../../notes/mock_data
'
;
const
localVue
=
createLocalVue
();
describe
(
'
DiscussionNotes
'
,
()
=>
{
let
wrapper
;
...
...
@@ -20,7 +18,6 @@ describe('DiscussionNotes', () => {
store
.
dispatch
(
'
setNotesData
'
,
notesDataMock
);
wrapper
=
shallowMount
(
DiscussionNotes
,
{
localVue
,
store
,
propsData
:
{
discussion
:
discussionMock
,
...
...
spec/frontend/notes/components/discussion_reply_placeholder_spec.js
View file @
069d9156
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
ReplyPlaceholder
from
'
~/notes/components/discussion_reply_placeholder.vue
'
;
const
localVue
=
createLocalVue
();
const
buttonText
=
'
Test Button Text
'
;
describe
(
'
ReplyPlaceholder
'
,
()
=>
{
...
...
@@ -11,7 +10,6 @@ describe('ReplyPlaceholder', () => {
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
ReplyPlaceholder
,
{
localVue
,
propsData
:
{
buttonText
,
},
...
...
spec/frontend/notes/components/discussion_resolve_button_spec.js
View file @
069d9156
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
resolveDiscussionButton
from
'
~/notes/components/discussion_resolve_button.vue
'
;
const
buttonTitle
=
'
Resolve discussion
'
;
describe
(
'
resolveDiscussionButton
'
,
()
=>
{
let
wrapper
;
let
localVue
;
const
factory
=
options
=>
{
localVue
=
createLocalVue
();
wrapper
=
shallowMount
(
resolveDiscussionButton
,
{
localVue
,
...
options
,
});
};
...
...
@@ -69,7 +66,7 @@ describe('resolveDiscussionButton', () => {
const
button
=
wrapper
.
find
({
ref
:
'
isResolvingIcon
'
});
localVue
.
nextTick
(()
=>
{
wrapper
.
vm
.
$
nextTick
(()
=>
{
expect
(
button
.
exists
()).
toEqual
(
false
);
});
});
...
...
spec/frontend/notes/components/note_app_spec.js
View file @
069d9156
import
$
from
'
helpers/jquery
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
Vue
from
'
vue
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
setTestTimeout
}
from
'
helpers/timeout
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
NotesApp
from
'
~/notes/components/notes_app.vue
'
;
...
...
@@ -48,7 +48,6 @@ describe('note_app', () => {
notesData
:
mockData
.
notesDataMock
,
userData
:
mockData
.
userDataMock
,
};
const
localVue
=
createLocalVue
();
return
mount
(
{
...
...
@@ -63,7 +62,6 @@ describe('note_app', () => {
attachToDocument
:
true
,
propsData
,
store
,
localVue
,
sync
:
false
,
},
);
...
...
spec/frontend/notes/components/note_edited_text_spec.js
View file @
069d9156
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
NoteEditedText
from
'
~/notes/components/note_edited_text.vue
'
;
const
localVue
=
createLocalVue
();
const
propsData
=
{
actionText
:
'
Edited
'
,
className
:
'
foo-bar
'
,
...
...
@@ -21,7 +20,6 @@ describe('NoteEditedText', () => {
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
NoteEditedText
,
{
localVue
,
propsData
,
sync
:
false
,
attachToDocument
:
true
,
...
...
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