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
0ce2c6d2
Commit
0ce2c6d2
authored
Feb 08, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Roadmap EpicItem Component
parent
73ed71f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
ee/app/assets/javascripts/roadmap/components/epic_item.vue
ee/app/assets/javascripts/roadmap/components/epic_item.vue
+46
-0
spec/javascripts/roadmap/components/epic_item_spec.js
spec/javascripts/roadmap/components/epic_item_spec.js
+49
-0
No files found.
ee/app/assets/javascripts/roadmap/components/epic_item.vue
0 → 100644
View file @
0ce2c6d2
<
script
>
import
epicItemDetails
from
'
./epic_item_details.vue
'
;
import
epicItemTimeline
from
'
./epic_item_timeline.vue
'
;
export
default
{
components
:
{
epicItemDetails
,
epicItemTimeline
,
},
props
:
{
epic
:
{
type
:
Object
,
required
:
true
,
},
timeframe
:
{
type
:
Array
,
required
:
true
,
},
currentGroupId
:
{
type
:
Number
,
required
:
true
,
},
shellWidth
:
{
type
:
Number
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<tr
class=
"epics-list-item"
>
<epic-item-details
:epic=
"epic"
:current-group-id=
"currentGroupId"
/>
<epic-item-timeline
v-for=
"(timeframeItem, index) in timeframe"
:key=
"index"
:timeframe=
"timeframe"
:timeframe-item=
"timeframeItem"
:epic=
"epic"
:shell-width=
"shellWidth"
/>
</tr>
</
template
>
spec/javascripts/roadmap/components/epic_item_spec.js
0 → 100644
View file @
0ce2c6d2
import
Vue
from
'
vue
'
;
import
epicItemComponent
from
'
ee/roadmap/components/epic_item.vue
'
;
import
{
mockTimeframe
,
mockEpic
,
mockGroupId
,
mockShellWidth
}
from
'
../mock_data
'
;
import
mountComponent
from
'
../../helpers/vue_mount_component_helper
'
;
const
createComponent
=
({
epic
=
mockEpic
,
timeframe
=
mockTimeframe
,
currentGroupId
=
mockGroupId
,
shellWidth
=
mockShellWidth
,
})
=>
{
const
Component
=
Vue
.
extend
(
epicItemComponent
);
return
mountComponent
(
Component
,
{
epic
,
timeframe
,
currentGroupId
,
shellWidth
,
});
};
describe
(
'
EpicItemComponent
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
vm
=
createComponent
({});
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
template
'
,
()
=>
{
it
(
'
renders component container element class `epics-list-item`
'
,
()
=>
{
expect
(
vm
.
$el
.
classList
.
contains
(
'
epics-list-item
'
)).
toBeTruthy
();
});
it
(
'
renders Epic item details element with class `epic-details-cell`
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.epic-details-cell
'
)).
not
.
toBeNull
();
});
it
(
'
renders Epic timeline element with class `epic-timeline-cell`
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.epic-timeline-cell
'
)).
not
.
toBeNull
();
});
});
});
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