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
3b1a8873
Commit
3b1a8873
authored
Jan 19, 2022
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply frontend reviewer suggestions
parent
4c458201
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
17 deletions
+22
-17
ee/app/assets/javascripts/boards/components/board_add_new_column.vue
...ts/javascripts/boards/components/board_add_new_column.vue
+12
-6
ee/app/assets/javascripts/iterations/utils.js
ee/app/assets/javascripts/iterations/utils.js
+1
-1
ee/spec/frontend/boards/components/board_add_new_column_spec.js
...c/frontend/boards/components/board_add_new_column_spec.js
+6
-6
ee/spec/frontend/sidebar/components/iteration_sidebar_dropdown_widget_spec.js
...ebar/components/iteration_sidebar_dropdown_widget_spec.js
+3
-4
No files found.
ee/app/assets/javascripts/boards/components/board_add_new_column.vue
View file @
3b1a8873
...
@@ -333,9 +333,12 @@ export default {
...
@@ -333,9 +333,12 @@ export default {
data-testid=
"new-column-iteration-item"
data-testid=
"new-column-iteration-item"
>
>
{{
iteration
.
period
}}
{{
iteration
.
period
}}
<div
v-if=
"getIterationTitle(iteration)"
data-testid=
"new-column-iteration-title"
>
<iteration-title
<iteration-title>
{{
getIterationTitle
(
iteration
)
}}
</iteration-title>
v-if=
"getIterationTitle(iteration)"
</div>
data-testid=
"new-column-iteration-title"
>
{{
getIterationTitle
(
iteration
)
}}
</iteration-title>
</gl-form-radio>
</gl-form-radio>
</gl-dropdown-text>
</gl-dropdown-text>
</div>
</div>
...
@@ -378,9 +381,12 @@ export default {
...
@@ -378,9 +381,12 @@ export default {
data-testid=
"new-column-iteration-item"
data-testid=
"new-column-iteration-item"
>
>
{{
getIterationPeriod
(
item
)
}}
{{
getIterationPeriod
(
item
)
}}
<div
v-if=
"getIterationTitle(item)"
data-testid=
"new-column-iteration-title"
>
<iteration-title
<iteration-title>
{{
getIterationTitle
(
item
)
}}
</iteration-title>
v-if=
"getIterationTitle(item)"
</div>
data-testid=
"new-column-iteration-title"
>
{{
getIterationTitle
(
item
)
}}
</iteration-title>
</div>
</div>
<div
v-else
class=
"gl-display-inline-block"
>
<div
v-else
class=
"gl-display-inline-block"
>
{{
item
.
title
}}
{{
item
.
title
}}
...
...
ee/app/assets/javascripts/iterations/utils.js
View file @
3b1a8873
...
@@ -14,7 +14,7 @@ export function getIterationPeriod({ startDate, dueDate }) {
...
@@ -14,7 +14,7 @@ export function getIterationPeriod({ startDate, dueDate }) {
}
}
export
function
getIterationTitle
(
iteration
)
{
export
function
getIterationTitle
(
iteration
)
{
return
iteration
?.
title
?
iteration
.
title
:
false
;
return
iteration
?.
title
;
}
}
/**
/**
...
...
ee/spec/frontend/boards/components/board_add_new_column_spec.js
View file @
3b1a8873
...
@@ -110,12 +110,12 @@ describe('BoardAddNewColumn', () => {
...
@@ -110,12 +110,12 @@ describe('BoardAddNewColumn', () => {
await
nextTick
();
await
nextTick
();
};
};
const
tes
tIterationWithTitle
=
()
=>
{
const
expec
tIterationWithTitle
=
()
=>
{
expect
(
findIterationItemAt
(
1
).
text
()).
toContain
(
getIterationPeriod
(
mockIterations
[
1
]));
expect
(
findIterationItemAt
(
1
).
text
()).
toContain
(
getIterationPeriod
(
mockIterations
[
1
]));
expect
(
findIterationItemAt
(
1
).
text
()).
toContain
(
mockIterations
[
1
].
title
);
expect
(
findIterationItemAt
(
1
).
text
()).
toContain
(
mockIterations
[
1
].
title
);
};
};
const
tes
tIterationWithoutTitle
=
()
=>
{
const
expec
tIterationWithoutTitle
=
()
=>
{
expect
(
findIterationItemAt
(
0
).
text
()).
toContain
(
getIterationPeriod
(
mockIterations
[
0
]));
expect
(
findIterationItemAt
(
0
).
text
()).
toContain
(
getIterationPeriod
(
mockIterations
[
0
]));
expect
(
findIterationItemAt
(
0
).
find
(
"
[data-testid='new-column-iteration-title']
"
).
exists
()).
toBe
(
expect
(
findIterationItemAt
(
0
).
find
(
"
[data-testid='new-column-iteration-title']
"
).
exists
()).
toBe
(
false
,
false
,
...
@@ -250,8 +250,8 @@ describe('BoardAddNewColumn', () => {
...
@@ -250,8 +250,8 @@ describe('BoardAddNewColumn', () => {
const
itemList
=
wrapper
.
findComponent
(
GlDropdown
).
findAllComponents
(
GlFormRadio
);
const
itemList
=
wrapper
.
findComponent
(
GlDropdown
).
findAllComponents
(
GlFormRadio
);
expect
(
itemList
).
toHaveLength
(
mockIterations
.
length
);
expect
(
itemList
).
toHaveLength
(
mockIterations
.
length
);
tes
tIterationWithoutTitle
();
expec
tIterationWithoutTitle
();
tes
tIterationWithTitle
();
expec
tIterationWithTitle
();
});
});
});
});
...
@@ -285,8 +285,8 @@ describe('BoardAddNewColumn', () => {
...
@@ -285,8 +285,8 @@ describe('BoardAddNewColumn', () => {
});
});
it
(
'
displays iteration period optionally with title
'
,
async
()
=>
{
it
(
'
displays iteration period optionally with title
'
,
async
()
=>
{
tes
tIterationWithoutTitle
();
expec
tIterationWithoutTitle
();
tes
tIterationWithTitle
();
expec
tIterationWithTitle
();
});
});
});
});
});
});
ee/spec/frontend/sidebar/components/iteration_sidebar_dropdown_widget_spec.js
View file @
3b1a8873
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
Vue
from
'
vue
'
;
import
IterationSidebarDropdownWidget
from
'
ee/sidebar/components/iteration_sidebar_dropdown_widget.vue
'
;
import
IterationSidebarDropdownWidget
from
'
ee/sidebar/components/iteration_sidebar_dropdown_widget.vue
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
...
@@ -18,7 +19,7 @@ import {
...
@@ -18,7 +19,7 @@ import {
}
from
'
../mock_data
'
;
}
from
'
../mock_data
'
;
import
{
waitForApollo
,
clickEdit
,
search
}
from
'
../helpers
'
;
import
{
waitForApollo
,
clickEdit
,
search
}
from
'
../helpers
'
;
const
localVue
=
createLocalVue
(
);
Vue
.
use
(
VueApollo
);
describe
(
'
IterationSidebarDropdownWidget
'
,
()
=>
{
describe
(
'
IterationSidebarDropdownWidget
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
@@ -33,7 +34,6 @@ describe('IterationSidebarDropdownWidget', () => {
...
@@ -33,7 +34,6 @@ describe('IterationSidebarDropdownWidget', () => {
iterationCadences
=
false
,
iterationCadences
=
false
,
currentIterationResponse
=
mockCurrentIterationResponse1
,
currentIterationResponse
=
mockCurrentIterationResponse1
,
}
=
{})
=>
{
}
=
{})
=>
{
localVue
.
use
(
VueApollo
);
mockApollo
=
createMockApollo
([
mockApollo
=
createMockApollo
([
[
groupIterationsQuery
,
jest
.
fn
().
mockResolvedValue
(
mockGroupIterationsResponse
)],
[
groupIterationsQuery
,
jest
.
fn
().
mockResolvedValue
(
mockGroupIterationsResponse
)],
[
projectIssueIterationQuery
,
jest
.
fn
().
mockResolvedValue
(
currentIterationResponse
)],
[
projectIssueIterationQuery
,
jest
.
fn
().
mockResolvedValue
(
currentIterationResponse
)],
...
@@ -41,7 +41,6 @@ describe('IterationSidebarDropdownWidget', () => {
...
@@ -41,7 +41,6 @@ describe('IterationSidebarDropdownWidget', () => {
wrapper
=
extendedWrapper
(
wrapper
=
extendedWrapper
(
mount
(
IterationSidebarDropdownWidget
,
{
mount
(
IterationSidebarDropdownWidget
,
{
localVue
,
provide
:
{
provide
:
{
glFeatures
:
{
iterationCadences
},
glFeatures
:
{
iterationCadences
},
issuableAttributesQueries
,
issuableAttributesQueries
,
...
...
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