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
d773d574
Commit
d773d574
authored
Feb 25, 2021
by
Florie Guibert
Committed by
Kushal Pandya
Feb 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Epic board - Display epic reference on card
Rename issue_card_inner component to board_card_inner
parent
86c6c6a2
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
94 additions
and
92 deletions
+94
-92
app/assets/javascripts/boards/components/board_card.vue
app/assets/javascripts/boards/components/board_card.vue
+3
-3
app/assets/javascripts/boards/components/board_card_inner.vue
...assets/javascripts/boards/components/board_card_inner.vue
+43
-38
app/assets/javascripts/boards/components/board_card_layout_deprecated.vue
...cripts/boards/components/board_card_layout_deprecated.vue
+1
-2
app/assets/javascripts/boards/components/issue_card_inner_deprecated.vue
...scripts/boards/components/issue_card_inner_deprecated.vue
+3
-3
app/assets/javascripts/boards/components/modal/list.vue
app/assets/javascripts/boards/components/modal/list.vue
+3
-3
app/assets/javascripts/boards/mixins/board_card_inner.js
app/assets/javascripts/boards/mixins/board_card_inner.js
+1
-3
app/assets/stylesheets/page_bundles/boards.scss
app/assets/stylesheets/page_bundles/boards.scss
+1
-1
ee/app/assets/javascripts/boards/graphql/lists_epics.query.graphql
...sets/javascripts/boards/graphql/lists_epics.query.graphql
+2
-0
ee/app/assets/javascripts/boards/mixins/board_card_inner.js
ee/app/assets/javascripts/boards/mixins/board_card_inner.js
+4
-6
ee/spec/frontend/boards/board_card_inner_spec.js
ee/spec/frontend/boards/board_card_inner_spec.js
+4
-4
spec/frontend/boards/board_card_inner_spec.js
spec/frontend/boards/board_card_inner_spec.js
+25
-25
spec/frontend/boards/components/board_card_deprecated_spec.js
.../frontend/boards/components/board_card_deprecated_spec.js
+1
-1
spec/frontend/boards/components/board_card_layout_deprecated_spec.js
...nd/boards/components/board_card_layout_deprecated_spec.js
+1
-1
spec/frontend/boards/components/board_card_spec.js
spec/frontend/boards/components/board_card_spec.js
+2
-2
No files found.
app/assets/javascripts/boards/components/board_card.vue
View file @
d773d574
<
script
>
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
IssueCardInner
from
'
./issue
_card_inner.vue
'
;
import
BoardCardInner
from
'
./board
_card_inner.vue
'
;
export
default
{
name
:
'
BoardCard
'
,
components
:
{
Issue
CardInner
,
Board
CardInner
,
},
props
:
{
list
:
{
...
...
@@ -76,6 +76,6 @@ export default {
class="board-card gl-p-5 gl-rounded-base"
@mouseup="toggleIssue($event)"
>
<
issue-card-inner
:list=
"list"
:issue
=
"issue"
:update-filters=
"true"
/>
<
board-card-inner
:list=
"list"
:item
=
"issue"
:update-filters=
"true"
/>
</li>
</
template
>
app/assets/javascripts/boards/components/
issue
_card_inner.vue
→
app/assets/javascripts/boards/components/
board
_card_inner.vue
View file @
d773d574
...
...
@@ -2,7 +2,7 @@
import
{
GlLabel
,
GlTooltipDirective
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
sortBy
}
from
'
lodash
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
issueCardInner
from
'
ee_else_ce/boards/mixins/issue
_card_inner
'
;
import
boardCardInner
from
'
ee_else_ce/boards/mixins/board
_card_inner
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
import
{
updateHistory
}
from
'
~/lib/utils/url_utility
'
;
import
{
sprintf
,
__
,
n__
}
from
'
~/locale
'
;
...
...
@@ -26,10 +26,10 @@ export default {
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
issue
CardInner
],
mixins
:
[
board
CardInner
],
inject
:
[
'
groupId
'
,
'
rootPath
'
,
'
scopedLabelsAvailable
'
],
props
:
{
i
ssue
:
{
i
tem
:
{
type
:
Object
,
required
:
true
,
},
...
...
@@ -52,19 +52,19 @@ export default {
};
},
computed
:
{
...
mapState
([
'
isShowingLabels
'
]),
...
mapState
([
'
isShowingLabels
'
,
'
isEpicBoard
'
]),
cappedAssignees
()
{
// e.g. maxRender is 4,
// Render up to all 4 assignees if there are only 4 assigness
// Otherwise render up to the limitBeforeCounter
if
(
this
.
i
ssue
.
assignees
.
length
<=
this
.
maxRender
)
{
return
this
.
i
ssue
.
assignees
.
slice
(
0
,
this
.
maxRender
);
if
(
this
.
i
tem
.
assignees
.
length
<=
this
.
maxRender
)
{
return
this
.
i
tem
.
assignees
.
slice
(
0
,
this
.
maxRender
);
}
return
this
.
i
ssue
.
assignees
.
slice
(
0
,
this
.
limitBeforeCounter
);
return
this
.
i
tem
.
assignees
.
slice
(
0
,
this
.
limitBeforeCounter
);
},
numberOverLimit
()
{
return
this
.
i
ssue
.
assignees
.
length
-
this
.
limitBeforeCounter
;
return
this
.
i
tem
.
assignees
.
length
-
this
.
limitBeforeCounter
;
},
assigneeCounterTooltip
()
{
const
{
numberOverLimit
,
maxCounter
}
=
this
;
...
...
@@ -79,31 +79,35 @@ export default {
return
`+
${
this
.
numberOverLimit
}
`
;
},
shouldRenderCounter
()
{
if
(
this
.
i
ssue
.
assignees
.
length
<=
this
.
maxRender
)
{
if
(
this
.
i
tem
.
assignees
.
length
<=
this
.
maxRender
)
{
return
false
;
}
return
this
.
i
ssue
.
assignees
.
length
>
this
.
numberOverLimit
;
return
this
.
i
tem
.
assignees
.
length
>
this
.
numberOverLimit
;
},
issueId
()
{
if
(
this
.
issue
.
iid
)
{
return
`#
${
this
.
issue
.
iid
}
`
;
itemPrefix
()
{
return
this
.
isEpicBoard
?
'
&
'
:
'
#
'
;
},
itemId
()
{
if
(
this
.
item
.
iid
)
{
return
`
${
this
.
itemPrefix
}${
this
.
item
.
iid
}
`
;
}
return
false
;
},
showLabelFooter
()
{
return
this
.
isShowingLabels
&&
this
.
i
ssue
.
labels
.
find
(
this
.
showLabel
);
return
this
.
isShowingLabels
&&
this
.
i
tem
.
labels
.
find
(
this
.
showLabel
);
},
i
ssue
ReferencePath
()
{
const
{
referencePath
,
groupId
}
=
this
.
issue
;
return
!
groupId
?
referencePath
.
split
(
'
#
'
)[
0
]
:
null
;
i
tem
ReferencePath
()
{
const
{
referencePath
}
=
this
.
item
;
return
referencePath
.
split
(
this
.
itemPrefix
)[
0
]
;
},
orderedLabels
()
{
return
sortBy
(
this
.
i
ssue
.
labels
.
filter
(
this
.
isNonListLabel
),
'
title
'
);
return
sortBy
(
this
.
i
tem
.
labels
.
filter
(
this
.
isNonListLabel
),
'
title
'
);
},
blockedLabel
()
{
if
(
this
.
i
ssue
.
blockedByCount
)
{
return
n__
(
`Blocked by %d issue`
,
`Blocked by %d issues`
,
this
.
i
ssue
.
blockedByCount
);
if
(
this
.
i
tem
.
blockedByCount
)
{
return
n__
(
`Blocked by %d issue`
,
`Blocked by %d issues`
,
this
.
i
tem
.
blockedByCount
);
}
return
__
(
'
Blocked issue
'
);
},
...
...
@@ -160,7 +164,7 @@ export default {
<div
class=
"gl-display-flex"
dir=
"auto"
>
<h4
class=
"board-card-title gl-mb-0 gl-mt-0"
>
<gl-icon
v-if=
"i
ssue
.blocked"
v-if=
"i
tem
.blocked"
v-gl-tooltip
name=
"issue-block"
:title=
"blockedLabel"
...
...
@@ -169,7 +173,7 @@ export default {
data-testid=
"issue-blocked-icon"
/>
<gl-icon
v-if=
"i
ssue
.confidential"
v-if=
"i
tem
.confidential"
v-gl-tooltip
name=
"eye-slash"
:title=
"__('Confidential')"
...
...
@@ -177,11 +181,11 @@ export default {
:aria-label=
"__('Confidential')"
/>
<a
:href=
"i
ssue.path || issue
.webUrl || ''"
:title=
"i
ssue
.title"
:href=
"i
tem.path || item
.webUrl || ''"
:title=
"i
tem
.title"
class=
"js-no-trigger"
@
mousemove
.
stop
>
{{
i
ssue
.
title
}}
</a
>
{{
i
tem
.
title
}}
</a
>
</h4>
</div>
...
...
@@ -205,29 +209,30 @@ export default {
class=
"gl-display-flex align-items-start flex-wrap-reverse board-card-number-container gl-overflow-hidden js-board-card-number-container"
>
<span
v-if=
"i
ssue
.referencePath"
v-if=
"i
tem
.referencePath"
class=
"board-card-number gl-overflow-hidden gl-display-flex gl-mr-3 gl-mt-3"
:class=
"{ 'gl-font-base': isEpicBoard }"
>
<tooltip-on-truncate
v-if=
"i
ssue
ReferencePath"
:title=
"i
ssue
ReferencePath"
v-if=
"i
tem
ReferencePath"
:title=
"i
tem
ReferencePath"
placement=
"bottom"
class=
"board-i
ssue
-path gl-text-truncate gl-font-weight-bold"
>
{{ i
ssue
ReferencePath }}
</tooltip-on-truncate
class=
"board-i
tem
-path gl-text-truncate gl-font-weight-bold"
>
{{ i
tem
ReferencePath }}
</tooltip-on-truncate
>
#{{ issue.ii
d }}
{{ itemI
d }}
</span>
<span
class=
"board-info-items gl-mt-3 gl-display-inline-block"
>
<issue-due-date
v-if=
"i
ssue
.dueDate"
:date=
"i
ssue
.dueDate"
:closed=
"i
ssue.closed || Boolean(issue
.closedAt)"
v-if=
"i
tem
.dueDate"
:date=
"i
tem
.dueDate"
:closed=
"i
tem.closed || Boolean(item
.closedAt)"
/>
<issue-time-estimate
v-if=
"i
ssue.timeEstimate"
:estimate=
"issue
.timeEstimate"
/>
<issue-time-estimate
v-if=
"i
tem.timeEstimate"
:estimate=
"item
.timeEstimate"
/>
<issue-card-weight
v-if=
"validIssueWeight"
:weight=
"i
ssue
.weight"
@
click=
"filterByWeight(i
ssue
.weight)"
v-if=
"validIssueWeight
(item)
"
:weight=
"i
tem
.weight"
@
click=
"filterByWeight(i
tem
.weight)"
/>
</span>
</div>
...
...
app/assets/javascripts/boards/components/board_card_layout_deprecated.vue
View file @
d773d574
...
...
@@ -3,13 +3,12 @@ import { mapActions, mapGetters } from 'vuex';
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
boardsStore
from
'
../stores/boards_store
'
;
import
IssueCardInner
from
'
./issue_card_inner.vue
'
;
import
IssueCardInnerDeprecated
from
'
./issue_card_inner_deprecated.vue
'
;
export
default
{
name
:
'
BoardCardLayout
'
,
components
:
{
IssueCardInner
:
gon
.
features
?.
graphqlBoardLists
?
IssueCardInner
:
IssueCardInnerDeprecated
,
IssueCardInner
:
IssueCardInnerDeprecated
,
},
mixins
:
[
glFeatureFlagMixin
()],
props
:
{
...
...
app/assets/javascripts/boards/components/issue_card_inner_deprecated.vue
View file @
d773d574
...
...
@@ -2,7 +2,7 @@
import
{
GlLabel
,
GlTooltipDirective
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
sortBy
}
from
'
lodash
'
;
import
{
mapState
}
from
'
vuex
'
;
import
issueCardInner
from
'
ee_else_ce/boards/mixins/issue
_card_inner
'
;
import
boardCardInner
from
'
ee_else_ce/boards/mixins/board
_card_inner
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
import
{
sprintf
,
__
,
n__
}
from
'
~/locale
'
;
import
TooltipOnTruncate
from
'
~/vue_shared/components/tooltip_on_truncate.vue
'
;
...
...
@@ -24,7 +24,7 @@ export default {
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
issue
CardInner
],
mixins
:
[
board
CardInner
],
inject
:
[
'
groupId
'
,
'
rootPath
'
],
props
:
{
issue
:
{
...
...
@@ -207,7 +207,7 @@ export default {
/>
<issue-time-estimate
v-if=
"issue.timeEstimate"
:estimate=
"issue.timeEstimate"
/>
<issue-card-weight
v-if=
"validIssueWeight"
v-if=
"validIssueWeight
(issue)
"
:weight=
"issue.weight"
@
click=
"filterByWeight(issue.weight)"
/>
...
...
app/assets/javascripts/boards/components/modal/list.vue
View file @
d773d574
...
...
@@ -2,11 +2,11 @@
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlBreakpointInstance
as
bp
}
from
'
@gitlab/ui/dist/utils
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
import
IssueCardInner
from
'
../issue
_card_inner.vue
'
;
import
BoardCardInner
from
'
../board
_card_inner.vue
'
;
export
default
{
components
:
{
Issue
CardInner
,
Board
CardInner
,
GlIcon
,
},
props
:
{
...
...
@@ -126,7 +126,7 @@ export default {
class="board-card position-relative p-3 rounded"
@click="toggleIssue($event, issue)"
>
<
issue-card-inner
:issue
=
"issue"
/>
<
board-card-inner
:item
=
"issue"
/>
<gl-icon
v-if=
"issue.selected"
:aria-label=
"'Issue #' + issue.id + ' selected'"
...
...
app/assets/javascripts/boards/mixins/
issue
_card_inner.js
→
app/assets/javascripts/boards/mixins/
board
_card_inner.js
View file @
d773d574
export
default
{
computed
:
{
methods
:
{
validIssueWeight
()
{
return
false
;
},
},
methods
:
{
filterByWeight
()
{},
},
};
app/assets/stylesheets/page_bundles/boards.scss
View file @
d773d574
...
...
@@ -515,7 +515,7 @@
}
}
.board-i
ssue
-path.js-show-tooltip
{
.board-i
tem
-path.js-show-tooltip
{
cursor
:
help
;
}
...
...
ee/app/assets/javascripts/boards/graphql/lists_epics.query.graphql
View file @
d773d574
...
...
@@ -18,6 +18,8 @@ query ListEpics(
node
{
...
EpicNode
relativePosition
referencePath
:
reference
(
full
:
true
)
confidential
labels
{
nodes
{
...
Label
...
...
ee/app/assets/javascripts/boards/mixins/
issue
_card_inner.js
→
ee/app/assets/javascripts/boards/mixins/
board
_card_inner.js
View file @
d773d574
import
{
isNumber
}
from
'
lodash
'
;
export
default
{
computed
:
{
validIssueWeight
()
{
if
(
this
.
issue
&&
isNumber
(
this
.
issue
.
weight
))
{
return
this
.
issue
.
weight
>=
0
;
methods
:
{
validIssueWeight
(
issue
)
{
if
(
issue
&&
isNumber
(
issue
.
weight
))
{
return
issue
.
weight
>=
0
;
}
return
false
;
},
},
methods
:
{
filterByWeight
(
weight
)
{
if
(
!
this
.
updateFilters
)
return
;
...
...
ee/spec/frontend/boards/
issue
_card_inner_spec.js
→
ee/spec/frontend/boards/
board
_card_inner_spec.js
View file @
d773d574
import
{
GlLabel
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
IssueCardWeight
from
'
ee/boards/components/issue_card_weight.vue
'
;
import
IssueCardInner
from
'
~/boards/components/issue
_card_inner.vue
'
;
import
BoardCardInner
from
'
~/boards/components/board
_card_inner.vue
'
;
import
defaultStore
from
'
~/boards/stores
'
;
describe
(
'
Issue
card component
'
,
()
=>
{
describe
(
'
Board
card component
'
,
()
=>
{
let
wrapper
;
let
issue
;
let
list
;
const
createComponent
=
(
props
=
{},
store
=
defaultStore
)
=>
{
wrapper
=
shallowMount
(
Issue
CardInner
,
{
wrapper
=
shallowMount
(
Board
CardInner
,
{
store
,
propsData
:
{
list
,
issue
,
i
tem
:
i
ssue
,
...
props
,
},
provide
:
{
...
...
spec/frontend/boards/
issue
_card_inner_spec.js
→
spec/frontend/boards/
board
_card_inner_spec.js
View file @
d773d574
import
{
GlLabel
}
from
'
@gitlab/ui
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
range
}
from
'
lodash
'
;
import
IssueCardInner
from
'
~/boards/components/issue
_card_inner.vue
'
;
import
BoardCardInner
from
'
~/boards/components/board
_card_inner.vue
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
import
defaultStore
from
'
~/boards/stores
'
;
import
{
updateHistory
}
from
'
~/lib/utils/url_utility
'
;
...
...
@@ -10,7 +10,7 @@ import { mockLabelList } from './mock_data';
jest
.
mock
(
'
~/lib/utils/url_utility
'
);
jest
.
mock
(
'
~/boards/eventhub
'
);
describe
(
'
Issue
card component
'
,
()
=>
{
describe
(
'
Board
card component
'
,
()
=>
{
const
user
=
{
id
:
1
,
name
:
'
testing 123
'
,
...
...
@@ -31,11 +31,11 @@ describe('Issue card component', () => {
let
list
;
const
createWrapper
=
(
props
=
{},
store
=
defaultStore
)
=>
{
wrapper
=
mount
(
Issue
CardInner
,
{
wrapper
=
mount
(
Board
CardInner
,
{
store
,
propsData
:
{
list
,
issue
,
i
tem
:
i
ssue
,
...
props
,
},
stubs
:
{
...
...
@@ -63,7 +63,7 @@ describe('Issue card component', () => {
weight
:
1
,
};
createWrapper
({
issue
,
list
});
createWrapper
({
i
tem
:
i
ssue
,
list
});
});
afterEach
(()
=>
{
...
...
@@ -103,8 +103,8 @@ describe('Issue card component', () => {
describe
(
'
confidential issue
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
confidential
:
true
,
},
});
...
...
@@ -119,8 +119,8 @@ describe('Issue card component', () => {
describe
(
'
with avatar
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
assignees
:
[
user
],
updateData
(
newData
)
{
Object
.
assign
(
this
,
newData
);
...
...
@@ -146,8 +146,8 @@ describe('Issue card component', () => {
});
it
(
'
renders the avatar using avatarUrl property
'
,
async
()
=>
{
wrapper
.
props
(
'
i
ssue
'
).
updateData
({
...
wrapper
.
props
(
'
i
ssue
'
),
wrapper
.
props
(
'
i
tem
'
).
updateData
({
...
wrapper
.
props
(
'
i
tem
'
),
assignees
:
[
{
id
:
'
1
'
,
...
...
@@ -172,8 +172,8 @@ describe('Issue card component', () => {
global
.
gon
.
default_avatar_url
=
'
default_avatar
'
;
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
assignees
:
[
{
id
:
1
,
...
...
@@ -201,8 +201,8 @@ describe('Issue card component', () => {
describe
(
'
multiple assignees
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
assignees
:
[
{
id
:
2
,
...
...
@@ -233,7 +233,7 @@ describe('Issue card component', () => {
describe
(
'
more than three assignees
'
,
()
=>
{
beforeEach
(()
=>
{
const
{
assignees
}
=
wrapper
.
props
(
'
i
ssue
'
);
const
{
assignees
}
=
wrapper
.
props
(
'
i
tem
'
);
assignees
.
push
({
id
:
5
,
name
:
'
user5
'
,
...
...
@@ -242,8 +242,8 @@ describe('Issue card component', () => {
});
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
assignees
,
},
});
...
...
@@ -259,7 +259,7 @@ describe('Issue card component', () => {
it
(
'
renders 99+ avatar counter
'
,
async
()
=>
{
const
assignees
=
[
...
wrapper
.
props
(
'
i
ssue
'
).
assignees
,
...
wrapper
.
props
(
'
i
tem
'
).
assignees
,
...
range
(
5
,
103
).
map
((
i
)
=>
({
id
:
i
,
name
:
'
name
'
,
...
...
@@ -268,8 +268,8 @@ describe('Issue card component', () => {
})),
];
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
assignees
,
},
});
...
...
@@ -283,7 +283,7 @@ describe('Issue card component', () => {
describe
(
'
labels
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
issue
,
labels
:
[
list
.
label
,
label1
]
}
});
wrapper
.
setProps
({
i
tem
:
{
...
issue
,
labels
:
[
list
.
label
,
label1
]
}
});
});
it
(
'
does not render list label but renders all other labels
'
,
()
=>
{
...
...
@@ -295,7 +295,7 @@ describe('Issue card component', () => {
});
it
(
'
does not render label if label does not have an ID
'
,
async
()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
issue
,
labels
:
[
label1
,
{
title
:
'
closed
'
}]
}
});
wrapper
.
setProps
({
i
tem
:
{
...
issue
,
labels
:
[
label1
,
{
title
:
'
closed
'
}]
}
});
await
wrapper
.
vm
.
$nextTick
();
...
...
@@ -307,8 +307,8 @@ describe('Issue card component', () => {
describe
(
'
blocked
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
.
setProps
({
i
ssue
:
{
...
wrapper
.
props
(
'
i
ssue
'
),
i
tem
:
{
...
wrapper
.
props
(
'
i
tem
'
),
blocked
:
true
,
},
});
...
...
spec/frontend/boards/components/board_card_deprecated_spec.js
View file @
d773d574
...
...
@@ -7,7 +7,7 @@ import { mount } from '@vue/test-utils';
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
BoardCardDeprecated
from
'
~/boards/components/board_card_deprecated.vue
'
;
import
issueCardInner
from
'
~/boards/components/issue_card_inner.vue
'
;
import
issueCardInner
from
'
~/boards/components/issue_card_inner
_deprecated
.vue
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
import
store
from
'
~/boards/stores
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
...
...
spec/frontend/boards/components/board_card_layout_deprecated_spec.js
View file @
d773d574
...
...
@@ -11,7 +11,7 @@ import '~/boards/models/label';
import
'
~/boards/models/assignee
'
;
import
'
~/boards/models/list
'
;
import
BoardCardLayout
from
'
~/boards/components/board_card_layout_deprecated.vue
'
;
import
issueCardInner
from
'
~/boards/components/issue_card_inner.vue
'
;
import
issueCardInner
from
'
~/boards/components/issue_card_inner
_deprecated
.vue
'
;
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
boardsVuexStore
from
'
~/boards/stores
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
...
...
spec/frontend/boards/components/board_card_spec.js
View file @
d773d574
...
...
@@ -2,7 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import
Vuex
from
'
vuex
'
;
import
BoardCard
from
'
~/boards/components/board_card.vue
'
;
import
IssueCardInner
from
'
~/boards/components/issue
_card_inner.vue
'
;
import
BoardCardInner
from
'
~/boards/components/board
_card_inner.vue
'
;
import
{
inactiveId
}
from
'
~/boards/constants
'
;
import
{
mockLabelList
,
mockIssue
}
from
'
../mock_data
'
;
...
...
@@ -38,7 +38,7 @@ describe('Board card layout', () => {
wrapper
=
shallowMount
(
BoardCard
,
{
localVue
,
stubs
:
{
Issue
CardInner
,
Board
CardInner
,
},
store
,
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