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
669e014e
Commit
669e014e
authored
Nov 10, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swimlanes - Hide epic lanes with 0 issues
parent
7472a375
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
ee/app/assets/javascripts/boards/components/epic_lane.vue
ee/app/assets/javascripts/boards/components/epic_lane.vue
+8
-2
ee/spec/features/boards/swimlanes/epics_swimlanes_drag_issue_spec.rb
...tures/boards/swimlanes/epics_swimlanes_drag_issue_spec.rb
+12
-2
ee/spec/frontend/boards/components/epic_lane_spec.js
ee/spec/frontend/boards/components/epic_lane_spec.js
+13
-4
No files found.
ee/app/assets/javascripts/boards/components/epic_lane.vue
View file @
669e014e
...
...
@@ -85,6 +85,9 @@ export default {
isLoading
()
{
return
Boolean
(
this
.
epicsFlags
[
this
.
epic
.
id
]?.
isLoading
);
},
shouldDisplay
()
{
return
this
.
issuesCount
>
0
||
this
.
isLoading
;
},
},
watch
:
{
filterParams
:
{
...
...
@@ -116,8 +119,11 @@ export default {
</
script
>
<
template
>
<div>
<div
class=
"board-epic-lane gl-sticky gl-left-0 gl-display-inline-block"
>
<div
v-if=
"shouldDisplay"
>
<div
class=
"board-epic-lane gl-sticky gl-left-0 gl-display-inline-block"
data-testid=
"board-epic-lane"
>
<div
class=
"gl-pb-5 gl-px-3 gl-display-flex gl-align-items-center"
>
<gl-button
v-gl-tooltip
.
hover
.
right
...
...
ee/spec/features/boards/swimlanes/epics_swimlanes_drag_issue_spec.rb
View file @
669e014e
...
...
@@ -43,19 +43,29 @@ RSpec.describe 'epics swimlanes', :js do
wait_for_board_cards_in_first_epic
(
0
,
1
)
wait_for_board_cards_in_second_epic
(
1
,
1
)
epic_lanes
=
page
.
all
(
:css
,
'.board-epic-lane'
)
expect
(
epic_lanes
.
length
).
to
eq
(
2
)
drag
(
list_from_index:
4
,
list_to_index:
1
)
epic_lanes
=
page
.
all
(
:css
,
'.board-epic-lane'
)
expect
(
epic_lanes
.
length
).
to
eq
(
1
)
wait_for_board_cards_in_first_epic
(
1
,
1
)
wait_for_board_cards_in_second_epic
(
1
,
0
)
end
it
'from epic to unassigned issues lane'
do
wait_for_board_cards
(
1
,
2
)
wait_for_board_cards_in_second_epic
(
1
,
1
)
epic_lanes
=
page
.
all
(
:css
,
'.board-epic-lane'
)
expect
(
epic_lanes
.
length
).
to
eq
(
2
)
drag
(
list_from_index:
4
,
list_to_index:
7
)
wait_for_board_cards_in_second_epic
(
1
,
0
)
epic_lanes
=
page
.
all
(
:css
,
'.board-epic-lane'
)
expect
(
epic_lanes
.
length
).
to
eq
(
1
)
wait_for_board_cards_in_unassigned_lane
(
1
,
1
)
end
...
...
ee/spec/frontend/boards/components/epic_lane_spec.js
View file @
669e014e
...
...
@@ -16,14 +16,14 @@ describe('EpicLane', () => {
const
updateBoardEpicUserPreferencesSpy
=
jest
.
fn
();
const
createStore
=
isLoading
=>
{
const
createStore
=
({
isLoading
=
false
,
issuesByListId
=
mockIssuesByListId
})
=>
{
return
new
Vuex
.
Store
({
actions
:
{
fetchIssuesForEpic
:
jest
.
fn
(),
updateBoardEpicUserPreferences
:
updateBoardEpicUserPreferencesSpy
,
},
state
:
{
issuesByListId
:
mockIssuesByListId
,
issuesByListId
,
issues
,
epicsFlags
:
{
[
mockEpic
.
id
]:
{
isLoading
},
...
...
@@ -33,8 +33,12 @@ describe('EpicLane', () => {
});
};
const
createComponent
=
({
props
=
{},
isLoading
=
false
}
=
{})
=>
{
const
store
=
createStore
(
isLoading
);
const
createComponent
=
({
props
=
{},
isLoading
=
false
,
issuesByListId
=
mockIssuesByListId
,
}
=
{})
=>
{
const
store
=
createStore
({
isLoading
,
issuesByListId
});
const
defaultProps
=
{
epic
:
mockEpic
,
...
...
@@ -119,5 +123,10 @@ describe('EpicLane', () => {
expect
(
wrapper
.
vm
.
isCollapsed
).
toBe
(
true
);
});
});
it
(
'
does not render when issuesCount is 0
'
,
()
=>
{
createComponent
({
issuesByListId
:
{}
});
expect
(
findByTestId
(
'
board-epic-lane
'
).
exists
()).
toBe
(
false
);
});
});
});
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