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
d6100d36
Commit
d6100d36
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
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
18 additions
and
50 deletions
+18
-50
spec/frontend/vue_shared/components/callout_spec.js
spec/frontend/vue_shared/components/callout_spec.js
+2
-5
spec/frontend/vue_shared/components/expand_button_spec.js
spec/frontend/vue_shared/components/expand_button_spec.js
+2
-5
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
...vue_shared/components/issue/related_issuable_item_spec.js
+2
-5
spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
...shared/components/markdown/suggestion_diff_header_spec.js
+2
-5
spec/frontend/vue_shared/components/notes/system_note_spec.js
.../frontend/vue_shared/components/notes/system_note_spec.js
+1
-4
spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
...d/vue_shared/components/notes/timeline_entry_item_spec.js
+1
-4
spec/frontend/vue_shared/components/pagination_links_spec.js
spec/frontend/vue_shared/components/pagination_links_spec.js
+1
-4
spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
+1
-2
spec/frontend/vue_shared/directives/track_event_spec.js
spec/frontend/vue_shared/directives/track_event_spec.js
+2
-5
spec/frontend/vue_shared/droplab_dropdown_button_spec.js
spec/frontend/vue_shared/droplab_dropdown_button_spec.js
+3
-7
spec/frontend/vue_shared/mixins/gl_feature_flags_mixin_spec.js
...frontend/vue_shared/mixins/gl_feature_flags_mixin_spec.js
+1
-4
No files found.
spec/frontend/vue_shared/components/callout_spec.js
View file @
d6100d36
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Callout
from
'
~/vue_shared/components/callout.vue
'
;
const
TEST_MESSAGE
=
'
This is a callout message!
'
;
const
TEST_SLOT
=
'
<button>This is a callout slot!</button>
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Callout Component
'
,
()
=>
{
let
wrapper
;
const
factory
=
options
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
Callout
),
{
localVue
,
wrapper
=
shallowMount
(
Callout
,
{
...
options
,
});
};
...
...
spec/frontend/vue_shared/components/expand_button_spec.js
View file @
d6100d36
import
Vue
from
'
vue
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
ExpandButton
from
'
~/vue_shared/components/expand_button.vue
'
;
const
text
=
{
...
...
@@ -14,10 +14,7 @@ describe('Expand button', () => {
const
expanderAppendEl
=
()
=>
wrapper
.
find
(
'
.js-text-expander-append
'
);
const
factory
=
(
options
=
{})
=>
{
const
localVue
=
createLocalVue
();
wrapper
=
mount
(
localVue
.
extend
(
ExpandButton
),
{
localVue
,
wrapper
=
mount
(
ExpandButton
,
{
...
options
,
});
};
...
...
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
View file @
d6100d36
import
Vue
from
'
vue
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
RelatedIssuableItem
from
'
~/vue_shared/components/issue/related_issuable_item.vue
'
;
import
{
...
...
@@ -29,10 +29,7 @@ describe('RelatedIssuableItem', () => {
};
beforeEach
(()
=>
{
const
localVue
=
createLocalVue
();
wrapper
=
mount
(
localVue
.
extend
(
RelatedIssuableItem
),
{
localVue
,
wrapper
=
mount
(
RelatedIssuableItem
,
{
slots
,
sync
:
false
,
attachToDocument
:
true
,
...
...
spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
View file @
d6100d36
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
SuggestionDiffHeader
from
'
~/vue_shared/components/markdown/suggestion_diff_header.vue
'
;
const
localVue
=
createLocalVue
();
const
DEFAULT_PROPS
=
{
canApply
:
true
,
isApplied
:
false
,
...
...
@@ -14,12 +12,11 @@ describe('Suggestion Diff component', () => {
let
wrapper
;
const
createComponent
=
props
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
SuggestionDiffHeader
)
,
{
wrapper
=
shallowMount
(
SuggestionDiffHeader
,
{
propsData
:
{
...
DEFAULT_PROPS
,
...
props
,
},
localVue
,
sync
:
false
,
attachToDocument
:
true
,
});
...
...
spec/frontend/vue_shared/components/notes/system_note_spec.js
View file @
d6100d36
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
IssueSystemNote
from
'
~/vue_shared/components/notes/system_note.vue
'
;
import
createStore
from
'
~/notes/stores
'
;
import
initMRPopovers
from
'
~/mr_popover/index
'
;
jest
.
mock
(
'
~/mr_popover/index
'
,
()
=>
jest
.
fn
());
const
localVue
=
createLocalVue
();
describe
(
'
system note component
'
,
()
=>
{
let
vm
;
let
props
;
...
...
@@ -34,7 +32,6 @@ describe('system note component', () => {
vm
=
mount
(
IssueSystemNote
,
{
store
,
localVue
,
propsData
:
props
,
attachToDocument
:
true
,
sync
:
false
,
...
...
spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
View file @
d6100d36
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
describe
(
`TimelineEntryItem`
,
()
=>
{
let
wrapper
;
const
factory
=
(
options
=
{})
=>
{
const
localVue
=
createLocalVue
();
wrapper
=
shallowMount
(
TimelineEntryItem
,
{
localVue
,
...
options
,
});
};
...
...
spec/frontend/vue_shared/components/pagination_links_spec.js
View file @
d6100d36
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
GlPagination
}
from
'
@gitlab/ui
'
;
import
PaginationLinks
from
'
~/vue_shared/components/pagination_links.vue
'
;
import
{
...
...
@@ -10,8 +10,6 @@ import {
LABEL_LAST_PAGE
,
}
from
'
~/vue_shared/components/pagination/constants
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Pagination links component
'
,
()
=>
{
const
pageInfo
=
{
page
:
3
,
...
...
@@ -38,7 +36,6 @@ describe('Pagination links component', () => {
change
:
changeMock
,
pageInfo
,
},
localVue
,
sync
:
false
,
});
};
...
...
spec/frontend/vue_shared/components/time_ago_tooltip_spec.js
View file @
d6100d36
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
TimeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
{
formatDate
,
getTimeago
}
from
'
~/lib/utils/datetime_utility
'
;
...
...
@@ -10,7 +10,6 @@ describe('Time ago with tooltip component', () => {
attachToDocument
:
true
,
sync
:
false
,
propsData
,
localVue
:
createLocalVue
(),
});
};
const
timestamp
=
'
2017-05-08T14:57:39.781Z
'
;
...
...
spec/frontend/vue_shared/directives/track_event_spec.js
View file @
d6100d36
import
Vue
from
'
vue
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Tracking
from
'
~/tracking
'
;
import
TrackEvent
from
'
~/vue_shared/directives/track_event
'
;
...
...
@@ -17,15 +17,12 @@ const Component = Vue.component('dummy-element', {
template
:
'
<button id="trackable" v-track-event="trackingOptions"></button>
'
,
});
const
localVue
=
createLocalVue
();
let
wrapper
;
let
button
;
describe
(
'
Error Tracking directive
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
Component
),
{
localVue
,
});
wrapper
=
shallowMount
(
Component
,
{});
button
=
wrapper
.
find
(
'
#trackable
'
);
});
...
...
spec/frontend/vue_shared/droplab_dropdown_button_spec.js
View file @
d6100d36
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
DroplabDropdownButton
from
'
~/vue_shared/components/droplab_dropdown_button.vue
'
;
...
...
@@ -18,11 +18,8 @@ const createComponent = ({
dropdownClass
=
''
,
actions
=
mockActions
,
defaultAction
=
0
,
})
=>
{
const
localVue
=
createLocalVue
();
return
mount
(
DroplabDropdownButton
,
{
localVue
,
})
=>
mount
(
DroplabDropdownButton
,
{
propsData
:
{
size
,
dropdownClass
,
...
...
@@ -30,7 +27,6 @@ const createComponent = ({
defaultAction
,
},
});
};
describe
(
'
DroplabDropdownButton
'
,
()
=>
{
let
wrapper
;
...
...
spec/frontend/vue_shared/mixins/gl_feature_flags_mixin_spec.js
View file @
d6100d36
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
const
localVue
=
createLocalVue
();
describe
(
'
GitLab Feature Flags Mixin
'
,
()
=>
{
let
wrapper
;
...
...
@@ -20,7 +18,6 @@ describe('GitLab Feature Flags Mixin', () => {
};
wrapper
=
shallowMount
(
component
,
{
localVue
,
provide
:
{
glFeatures
:
{
...(
gon
.
features
||
{})
},
},
...
...
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