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
5b721c53
Commit
5b721c53
authored
Oct 27, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use labels widget on epic board and mr sidebar
Add MR support in labels widget
parent
a9bae7b7
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
111 additions
and
40 deletions
+111
-40
app/assets/javascripts/boards/components/board_content_sidebar.vue
...s/javascripts/boards/components/board_content_sidebar.vue
+9
-1
app/assets/javascripts/sidebar/constants.js
app/assets/javascripts/sidebar/constants.js
+2
-0
app/assets/javascripts/sidebar/mount_sidebar.js
app/assets/javascripts/sidebar/mount_sidebar.js
+4
-0
app/assets/javascripts/sidebar/queries/update_merge_request_labels.mutation.graphql
...ebar/queries/update_merge_request_labels.mutation.graphql
+1
-0
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue
...onents/sidebar/labels_select_widget/dropdown_contents.vue
+0
-5
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_create_view.vue
...ar/labels_select_widget/dropdown_contents_create_view.vue
+0
-5
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue
...ar/labels_select_widget/dropdown_contents_labels_view.vue
+1
-11
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_value.vue
...omponents/sidebar/labels_select_widget/dropdown_value.vue
+1
-2
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/graphql/merge_request_labels.query.graphql
..._select_widget/graphql/merge_request_labels.query.graphql
+14
-0
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
...nents/sidebar/labels_select_widget/labels_select_root.vue
+4
-4
app/assets/stylesheets/page_bundles/boards.scss
app/assets/stylesheets/page_bundles/boards.scss
+4
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
app/helpers/boards_helper.rb
app/helpers/boards_helper.rb
+1
-1
ee/app/assets/javascripts/boards/components/epic_board_content_sidebar.vue
...ascripts/boards/components/epic_board_content_sidebar.vue
+46
-2
ee/app/assets/javascripts/epic/components/epic_form.vue
ee/app/assets/javascripts/epic/components/epic_form.vue
+2
-1
ee/app/assets/javascripts/epic_boards/index.js
ee/app/assets/javascripts/epic_boards/index.js
+3
-0
ee/app/controllers/groups/epic_boards_controller.rb
ee/app/controllers/groups/epic_boards_controller.rb
+3
-0
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+7
-0
ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb
ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb
+2
-2
ee/spec/frontend/boards/components/board_content_spec.js
ee/spec/frontend/boards/components/board_content_spec.js
+2
-0
ee/spec/frontend/boards/components/epic_board_content_sidebar_spec.js
...tend/boards/components/epic_board_content_sidebar_spec.js
+1
-0
spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view_spec.js
...abels_select_widget/dropdown_contents_labels_view_spec.js
+0
-2
spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js
...ts/sidebar/labels_select_widget/dropdown_contents_spec.js
+0
-1
spec/helpers/boards_helper_spec.rb
spec/helpers/boards_helper_spec.rb
+3
-3
No files found.
app/assets/javascripts/boards/components/board_content_sidebar.vue
View file @
5b721c53
...
...
@@ -54,6 +54,9 @@ export default {
allowLabelEdit
:
{
default
:
false
,
},
labelsFilterBasePath
:
{
default
:
''
,
},
},
inheritAttrs
:
false
,
computed
:
{
...
...
@@ -90,6 +93,11 @@ export default {
labelType
()
{
return
this
.
isGroupBoard
?
LabelType
.
group
:
LabelType
.
project
;
},
labelsFilterPath
()
{
return
this
.
isGroupBoard
?
this
.
labelsFilterBasePath
.
replace
(
'
:project_path
'
,
this
.
projectPathForActiveIssue
)
:
this
.
labelsFilterBasePath
;
},
},
methods
:
{
...
mapActions
([
...
...
@@ -212,7 +220,7 @@ export default {
:footer-create-label-title=
"createLabelTitle"
:footer-manage-label-title=
"manageLabelTitle"
:labels-create-title=
"createLabelTitle"
:labels-filter-base-path=
"
projectPathForActiveIssue
"
:labels-filter-base-path=
"
labelsFilterPath
"
:attr-workspace-path=
"attrWorkspacePath"
workspace-type=
"project"
:issuable-type=
"issuableType"
...
...
app/assets/javascripts/sidebar/constants.js
View file @
5b721c53
...
...
@@ -37,6 +37,7 @@ import epicLabelsQuery from '~/vue_shared/components/sidebar/labels_select_widge
import
updateEpicLabelsMutation
from
'
~/vue_shared/components/sidebar/labels_select_widget/graphql/epic_update_labels.mutation.graphql
'
;
import
groupLabelsQuery
from
'
~/vue_shared/components/sidebar/labels_select_widget/graphql/group_labels.query.graphql
'
;
import
issueLabelsQuery
from
'
~/vue_shared/components/sidebar/labels_select_widget/graphql/issue_labels.query.graphql
'
;
import
mergeRequestLabelsQuery
from
'
~/vue_shared/components/sidebar/labels_select_widget/graphql/merge_request_labels.query.graphql
'
;
import
projectLabelsQuery
from
'
~/vue_shared/components/sidebar/labels_select_widget/graphql/project_labels.query.graphql
'
;
import
getAlertAssignees
from
'
~/vue_shared/components/sidebar/queries/get_alert_assignees.query.graphql
'
;
import
getIssueAssignees
from
'
~/vue_shared/components/sidebar/queries/get_issue_assignees.query.graphql
'
;
...
...
@@ -128,6 +129,7 @@ export const issuableLabelsQueries = {
mutationName
:
'
updateIssue
'
,
},
[
IssuableType
.
MergeRequest
]:
{
issuableQuery
:
mergeRequestLabelsQuery
,
mutation
:
updateMergeRequestLabelsMutation
,
mutationName
:
'
mergeRequestSetLabels
'
,
},
...
...
app/assets/javascripts/sidebar/mount_sidebar.js
View file @
5b721c53
...
...
@@ -260,6 +260,10 @@ export function mountSidebarLabels() {
variant
:
DropdownVariant
.
Sidebar
,
canUpdate
:
parseBoolean
(
el
.
dataset
.
canEdit
),
isClassicSidebar
:
true
,
issuableType
:
isInIssuePage
()
||
isInIncidentPage
()
||
isInDesignPage
()
?
IssuableType
.
Issue
:
IssuableType
.
MergeRequest
,
},
render
:
(
createElement
)
=>
createElement
(
SidebarLabels
),
});
...
...
app/assets/javascripts/sidebar/queries/update_merge_request_labels.mutation.graphql
View file @
5b721c53
...
...
@@ -2,6 +2,7 @@ mutation mergeRequestSetLabels($input: MergeRequestSetLabelsInput!) {
mergeRequestSetLabels
(
input
:
$input
)
{
errors
mergeRequest
{
id
labels
{
nodes
{
color
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue
View file @
5b721c53
...
...
@@ -53,10 +53,6 @@ export default {
type
:
String
,
required
:
true
,
},
issuableType
:
{
type
:
String
,
required
:
true
,
},
isVisible
:
{
type
:
Boolean
,
required
:
false
,
...
...
@@ -209,7 +205,6 @@ export default {
v-model=
"localSelectedLabels"
:search-key=
"searchKey"
:allow-multiselect=
"allowMultiselect"
:issuable-type=
"issuableType"
:full-path=
"fullPath"
:workspace-type=
"workspaceType"
:attr-workspace-path=
"attrWorkspacePath"
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_create_view.vue
View file @
5b721c53
...
...
@@ -32,11 +32,6 @@ export default {
type
:
String
,
required
:
true
,
},
issuableType
:
{
type
:
String
,
required
:
false
,
default
:
undefined
,
},
workspaceType
:
{
type
:
String
,
required
:
true
,
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue
View file @
5b721c53
...
...
@@ -23,10 +23,6 @@ export default {
type
:
Boolean
,
required
:
true
,
},
issuableType
:
{
type
:
String
,
required
:
true
,
},
localSelectedLabels
:
{
type
:
Array
,
required
:
true
,
...
...
@@ -119,13 +115,7 @@ export default {
({
id
})
=>
id
!==
getIdFromGraphQLId
(
label
.
id
)
&&
id
!==
label
.
id
,
);
}
else
{
labels
=
[
...
this
.
localSelectedLabels
,
{
...
label
,
id
:
getIdFromGraphQLId
(
label
.
id
),
},
];
labels
=
[...
this
.
localSelectedLabels
,
label
];
}
this
.
$emit
(
'
input
'
,
labels
);
},
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_value.vue
View file @
5b721c53
<
script
>
import
{
GlLabel
}
from
'
@gitlab/ui
'
;
import
{
sortBy
}
from
'
lodash
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
export
default
{
...
...
@@ -47,7 +46,7 @@ export default {
return
this
.
allowScopedLabels
&&
isScopedLabel
(
label
);
},
removeLabel
(
labelId
)
{
this
.
$emit
(
'
onLabelRemove
'
,
getIdFromGraphQLId
(
labelId
)
);
this
.
$emit
(
'
onLabelRemove
'
,
labelId
);
},
},
};
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/graphql/merge_request_labels.query.graphql
0 → 100644
View file @
5b721c53
#import "~/graphql_shared/fragments/label.fragment.graphql"
query
mergeRequestLabels
(
$fullPath
:
ID
!,
$iid
:
String
!)
{
workspace
:
project
(
fullPath
:
$fullPath
)
{
issuable
:
mergeRequest
(
iid
:
$iid
)
{
id
labels
{
nodes
{
...
Label
}
}
}
}
}
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
View file @
5b721c53
...
...
@@ -207,7 +207,7 @@ export default {
return
{
iid
:
currentIid
,
groupPath
:
this
.
fullPath
,
addLabelIds
:
labelIds
,
addLabelIds
:
labelIds
.
map
((
id
)
=>
getIdFromGraphQLId
(
id
))
,
removeLabelIds
:
this
.
issuableLabelIds
.
filter
((
id
)
=>
!
labelIds
.
includes
(
id
))
.
map
((
id
)
=>
getIdFromGraphQLId
(
id
)),
...
...
@@ -232,8 +232,8 @@ export default {
}
this
.
$emit
(
'
updateSelectedLabels
'
,
{
id
:
data
[
mutationName
]?.[
this
.
issuableType
].
id
,
labels
:
data
[
mutationName
]?.[
this
.
issuableType
].
labels
?.
nodes
,
id
:
data
[
mutationName
]?.[
this
.
issuableType
]
?
.
id
,
labels
:
data
[
mutationName
]?.[
this
.
issuableType
]
?
.
labels
?.
nodes
,
});
})
.
catch
((
error
)
=>
...
...
@@ -268,7 +268,7 @@ export default {
case
IssuableType
.
Epic
:
return
{
iid
:
this
.
iid
,
removeLabelIds
:
[
labelId
],
removeLabelIds
:
[
getIdFromGraphQLId
(
labelId
)
],
groupPath
:
this
.
fullPath
,
};
default
:
...
...
app/assets/stylesheets/page_bundles/boards.scss
View file @
5b721c53
...
...
@@ -470,6 +470,10 @@
.labels-select-wrapper.is-embedded
.labels-select-wrapper.is-embedded
{
width
:
auto
;
}
.show.dropdown
.dropdown-menu
{
width
:
100%
;
}
}
.board-header-collapsed-info-icon
:hover
{
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
5b721c53
...
...
@@ -42,6 +42,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:restructured_mr_widget
,
project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:mr_changes_fluid_layout
,
project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:mr_attention_requests
,
project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:labels_widget
,
@project
,
default_enabled: :yaml
)
# Usage data feature flags
push_frontend_feature_flag
(
:users_expanding_widgets_usage_data
,
@project
,
default_enabled: :yaml
)
...
...
app/helpers/boards_helper.rb
View file @
5b721c53
...
...
@@ -43,7 +43,7 @@ module BoardsHelper
def
build_issue_link_base
if
board
.
group_board?
"
#{
group_path
(
@board
.
group
)
}
/:project_path
/issues"
"
/:project_path/-
/issues"
else
project_issues_path
(
@project
)
end
...
...
ee/app/assets/javascripts/boards/components/epic_board_content_sidebar.vue
View file @
5b721c53
...
...
@@ -6,11 +6,14 @@ import SidebarAncestorsWidget from 'ee_component/sidebar/components/ancestors_tr
import
BoardSidebarLabelsSelect
from
'
~/boards/components/sidebar/board_sidebar_labels_select.vue
'
;
import
BoardSidebarTitle
from
'
~/boards/components/sidebar/board_sidebar_title.vue
'
;
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
SidebarConfidentialityWidget
from
'
~/sidebar/components/confidential/sidebar_confidentiality_widget.vue
'
;
import
SidebarDateWidget
from
'
~/sidebar/components/date/sidebar_date_widget.vue
'
;
import
SidebarParticipantsWidget
from
'
~/sidebar/components/participants/sidebar_participants_widget.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
import
SidebarLabelsWidget
from
'
~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
components
:
{
...
...
@@ -18,6 +21,7 @@ export default {
SidebarTodoWidget
,
BoardSidebarLabelsSelect
,
BoardSidebarTitle
,
SidebarLabelsWidget
,
SidebarConfidentialityWidget
,
SidebarDateWidget
,
SidebarParticipantsWidget
,
...
...
@@ -25,6 +29,8 @@ export default {
SidebarAncestorsWidget
,
MountingPortal
,
},
mixins
:
[
glFeatureFlagMixin
()],
inject
:
[
'
canUpdate
'
,
'
labelsFilterBasePath
'
],
inheritAttrs
:
false
,
computed
:
{
...
mapGetters
([
'
isSidebarOpen
'
,
'
activeBoardItem
'
]),
...
...
@@ -40,10 +46,30 @@ export default {
},
},
methods
:
{
...
mapActions
([
'
toggleBoardItem
'
,
'
setActiveItemConfidential
'
,
'
setActiveItemSubscribed
'
]),
...
mapActions
([
'
toggleBoardItem
'
,
'
setActiveItemConfidential
'
,
'
setActiveItemSubscribed
'
,
'
setActiveBoardItemLabels
'
,
]),
handleClose
()
{
this
.
toggleBoardItem
({
boardItem
:
this
.
activeBoardItem
,
sidebarType
:
this
.
sidebarType
});
},
handleUpdateSelectedLabels
({
labels
,
id
})
{
this
.
setActiveBoardItemLabels
({
id
,
groupPath
:
this
.
fullPath
,
labelIds
:
labels
.
map
((
label
)
=>
getIdFromGraphQLId
(
label
.
id
)),
labels
,
});
},
handleLabelRemove
(
removeLabelId
)
{
this
.
setActiveBoardItemLabels
({
iid
:
this
.
activeBoardItem
.
iid
,
groupPath
:
this
.
fullPath
,
removeLabelIds
:
[
removeLabelId
],
});
},
},
};
</
script
>
...
...
@@ -86,7 +112,25 @@ export default {
:issuable-type=
"issuableType"
:can-inherit=
"true"
/>
<board-sidebar-labels-select
class=
"labels"
/>
<sidebar-labels-widget
v-if=
"glFeatures.labelsWidget"
class=
"block labels"
data-testid=
"sidebar-labels"
:iid=
"activeBoardItem.iid"
:full-path=
"fullPath"
:allow-label-remove=
"canUpdate"
:allow-multiselect=
"true"
:labels-filter-base-path=
"labelsFilterBasePath"
:attr-workspace-path=
"fullPath"
workspace-type=
"group"
:issuable-type=
"issuableType"
label-create-type=
"group"
@
onLabelRemove=
"handleLabelRemove"
@
updateSelectedLabels=
"handleUpdateSelectedLabels"
>
{{
__
(
'
None
'
)
}}
</sidebar-labels-widget>
<board-sidebar-labels-select
v-else
class=
"labels"
/>
<sidebar-confidentiality-widget
:iid=
"activeBoardItem.iid"
:full-path=
"fullPath"
...
...
ee/app/assets/javascripts/epic/components/epic_form.vue
View file @
5b721c53
...
...
@@ -8,6 +8,7 @@ import {
GlFormInput
,
}
from
'
@gitlab/ui
'
;
import
createFlash
from
'
~/flash
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
s__
}
from
'
~/locale
'
;
...
...
@@ -113,7 +114,7 @@ export default {
},
handleUpdateSelectedLabels
(
labels
)
{
if
(
this
.
glFeatures
.
labelsWidget
)
{
this
.
labels
=
labels
;
this
.
labels
=
labels
.
map
((
label
)
=>
({
...
label
,
id
:
getIdFromGraphQLId
(
label
.
id
)
}))
;
return
;
}
...
...
ee/app/assets/javascripts/epic_boards/index.js
View file @
5b721c53
...
...
@@ -97,6 +97,9 @@ function mountBoardApp(el) {
iterationListsAvailable
:
false
,
issuableType
:
issuableTypes
.
epic
,
emailsDisabled
:
parseBoolean
(
el
.
dataset
.
emailsDisabled
),
allowLabelCreate
:
parseBoolean
(
el
.
dataset
.
canUpdate
),
allowLabelEdit
:
parseBoolean
(
el
.
dataset
.
canUpdate
),
allowScopedLabels
:
parseBoolean
(
el
.
dataset
.
scopedLabels
),
},
render
:
(
createComponent
)
=>
createComponent
(
BoardApp
),
});
...
...
ee/app/controllers/groups/epic_boards_controller.rb
View file @
5b721c53
...
...
@@ -8,6 +8,9 @@ class Groups::EpicBoardsController < Groups::ApplicationController
before_action
:redirect_to_recent_board
,
only:
[
:index
]
before_action
:assign_endpoint_vars
before_action
do
push_frontend_feature_flag
(
:labels_widget
,
group
,
default_enabled: :yaml
)
end
track_redis_hll_event
:index
,
:show
,
name:
'g_project_management_users_viewing_epic_boards'
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
5b721c53
...
...
@@ -71,6 +71,13 @@ module EE
super
end
override
:build_issue_link_base
def
build_issue_link_base
return
group_epics_path
(
@group
)
if
board
.
is_a?
(
::
Boards
::
EpicBoard
)
super
end
override
:board_base_url
def
board_base_url
return
group_epic_boards_url
(
@group
)
if
board
.
is_a?
(
::
Boards
::
EpicBoard
)
...
...
ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb
View file @
5b721c53
...
...
@@ -161,9 +161,9 @@ RSpec.describe 'Epic boards sidebar', :js do
wait_for_requests
click_
link
bug
.
title
click_
on
bug
.
title
find
(
'[data-testid="close-icon"]'
).
click
click_button
'Close'
wait_for_requests
...
...
ee/spec/frontend/boards/components/board_content_spec.js
View file @
5b721c53
...
...
@@ -15,6 +15,8 @@ describe('ee/BoardContent', () => {
provide
:
{
timeTrackingLimitToHours
:
false
,
canAdminList
:
false
,
canUpdate
:
false
,
labelsFilterBasePath
:
''
,
},
propsData
:
{
lists
:
[],
...
...
ee/spec/frontend/boards/components/epic_board_content_sidebar_spec.js
View file @
5b721c53
...
...
@@ -45,6 +45,7 @@ describe('EpicBoardContentSidebar', () => {
canUpdate
:
true
,
rootPath
:
'
/
'
,
groupId
:
1
,
labelsFilterBasePath
:
''
,
},
store
,
stubs
:
{
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view_spec.js
View file @
5b721c53
...
...
@@ -10,7 +10,6 @@ import VueApollo from 'vue-apollo';
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
createFlash
from
'
~/flash
'
;
import
{
IssuableType
}
from
'
~/issue_show/constants
'
;
import
{
DEFAULT_DEBOUNCE_AND_THROTTLE_MS
}
from
'
~/lib/utils/constants
'
;
import
{
DropdownVariant
}
from
'
~/vue_shared/components/sidebar/labels_select_widget/constants
'
;
import
DropdownContentsLabelsView
from
'
~/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue
'
;
...
...
@@ -57,7 +56,6 @@ describe('DropdownContentsLabelsView', () => {
propsData
:
{
...
initialState
,
localSelectedLabels
,
issuableType
:
IssuableType
.
Issue
,
searchKey
,
labelCreateType
:
'
project
'
,
workspaceType
:
'
project
'
,
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js
View file @
5b721c53
...
...
@@ -39,7 +39,6 @@ describe('DropdownContent', () => {
footerManageLabelTitle
:
'
manage
'
,
dropdownButtonText
:
'
Labels
'
,
variant
:
'
sidebar
'
,
issuableType
:
'
issue
'
,
fullPath
:
'
test
'
,
workspaceType
:
'
project
'
,
labelCreateType
:
'
project
'
,
...
...
spec/helpers/boards_helper_spec.rb
View file @
5b721c53
...
...
@@ -23,14 +23,14 @@ RSpec.describe BoardsHelper do
it
'returns correct path for base group'
do
assign
(
:board
,
group_board
)
expect
(
helper
.
build_issue_link_base
).
to
eq
(
'/
base/:project_path
/issues'
)
expect
(
helper
.
build_issue_link_base
).
to
eq
(
'/
:project_path/-
/issues'
)
end
it
'returns correct path for subgroup'
do
subgroup
=
create
(
:group
,
parent:
base_group
,
path:
'sub'
)
assign
(
:board
,
create
(
:board
,
group:
subgroup
))
expect
(
helper
.
build_issue_link_base
).
to
eq
(
'/
base/sub/:project_path
/issues'
)
expect
(
helper
.
build_issue_link_base
).
to
eq
(
'/
:project_path/-
/issues'
)
end
end
end
...
...
@@ -149,7 +149,7 @@ RSpec.describe BoardsHelper do
end
it
'returns correct path for base group'
do
expect
(
helper
.
build_issue_link_base
).
to
eq
(
"/
#{
base_group
.
full_path
}
/:project_path
/issues"
)
expect
(
helper
.
build_issue_link_base
).
to
eq
(
"/
:project_path/-
/issues"
)
end
it
'returns required label endpoints'
do
...
...
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