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
3d34cea2
Commit
3d34cea2
authored
Mar 29, 2022
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up board code
Remove some js- classes and refactor tests accordingly
parent
698cdc74
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
65 additions
and
60 deletions
+65
-60
app/assets/javascripts/boards/components/board_card_inner.vue
...assets/javascripts/boards/components/board_card_inner.vue
+1
-1
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+1
-1
app/assets/javascripts/boards/components/board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+1
-1
app/assets/javascripts/boards/components/board_list_header.vue
...ssets/javascripts/boards/components/board_list_header.vue
+3
-2
app/assets/javascripts/boards/components/boards_selector.vue
app/assets/javascripts/boards/components/boards_selector.vue
+7
-6
app/assets/javascripts/boards/components/issue_time_estimate.vue
...ets/javascripts/boards/components/issue_time_estimate.vue
+1
-1
app/assets/javascripts/boards/components/item_count.vue
app/assets/javascripts/boards/components/item_count.vue
+1
-1
app/assets/javascripts/boards/components/toggle_focus.vue
app/assets/javascripts/boards/components/toggle_focus.vue
+1
-1
app/assets/stylesheets/page_bundles/boards.scss
app/assets/stylesheets/page_bundles/boards.scss
+1
-1
ee/app/assets/javascripts/boards/components/board_settings_wip_limit.vue
...avascripts/boards/components/board_settings_wip_limit.vue
+5
-3
ee/app/assets/javascripts/boards/components/issue_card_weight.vue
...ssets/javascripts/boards/components/issue_card_weight.vue
+1
-5
ee/spec/features/boards/boards_spec.rb
ee/spec/features/boards/boards_spec.rb
+7
-7
ee/spec/features/boards/group_boards/board_deletion_spec.rb
ee/spec/features/boards/group_boards/board_deletion_spec.rb
+3
-3
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
+1
-1
ee/spec/features/boards/scoped_issue_board_spec.rb
ee/spec/features/boards/scoped_issue_board_spec.rb
+3
-3
ee/spec/features/boards/sidebar_spec.rb
ee/spec/features/boards/sidebar_spec.rb
+1
-1
ee/spec/features/epic_boards/epic_boards_spec.rb
ee/spec/features/epic_boards/epic_boards_spec.rb
+1
-1
ee/spec/features/epic_boards/multiple_epic_boards_spec.rb
ee/spec/features/epic_boards/multiple_epic_boards_spec.rb
+1
-1
ee/spec/frontend/boards/components/board_settings_wip_limit_spec.js
...ontend/boards/components/board_settings_wip_limit_spec.js
+5
-5
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+1
-1
spec/features/boards/focus_mode_spec.rb
spec/features/boards/focus_mode_spec.rb
+1
-1
spec/features/boards/multi_select_spec.rb
spec/features/boards/multi_select_spec.rb
+3
-3
spec/frontend/boards/components/boards_selector_spec.js
spec/frontend/boards/components/boards_selector_spec.js
+3
-3
spec/frontend/boards/components/issue_time_estimate_spec.js
spec/frontend/boards/components/issue_time_estimate_spec.js
+5
-3
spec/frontend/boards/components/item_count_spec.js
spec/frontend/boards/components/item_count_spec.js
+3
-3
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
..._examples/boards/multiple_issue_boards_shared_examples.rb
+1
-1
No files found.
app/assets/javascripts/boards/components/board_card_inner.vue
View file @
3d34cea2
...
@@ -240,7 +240,7 @@ export default {
...
@@ -240,7 +240,7 @@ export default {
class=
"board-card-footer gl-display-flex gl-justify-content-space-between gl-align-items-flex-end"
class=
"board-card-footer gl-display-flex gl-justify-content-space-between gl-align-items-flex-end"
>
>
<div
<div
class=
"gl-display-flex align-items-start flex-wrap-reverse board-card-number-container gl-overflow-hidden
js-board-card-number-container
"
class=
"gl-display-flex align-items-start flex-wrap-reverse board-card-number-container gl-overflow-hidden"
>
>
<gl-loading-icon
v-if=
"item.isLoading"
size=
"md"
class=
"mt-3"
/>
<gl-loading-icon
v-if=
"item.isLoading"
size=
"md"
class=
"mt-3"
/>
<span
<span
...
...
app/assets/javascripts/boards/components/board_form.vue
View file @
3d34cea2
...
@@ -289,7 +289,7 @@ export default {
...
@@ -289,7 +289,7 @@ export default {
<p
v-if=
"isDeleteForm"
data-testid=
"delete-confirmation-message"
>
<p
v-if=
"isDeleteForm"
data-testid=
"delete-confirmation-message"
>
{{
$options
.
i18n
.
deleteConfirmationMessage
}}
{{
$options
.
i18n
.
deleteConfirmationMessage
}}
</p>
</p>
<form
v-else
class=
"js-board-config-modal"
data-testid=
"board-form-wrapper"
@
submit
.
prevent
>
<form
v-else
data-testid=
"board-form-wrapper"
@
submit
.
prevent
>
<div
v-if=
"!readonly"
class=
"gl-mb-5"
data-testid=
"board-form"
>
<div
v-if=
"!readonly"
class=
"gl-mb-5"
data-testid=
"board-form"
>
<label
class=
"gl-font-weight-bold gl-font-lg"
for=
"board-new-name"
>
<label
class=
"gl-font-weight-bold gl-font-lg"
for=
"board-new-name"
>
{{
$options
.
i18n
.
titleFieldLabel
}}
{{
$options
.
i18n
.
titleFieldLabel
}}
...
...
app/assets/javascripts/boards/components/board_list.vue
View file @
3d34cea2
...
@@ -287,7 +287,7 @@ export default {
...
@@ -287,7 +287,7 @@ export default {
:data-board-type=
"list.listType"
:data-board-type=
"list.listType"
:class=
"
{ 'bg-danger-100': boardItemsSizeExceedsMax }"
:class=
"
{ 'bg-danger-100': boardItemsSizeExceedsMax }"
draggable=".board-card"
draggable=".board-card"
class="board-list gl-w-full gl-h-full gl-list-style-none gl-mb-0 gl-p-2
js-board-list
"
class="board-list gl-w-full gl-h-full gl-list-style-none gl-mb-0 gl-p-2"
data-testid="tree-root-wrapper"
data-testid="tree-root-wrapper"
@start="handleDragOnStart"
@start="handleDragOnStart"
@end="handleDragOnEnd"
@end="handleDragOnEnd"
...
...
app/assets/javascripts/boards/components/board_list_header.vue
View file @
3d34cea2
...
@@ -262,7 +262,7 @@ export default {
...
@@ -262,7 +262,7 @@ export default {
'gl-py-2': list.collapsed
&&
isSwimlanesHeader,
'gl-py-2': list.collapsed
&&
isSwimlanesHeader,
'gl-flex-direction-column': list.collapsed,
'gl-flex-direction-column': list.collapsed,
}"
}"
class="board-title gl-m-0 gl-display-flex gl-align-items-center gl-font-base gl-px-3
js-board-handle
"
class="board-title gl-m-0 gl-display-flex gl-align-items-center gl-font-base gl-px-3"
>
>
<gl-button
<gl-button
v-gl-tooltip
.
hover
v-gl-tooltip
.
hover
...
@@ -443,9 +443,10 @@ export default {
...
@@ -443,9 +443,10 @@ export default {
ref=
"settingsBtn"
ref=
"settingsBtn"
v-gl-tooltip
.
hover
v-gl-tooltip
.
hover
:aria-label=
"$options.i18n.listSettings"
:aria-label=
"$options.i18n.listSettings"
class=
"no-drag
js-board-settings-button
"
class=
"no-drag"
:title=
"$options.i18n.listSettings"
:title=
"$options.i18n.listSettings"
icon=
"settings"
icon=
"settings"
data-testid=
"board-settings-button"
@
click=
"openSidebarSettings"
@
click=
"openSidebarSettings"
/>
/>
<gl-tooltip
:target=
"() => $refs.settingsBtn"
>
{{ $options.i18n.listSettings }}
</gl-tooltip>
<gl-tooltip
:target=
"() => $refs.settingsBtn"
>
{{ $options.i18n.listSettings }}
</gl-tooltip>
...
...
app/assets/javascripts/boards/components/boards_selector.vue
View file @
3d34cea2
...
@@ -239,11 +239,12 @@ export default {
...
@@ -239,11 +239,12 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"boards-switcher
js-boards-selector gl-mr-3
"
>
<div
class=
"boards-switcher
gl-mr-3"
data-testid=
"boards-selector
"
>
<span
class=
"boards-selector-wrapper
js-boards-selector-wrapper
"
>
<span
class=
"boards-selector-wrapper"
>
<gl-dropdown
<gl-dropdown
data-testid=
"boards-dropdown"
data-qa-selector=
"boards_dropdown"
data-qa-selector=
"boards_dropdown"
toggle-class=
"dropdown-menu-toggle
js-dropdown-toggle
"
toggle-class=
"dropdown-menu-toggle"
menu-class=
"flex-column dropdown-extended-height"
menu-class=
"flex-column dropdown-extended-height"
:loading=
"isBoardLoading"
:loading=
"isBoardLoading"
:text=
"board.name"
:text=
"board.name"
...
@@ -276,8 +277,8 @@ export default {
...
@@ -276,8 +277,8 @@ export default {
<gl-dropdown-item
<gl-dropdown-item
v-for=
"recentBoard in recentBoards"
v-for=
"recentBoard in recentBoards"
:key=
"`recent-$
{recentBoard.id}`"
:key=
"`recent-$
{recentBoard.id}`"
class="js-dropdown-item"
:href="`${boardBaseUrl}/${recentBoard.id}`"
:href="`${boardBaseUrl}/${recentBoard.id}`"
data-testid="dropdown-item"
>
>
{{
recentBoard
.
name
}}
{{
recentBoard
.
name
}}
</gl-dropdown-item>
</gl-dropdown-item>
...
@@ -292,8 +293,8 @@ export default {
...
@@ -292,8 +293,8 @@ export default {
<gl-dropdown-item
<gl-dropdown-item
v-for=
"otherBoard in filteredBoards"
v-for=
"otherBoard in filteredBoards"
:key=
"otherBoard.id"
:key=
"otherBoard.id"
class=
"js-dropdown-item"
:href=
"`${boardBaseUrl}/${otherBoard.id}`"
:href=
"`${boardBaseUrl}/${otherBoard.id}`"
data-testid=
"dropdown-item"
>
>
{{ otherBoard.name }}
{{ otherBoard.name }}
</gl-dropdown-item>
</gl-dropdown-item>
...
@@ -331,7 +332,7 @@ export default {
...
@@ -331,7 +332,7 @@ export default {
<gl-dropdown-item
<gl-dropdown-item
v-if=
"showDelete"
v-if=
"showDelete"
v-gl-modal-directive=
"'board-config-modal'"
v-gl-modal-directive=
"'board-config-modal'"
class=
"text-danger
js-delete-board
"
class=
"text-danger"
@
click.prevent=
"showPage('delete')"
@
click.prevent=
"showPage('delete')"
>
>
{{ s__('IssueBoards|Delete board') }}
{{ s__('IssueBoards|Delete board') }}
...
...
app/assets/javascripts/boards/components/issue_time_estimate.vue
View file @
3d34cea2
...
@@ -43,7 +43,7 @@ export default {
...
@@ -43,7 +43,7 @@ export default {
<gl-tooltip
<gl-tooltip
:target=
"() => $refs.issueTimeEstimate"
:target=
"() => $refs.issueTimeEstimate"
placement=
"bottom"
placement=
"bottom"
class=
"js-
issue-time-estimate"
data-testid=
"
issue-time-estimate"
>
>
<span
class=
"gl-font-weight-bold gl-display-block"
>
{{
$options
.
i18n
.
timeEstimate
}}
</span>
<span
class=
"gl-font-weight-bold gl-display-block"
>
{{
$options
.
i18n
.
timeEstimate
}}
</span>
{{
title
}}
{{
title
}}
...
...
app/assets/javascripts/boards/components/item_count.vue
View file @
3d34cea2
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
<span
:class=
"
{ 'text-danger': issuesExceedMax }" data-testid="board-items-count">
<span
:class=
"
{ 'text-danger': issuesExceedMax }" data-testid="board-items-count">
{{
itemsSize
}}
{{
itemsSize
}}
</span>
</span>
<span
v-if=
"isMaxLimitSet"
class=
"
js-
max-issue-size"
>
<span
v-if=
"isMaxLimitSet"
class=
"max-issue-size"
>
{{
maxIssueCount
}}
{{
maxIssueCount
}}
</span>
</span>
</div>
</div>
...
...
app/assets/javascripts/boards/components/toggle_focus.vue
View file @
3d34cea2
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
v-gl-tooltip
v-gl-tooltip
category=
"tertiary"
category=
"tertiary"
:icon=
"isFullscreen ? 'minimize' : 'maximize'"
:icon=
"isFullscreen ? 'minimize' : 'maximize'"
class=
"js-
focus-mode-btn"
data-testid=
"
focus-mode-btn"
data-qa-selector=
"focus_mode_button"
data-qa-selector=
"focus_mode_button"
:title=
"$options.i18n.toggleFocusMode"
:title=
"$options.i18n.toggleFocusMode"
:aria-label=
"$options.i18n.toggleFocusMode"
:aria-label=
"$options.i18n.toggleFocusMode"
...
...
app/assets/stylesheets/page_bundles/boards.scss
View file @
3d34cea2
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
border-bottom
:
1px
solid
var
(
--
gray-100
,
$gray-100
);
border-bottom
:
1px
solid
var
(
--
gray-100
,
$gray-100
);
height
:
3rem
;
height
:
3rem
;
.
js-
max-issue-size
:
:
before
{
.
max-issue-size
:
:
before
{
content
:
'/'
;
content
:
'/'
;
}
}
}
}
...
...
ee/app/assets/javascripts/boards/components/board_settings_wip_limit.vue
View file @
3d34cea2
...
@@ -107,8 +107,9 @@ export default {
...
@@ -107,8 +107,9 @@ export default {
<div
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center gl-mb-2"
>
<div
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center gl-mb-2"
>
<label
class=
"m-0"
>
{{
$options
.
i18n
.
wipLimitText
}}
</label>
<label
class=
"m-0"
>
{{
$options
.
i18n
.
wipLimitText
}}
</label>
<gl-button
<gl-button
class=
"
js-edit-button
gl-h-full gl-border-0 text-dark"
class=
"gl-h-full gl-border-0 text-dark"
variant=
"link"
variant=
"link"
data-testid=
"edit-button"
@
click=
"showInput"
@
click=
"showInput"
>
{{
$options
.
i18n
.
editLinkText
}}
</gl-button
>
{{
$options
.
i18n
.
editLinkText
}}
</gl-button
>
>
...
@@ -128,12 +129,13 @@ export default {
...
@@ -128,12 +129,13 @@ export default {
@
blur=
"offFocus"
@
blur=
"offFocus"
/>
/>
<div
v-else
class=
"gl-display-flex gl-align-items-center"
>
<div
v-else
class=
"gl-display-flex gl-align-items-center"
>
<p
class=
"
js-wip-limit bold gl-m-0 text-secondary
"
>
{{
activeListWipLimit
}}
</p>
<p
class=
"
bold gl-m-0 text-secondary"
data-testid=
"wip-limit
"
>
{{
activeListWipLimit
}}
</p>
<template
v-if=
"wipLimitIsSet"
>
<template
v-if=
"wipLimitIsSet"
>
<span
class=
"m-1"
>
-
</span>
<span
class=
"m-1"
>
-
</span>
<gl-button
<gl-button
class=
"
js-remove-limit
gl-h-full gl-border-0 text-secondary"
class=
"gl-h-full gl-border-0 text-secondary"
variant=
"link"
variant=
"link"
data-testid=
"remove-limit"
@
click=
"clearWipLimit"
@
click=
"clearWipLimit"
>
{{
$options
.
i18n
.
removeLimitText
}}
</gl-button
>
{{
$options
.
i18n
.
removeLimitText
}}
</gl-button
>
>
...
...
ee/app/assets/javascripts/boards/components/issue_card_weight.vue
View file @
3d34cea2
...
@@ -30,11 +30,7 @@ export default {
...
@@ -30,11 +30,7 @@ export default {
>
>
<gl-icon
name=
"weight"
class=
"board-card-info-icon gl-mr-2"
/>
<gl-icon
name=
"weight"
class=
"board-card-info-icon gl-mr-2"
/>
<span
data-testid=
"board-card-weight"
class=
"board-card-info-text"
>
{{
weight
}}
</span>
<span
data-testid=
"board-card-weight"
class=
"board-card-info-text"
>
{{
weight
}}
</span>
<gl-tooltip
<gl-tooltip
:target=
"() => $refs.itemWeight"
placement=
"bottom"
container=
"body"
:target=
"() => $refs.itemWeight"
placement=
"bottom"
container=
"body"
class=
"js-item-weight"
>
{{
__
(
'
Weight
'
)
}}
<br
/><span
class=
"text-tertiary"
>
{{
weight
}}
</span>
>
{{
__
(
'
Weight
'
)
}}
<br
/><span
class=
"text-tertiary"
>
{{
weight
}}
</span>
</gl-tooltip>
</gl-tooltip>
</component>
</component>
...
...
ee/spec/features/boards/boards_spec.rb
View file @
3d34cea2
...
@@ -147,7 +147,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -147,7 +147,7 @@ RSpec.describe 'Project issue boards', :js do
it
'displays issue and max issue size'
do
it
'displays issue and max issue size'
do
page
.
within
(
find
(
".board:nth-child(2)"
))
do
page
.
within
(
find
(
".board:nth-child(2)"
))
do
expect
(
page
.
find
(
'[data-testid="board-items-count"]'
)).
to
have_text
(
total_development_issues
)
expect
(
page
.
find
(
'[data-testid="board-items-count"]'
)).
to
have_text
(
total_development_issues
)
expect
(
page
.
find
(
'.
js-
max-issue-size'
)).
to
have_text
(
max_issue_count
)
expect
(
page
.
find
(
'.max-issue-size'
)).
to
have_text
(
max_issue_count
)
end
end
end
end
end
end
...
@@ -207,11 +207,11 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -207,11 +207,11 @@ RSpec.describe 'Project issue boards', :js do
end
end
it
"sets max issue count to zero"
do
it
"sets max issue count to zero"
do
page
.
find
(
'
.js-remove-limit
'
).
click
page
.
find
(
'
[data-testid="remove-limit"]
'
).
click
wait_for_requests
wait_for_requests
expect
(
page
.
find
(
'
.js-wip-limit
'
)).
to
have_text
(
"None"
)
expect
(
page
.
find
(
'
[data-testid="wip-limit"]
'
)).
to
have_text
(
"None"
)
end
end
end
end
...
@@ -235,7 +235,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -235,7 +235,7 @@ RSpec.describe 'Project issue boards', :js do
click_button
(
'List settings'
)
click_button
(
'List settings'
)
end
end
expect
(
page
.
find
(
'
.js-wip-limit
'
)).
to
have_text
(
max_issue_count
)
expect
(
page
.
find
(
'
[data-testid="wip-limit"]
'
)).
to
have_text
(
max_issue_count
)
end
end
end
end
...
@@ -253,7 +253,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -253,7 +253,7 @@ RSpec.describe 'Project issue boards', :js do
wait_for_requests
wait_for_requests
expect
(
page
.
find
(
'
.js-wip-limit
'
)).
to
have_text
(
max_issue_count
)
expect
(
page
.
find
(
'
[data-testid="wip-limit"]
'
)).
to
have_text
(
max_issue_count
)
end
end
context
"When user sets max issue count to 0"
do
context
"When user sets max issue count to 0"
do
...
@@ -270,7 +270,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -270,7 +270,7 @@ RSpec.describe 'Project issue boards', :js do
wait_for_requests
wait_for_requests
expect
(
page
.
find
(
'
.js-wip-limit
'
)).
to
have_text
(
"None"
)
expect
(
page
.
find
(
'
[data-testid="wip-limit"]
'
)).
to
have_text
(
"None"
)
end
end
end
end
end
end
...
@@ -285,7 +285,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -285,7 +285,7 @@ RSpec.describe 'Project issue boards', :js do
wait_for_requests
wait_for_requests
expect
(
page
.
find
(
'
.js-wip-limit
'
)).
to
have_text
(
1
)
expect
(
page
.
find
(
'
[data-testid="wip-limit"]
'
)).
to
have_text
(
1
)
end
end
end
end
end
end
...
...
ee/spec/features/boards/group_boards/board_deletion_spec.rb
View file @
3d34cea2
...
@@ -20,18 +20,18 @@ RSpec.describe 'Group Boards', :js do
...
@@ -20,18 +20,18 @@ RSpec.describe 'Group Boards', :js do
wait_for_requests
wait_for_requests
find
(
:css
,
'.js-delete-board button'
).
click
click_button
_
(
'Delete board'
)
find
(
:css
,
'.board-config-modal .js-modal-action-primary'
).
click
find
(
:css
,
'.board-config-modal .js-modal-action-primary'
).
click
click_boards_dropdown
click_boards_dropdown
page
.
within
(
'
.js-boards-selector
'
)
do
page
.
within
(
'
[data-testid="boards-selector"]
'
)
do
expect
(
page
).
not_to
have_content
(
board_dev
.
name
)
expect
(
page
).
not_to
have_content
(
board_dev
.
name
)
expect
(
page
).
to
have_content
(
board_ux
.
name
)
expect
(
page
).
to
have_content
(
board_ux
.
name
)
end
end
end
end
def
click_boards_dropdown
def
click_boards_dropdown
find
(
:css
,
'.js-dropdown-toggle
'
).
click
find
(
'[data-testid="boards-dropdown"]
'
).
click
end
end
end
end
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
View file @
3d34cea2
...
@@ -27,7 +27,7 @@ RSpec.describe 'Multiple Issue Boards', :js do
...
@@ -27,7 +27,7 @@ RSpec.describe 'Multiple Issue Boards', :js do
click_button
board
.
name
click_button
board
.
name
page
.
within
(
'
.js-boards-selector
.dropdown-menu'
)
do
page
.
within
(
'
[data-testid="boards-selector"]
.dropdown-menu'
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
...
...
ee/spec/features/boards/scoped_issue_board_spec.rb
View file @
3d34cea2
...
@@ -112,7 +112,7 @@ RSpec.describe 'Scoped issue boards', :js do
...
@@ -112,7 +112,7 @@ RSpec.describe 'Scoped issue boards', :js do
visit
group_boards_path
(
group
)
visit
group_boards_path
(
group
)
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_
css
(
'.js-boards-selector
'
)
expect
(
page
).
to
have_
selector
(
'[data-testid="boards-selector"]
'
)
click_on_create_new_board
click_on_create_new_board
click_button
'Expand'
click_button
'Expand'
...
@@ -572,7 +572,7 @@ RSpec.describe 'Scoped issue boards', :js do
...
@@ -572,7 +572,7 @@ RSpec.describe 'Scoped issue boards', :js do
it
"doesn't show the input when creating a board"
do
it
"doesn't show the input when creating a board"
do
click_on_create_new_board
click_on_create_new_board
page
.
within
'
.js-board-config-modal
'
do
page
.
within
'
[data-testid="board-form-wrapper"]
'
do
# To make sure the form is shown
# To make sure the form is shown
expect
(
page
).
to
have_field
(
'board-new-name'
)
expect
(
page
).
to
have_field
(
'board-new-name'
)
...
@@ -681,7 +681,7 @@ RSpec.describe 'Scoped issue boards', :js do
...
@@ -681,7 +681,7 @@ RSpec.describe 'Scoped issue boards', :js do
end
end
def
click_on_create_new_board
def
click_on_create_new_board
page
.
within
'
.js-boards-selector
'
do
page
.
within
'
[data-testid="boards-selector"]
'
do
find
(
'.dropdown-menu-toggle'
).
click
find
(
'.dropdown-menu-toggle'
).
click
wait_for_requests
wait_for_requests
...
...
ee/spec/features/boards/sidebar_spec.rb
View file @
3d34cea2
...
@@ -377,7 +377,7 @@ RSpec.describe 'Issue Boards', :js do
...
@@ -377,7 +377,7 @@ RSpec.describe 'Issue Boards', :js do
end
end
context
'when opening sidebars'
do
context
'when opening sidebars'
do
let
(
:settings_button
)
{
find
(
'
.js-board-settings-button
'
)
}
let
(
:settings_button
)
{
find
(
'
[data-testid="board-settings-button"]
'
)
}
it
'closes card sidebar when opening settings sidebar'
do
it
'closes card sidebar when opening settings sidebar'
do
click_card
(
card1
)
click_card
(
card1
)
...
...
ee/spec/features/epic_boards/epic_boards_spec.rb
View file @
3d34cea2
...
@@ -363,7 +363,7 @@ RSpec.describe 'epic boards', :js do
...
@@ -363,7 +363,7 @@ RSpec.describe 'epic boards', :js do
end
end
def
click_on_create_new_board
def
click_on_create_new_board
page
.
within
'
.js-boards-selector
'
do
page
.
within
'
[data-testid="boards-selector"]
'
do
find
(
'.dropdown-menu-toggle'
).
click
find
(
'.dropdown-menu-toggle'
).
click
wait_for_requests
wait_for_requests
...
...
ee/spec/features/epic_boards/multiple_epic_boards_spec.rb
View file @
3d34cea2
...
@@ -87,7 +87,7 @@ RSpec.describe 'epic boards', :js do
...
@@ -87,7 +87,7 @@ RSpec.describe 'epic boards', :js do
wait_for_requests
wait_for_requests
dropdown_selector
=
'
.js-boards-selector
.dropdown-menu'
dropdown_selector
=
'
[data-testid="boards-selector"]
.dropdown-menu'
page
.
within
(
dropdown_selector
)
do
page
.
within
(
dropdown_selector
)
do
yield
yield
end
end
...
...
ee/spec/frontend/boards/components/board_settings_wip_limit_spec.js
View file @
3d34cea2
import
{
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
noop
}
from
'
lodash
'
;
import
{
noop
}
from
'
lodash
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
BoardSettingsWipLimit
from
'
ee_component/boards/components/board_settings_wip_limit.vue
'
;
import
BoardSettingsWipLimit
from
'
ee_component/boards/components/board_settings_wip_limit.vue
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
{
mockLabelList
}
from
'
jest/boards/mock_data
'
;
import
{
mockLabelList
}
from
'
jest/boards/mock_data
'
;
...
@@ -15,9 +15,9 @@ describe('BoardSettingsWipLimit', () => {
...
@@ -15,9 +15,9 @@ describe('BoardSettingsWipLimit', () => {
const
listId
=
mockLabelList
.
id
;
const
listId
=
mockLabelList
.
id
;
const
currentWipLimit
=
1
;
// Needs to be other than null to trigger requests
const
currentWipLimit
=
1
;
// Needs to be other than null to trigger requests
const
clickEdit
=
()
=>
wrapper
.
find
(
'
.js-
edit-button
'
).
vm
.
$emit
(
'
click
'
);
const
clickEdit
=
()
=>
wrapper
.
find
ByTestId
(
'
edit-button
'
).
vm
.
$emit
(
'
click
'
);
const
findRemoveWipLimit
=
()
=>
wrapper
.
find
(
'
.js-
remove-limit
'
);
const
findRemoveWipLimit
=
()
=>
wrapper
.
find
ByTestId
(
'
remove-limit
'
);
const
findWipLimit
=
()
=>
wrapper
.
find
(
'
.js-
wip-limit
'
);
const
findWipLimit
=
()
=>
wrapper
.
find
ByTestId
(
'
wip-limit
'
);
const
findInput
=
()
=>
wrapper
.
findComponent
(
GlFormInput
);
const
findInput
=
()
=>
wrapper
.
findComponent
(
GlFormInput
);
const
createComponent
=
({
const
createComponent
=
({
...
@@ -33,7 +33,7 @@ describe('BoardSettingsWipLimit', () => {
...
@@ -33,7 +33,7 @@ describe('BoardSettingsWipLimit', () => {
actions
:
storeActions
,
actions
:
storeActions
,
});
});
wrapper
=
shallowMount
(
BoardSettingsWipLimit
,
{
wrapper
=
shallowMount
Extended
(
BoardSettingsWipLimit
,
{
propsData
:
props
,
propsData
:
props
,
store
,
store
,
data
()
{
data
()
{
...
...
locale/gitlab.pot
View file @
3d34cea2
...
@@ -11936,6 +11936,9 @@ msgstr ""
...
@@ -11936,6 +11936,9 @@ msgstr ""
msgid "Delete badge"
msgid "Delete badge"
msgstr ""
msgstr ""
msgid "Delete board"
msgstr ""
msgid "Delete column"
msgid "Delete column"
msgstr ""
msgstr ""
...
...
spec/features/boards/boards_spec.rb
View file @
3d34cea2
...
@@ -282,7 +282,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -282,7 +282,7 @@ RSpec.describe 'Project issue boards', :js do
it
'shows issue count on the list'
do
it
'shows issue count on the list'
do
page
.
within
(
find
(
".board:nth-child(2)"
))
do
page
.
within
(
find
(
".board:nth-child(2)"
))
do
expect
(
page
.
find
(
'[data-testid="board-items-count"]'
)).
to
have_text
(
total_planning_issues
)
expect
(
page
.
find
(
'[data-testid="board-items-count"]'
)).
to
have_text
(
total_planning_issues
)
expect
(
page
).
not_to
have_selector
(
'.
js-
max-issue-size'
)
expect
(
page
).
not_to
have_selector
(
'.max-issue-size'
)
end
end
end
end
end
end
...
...
spec/features/boards/focus_mode_spec.rb
View file @
3d34cea2
...
@@ -12,6 +12,6 @@ RSpec.describe 'Issue Boards focus mode', :js do
...
@@ -12,6 +12,6 @@ RSpec.describe 'Issue Boards focus mode', :js do
end
end
it
'shows focus mode button to anonymous users'
do
it
'shows focus mode button to anonymous users'
do
expect
(
page
).
to
have_selector
(
'
.js-focus-mode-btn
'
)
expect
(
page
).
to
have_selector
(
'
[data-testid="focus-mode-btn"]
'
)
end
end
end
end
spec/features/boards/multi_select_spec.rb
View file @
3d34cea2
...
@@ -72,7 +72,7 @@ RSpec.describe 'Multi Select Issue', :js do
...
@@ -72,7 +72,7 @@ RSpec.describe 'Multi Select Issue', :js do
wait_for_requests
wait_for_requests
page
.
within
(
all
(
'.
js-
board-list'
)[
2
])
do
page
.
within
(
all
(
'.board-list'
)[
2
])
do
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
end
end
...
@@ -87,7 +87,7 @@ RSpec.describe 'Multi Select Issue', :js do
...
@@ -87,7 +87,7 @@ RSpec.describe 'Multi Select Issue', :js do
wait_for_requests
wait_for_requests
page
.
within
(
all
(
'.
js-
board-list'
)[
2
])
do
page
.
within
(
all
(
'.board-list'
)[
2
])
do
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
expect
(
find
(
'.board-card:nth-child(3)'
)).
to
have_content
(
issue3
.
title
)
expect
(
find
(
'.board-card:nth-child(3)'
)).
to
have_content
(
issue3
.
title
)
...
@@ -102,7 +102,7 @@ RSpec.describe 'Multi Select Issue', :js do
...
@@ -102,7 +102,7 @@ RSpec.describe 'Multi Select Issue', :js do
wait_for_requests
wait_for_requests
page
.
within
(
all
(
'.
js-
board-list'
)[
1
])
do
page
.
within
(
all
(
'.board-list'
)[
1
])
do
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(1)'
)).
to
have_content
(
issue1
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
expect
(
find
(
'.board-card:nth-child(2)'
)).
to
have_content
(
issue2
.
title
)
expect
(
find
(
'.board-card:nth-child(3)'
)).
to
have_content
(
issue5
.
title
)
expect
(
find
(
'.board-card:nth-child(3)'
)).
to
have_content
(
issue5
.
title
)
...
...
spec/frontend/boards/components/boards_selector_spec.js
View file @
3d34cea2
import
{
GlDropdown
,
GlLoadingIcon
,
GlDropdownSectionHeader
}
from
'
@gitlab/ui
'
;
import
{
GlDropdown
,
GlLoadingIcon
,
GlDropdownSectionHeader
}
from
'
@gitlab/ui
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
...
@@ -14,6 +13,7 @@ import groupRecentBoardsQuery from '~/boards/graphql/group_recent_boards.query.g
...
@@ -14,6 +13,7 @@ import groupRecentBoardsQuery from '~/boards/graphql/group_recent_boards.query.g
import
projectRecentBoardsQuery
from
'
~/boards/graphql/project_recent_boards.query.graphql
'
;
import
projectRecentBoardsQuery
from
'
~/boards/graphql/project_recent_boards.query.graphql
'
;
import
defaultStore
from
'
~/boards/stores
'
;
import
defaultStore
from
'
~/boards/stores
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
{
mountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
import
{
mockGroupBoardResponse
,
mockGroupBoardResponse
,
mockProjectBoardResponse
,
mockProjectBoardResponse
,
...
@@ -60,7 +60,7 @@ describe('BoardsSelector', () => {
...
@@ -60,7 +60,7 @@ describe('BoardsSelector', () => {
searchBoxInput
.
trigger
(
'
input
'
);
searchBoxInput
.
trigger
(
'
input
'
);
};
};
const
getDropdownItems
=
()
=>
wrapper
.
findAll
(
'
.js-
dropdown-item
'
);
const
getDropdownItems
=
()
=>
wrapper
.
findAll
ByTestId
(
'
dropdown-item
'
);
const
getDropdownHeaders
=
()
=>
wrapper
.
findAllComponents
(
GlDropdownSectionHeader
);
const
getDropdownHeaders
=
()
=>
wrapper
.
findAllComponents
(
GlDropdownSectionHeader
);
const
getLoadingIcon
=
()
=>
wrapper
.
findComponent
(
GlLoadingIcon
);
const
getLoadingIcon
=
()
=>
wrapper
.
findComponent
(
GlLoadingIcon
);
const
findDropdown
=
()
=>
wrapper
.
findComponent
(
GlDropdown
);
const
findDropdown
=
()
=>
wrapper
.
findComponent
(
GlDropdown
);
...
@@ -100,7 +100,7 @@ describe('BoardsSelector', () => {
...
@@ -100,7 +100,7 @@ describe('BoardsSelector', () => {
[
groupRecentBoardsQuery
,
groupRecentBoardsQueryHandlerSuccess
],
[
groupRecentBoardsQuery
,
groupRecentBoardsQueryHandlerSuccess
],
]);
]);
wrapper
=
mount
(
BoardsSelector
,
{
wrapper
=
mount
Extended
(
BoardsSelector
,
{
store
,
store
,
apolloProvider
:
fakeApollo
,
apolloProvider
:
fakeApollo
,
propsData
:
{
propsData
:
{
...
...
spec/frontend/boards/components/issue_time_estimate_spec.js
View file @
3d34cea2
...
@@ -5,6 +5,8 @@ import IssueTimeEstimate from '~/boards/components/issue_time_estimate.vue';
...
@@ -5,6 +5,8 @@ import IssueTimeEstimate from '~/boards/components/issue_time_estimate.vue';
describe
(
'
Issue Time Estimate component
'
,
()
=>
{
describe
(
'
Issue Time Estimate component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
findIssueTimeEstimate
=
()
=>
wrapper
.
find
(
'
[data-testid="issue-time-estimate"]
'
);
afterEach
(()
=>
{
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
.
destroy
();
});
});
...
@@ -26,7 +28,7 @@ describe('Issue Time Estimate component', () => {
...
@@ -26,7 +28,7 @@ describe('Issue Time Estimate component', () => {
});
});
it
(
'
renders expanded time estimate in tooltip
'
,
()
=>
{
it
(
'
renders expanded time estimate in tooltip
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.js-issue-time-estimate
'
).
text
()).
toContain
(
'
2 weeks 3 days 1 minute
'
);
expect
(
findIssueTimeEstimate
(
).
text
()).
toContain
(
'
2 weeks 3 days 1 minute
'
);
});
});
it
(
'
prevents tooltip xss
'
,
async
()
=>
{
it
(
'
prevents tooltip xss
'
,
async
()
=>
{
...
@@ -42,7 +44,7 @@ describe('Issue Time Estimate component', () => {
...
@@ -42,7 +44,7 @@ describe('Issue Time Estimate component', () => {
expect
(
alertSpy
).
not
.
toHaveBeenCalled
();
expect
(
alertSpy
).
not
.
toHaveBeenCalled
();
expect
(
wrapper
.
find
(
'
time
'
).
text
().
trim
()).
toEqual
(
'
0m
'
);
expect
(
wrapper
.
find
(
'
time
'
).
text
().
trim
()).
toEqual
(
'
0m
'
);
expect
(
wrapper
.
find
(
'
.js-issue-time-estimate
'
).
text
()).
toContain
(
'
0m
'
);
expect
(
findIssueTimeEstimate
(
).
text
()).
toContain
(
'
0m
'
);
});
});
});
});
...
@@ -63,7 +65,7 @@ describe('Issue Time Estimate component', () => {
...
@@ -63,7 +65,7 @@ describe('Issue Time Estimate component', () => {
});
});
it
(
'
renders expanded time estimate in tooltip
'
,
()
=>
{
it
(
'
renders expanded time estimate in tooltip
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.js-issue-time-estimate
'
).
text
()).
toContain
(
'
104 hours 1 minute
'
);
expect
(
findIssueTimeEstimate
(
).
text
()).
toContain
(
'
104 hours 1 minute
'
);
});
});
});
});
});
});
spec/frontend/boards/components/item_count_spec.js
View file @
3d34cea2
...
@@ -29,7 +29,7 @@ describe('IssueCount', () => {
...
@@ -29,7 +29,7 @@ describe('IssueCount', () => {
});
});
it
(
'
does not contains maxIssueCount in the template
'
,
()
=>
{
it
(
'
does not contains maxIssueCount in the template
'
,
()
=>
{
expect
(
vm
.
find
(
'
.
js-
max-issue-size
'
).
exists
()).
toBe
(
false
);
expect
(
vm
.
find
(
'
.max-issue-size
'
).
exists
()).
toBe
(
false
);
});
});
});
});
...
@@ -50,7 +50,7 @@ describe('IssueCount', () => {
...
@@ -50,7 +50,7 @@ describe('IssueCount', () => {
});
});
it
(
'
contains maxIssueCount in the template
'
,
()
=>
{
it
(
'
contains maxIssueCount in the template
'
,
()
=>
{
expect
(
vm
.
find
(
'
.
js-
max-issue-size
'
).
text
()).
toEqual
(
String
(
maxIssueCount
));
expect
(
vm
.
find
(
'
.max-issue-size
'
).
text
()).
toEqual
(
String
(
maxIssueCount
));
});
});
it
(
'
does not have text-danger class when issueSize is less than maxIssueCount
'
,
()
=>
{
it
(
'
does not have text-danger class when issueSize is less than maxIssueCount
'
,
()
=>
{
...
@@ -75,7 +75,7 @@ describe('IssueCount', () => {
...
@@ -75,7 +75,7 @@ describe('IssueCount', () => {
});
});
it
(
'
contains maxIssueCount in the template
'
,
()
=>
{
it
(
'
contains maxIssueCount in the template
'
,
()
=>
{
expect
(
vm
.
find
(
'
.
js-
max-issue-size
'
).
text
()).
toEqual
(
String
(
maxIssueCount
));
expect
(
vm
.
find
(
'
.max-issue-size
'
).
text
()).
toEqual
(
String
(
maxIssueCount
));
});
});
it
(
'
has text-danger class
'
,
()
=>
{
it
(
'
has text-danger class
'
,
()
=>
{
...
...
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
View file @
3d34cea2
...
@@ -138,7 +138,7 @@ RSpec.shared_examples 'multiple issue boards' do
...
@@ -138,7 +138,7 @@ RSpec.shared_examples 'multiple issue boards' do
wait_for_requests
wait_for_requests
dropdown_selector
=
'
.js-boards-selector
.dropdown-menu'
dropdown_selector
=
'
[data-testid="boards-selector"]
.dropdown-menu'
page
.
within
(
dropdown_selector
)
do
page
.
within
(
dropdown_selector
)
do
yield
yield
end
end
...
...
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