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
9e24bc1a
Commit
9e24bc1a
authored
May 05, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve roadmap_app_spec
Make changes as a result of reviewer comments
parent
0d11a09c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
ee/spec/frontend/roadmap/components/roadmap_app_spec.js
ee/spec/frontend/roadmap/components/roadmap_app_spec.js
+7
-8
No files found.
ee/spec/frontend/roadmap/components/roadmap_app_spec.js
View file @
9e24bc1a
...
...
@@ -36,8 +36,7 @@ describe('RoadmapApp', () => {
const
presetType
=
PRESET_TYPES
.
MONTHS
;
const
timeframe
=
getTimeframeForMonthsView
(
mockTimeframeInitialDate
);
const
createComponent
=
mountType
=>
{
const
mountFunction
=
mountType
===
'
mount
'
?
mount
:
shallowMount
;
const
createComponent
=
(
mountFunction
=
shallowMount
)
=>
{
return
mountFunction
(
RoadmapApp
,
{
localVue
,
propsData
:
{
...
...
@@ -172,13 +171,13 @@ describe('RoadmapApp', () => {
let
roadmapTimelineEl
;
beforeEach
(()
=>
{
wrapper
=
createComponent
(
'
mount
'
);
wrapper
=
createComponent
(
mount
);
store
.
dispatch
(
'
receiveEpicsSuccess
'
,
{
rawEpics
});
roadmapTimelineEl
=
wrapper
.
find
(
'
.roadmap-timeline-section
'
).
element
;
});
it
(
'
updates timeline by extending timeframe from the start when called with extendType as `prepend`
'
,
()
=>
{
jest
.
spyOn
(
eventHub
,
'
$emit
'
).
mockImplementation
(
()
=>
{}
);
jest
.
spyOn
(
eventHub
,
'
$emit
'
).
mockImplementation
();
wrapper
.
vm
.
processExtendedTimeline
({
extendType
:
EXTEND_AS
.
PREPEND
,
...
...
@@ -191,7 +190,7 @@ describe('RoadmapApp', () => {
});
it
(
'
updates timeline by extending timeframe from the end when called with extendType as `append`
'
,
()
=>
{
jest
.
spyOn
(
eventHub
,
'
$emit
'
).
mockImplementation
(
()
=>
{}
);
jest
.
spyOn
(
eventHub
,
'
$emit
'
).
mockImplementation
();
wrapper
.
vm
.
processExtendedTimeline
({
extendType
:
EXTEND_AS
.
APPEND
,
...
...
@@ -203,9 +202,9 @@ describe('RoadmapApp', () => {
});
it
(
'
updates the store and refreshes roadmap with extended timeline based on provided extendType
'
,
()
=>
{
jest
.
spyOn
(
wrapper
.
vm
,
'
extendTimeframe
'
).
mockImplementation
(
()
=>
{}
);
jest
.
spyOn
(
wrapper
.
vm
,
'
refreshEpicDates
'
).
mockImplementation
(
()
=>
{}
);
jest
.
spyOn
(
wrapper
.
vm
,
'
refreshMilestoneDates
'
).
mockImplementation
(
()
=>
{}
);
jest
.
spyOn
(
wrapper
.
vm
,
'
extendTimeframe
'
).
mockImplementation
();
jest
.
spyOn
(
wrapper
.
vm
,
'
refreshEpicDates
'
).
mockImplementation
();
jest
.
spyOn
(
wrapper
.
vm
,
'
refreshMilestoneDates
'
).
mockImplementation
();
jest
.
spyOn
(
wrapper
.
vm
,
'
fetchEpicsForTimeframe
'
).
mockResolvedValue
();
const
extendType
=
EXTEND_AS
.
PREPEND
;
...
...
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