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
43e8d7dc
Commit
43e8d7dc
authored
Apr 13, 2022
by
Sarah Yasonik
Committed by
Olena Horal-Koretska
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tooltip and truncation on incident list
Changelog: fixed
parent
e9f85a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
app/assets/javascripts/incidents/components/incidents_list.vue
...ssets/javascripts/incidents/components/incidents_list.vue
+10
-5
spec/frontend/incidents/components/incidents_list_spec.js
spec/frontend/incidents/components/incidents_list_spec.js
+9
-9
No files found.
app/assets/javascripts/incidents/components/incidents_list.vue
View file @
43e8d7dc
...
@@ -392,19 +392,24 @@ export default {
...
@@ -392,19 +392,24 @@ export default {
</
template
>
</
template
>
<
template
#cell(title)=
"{ item }"
>
<
template
#cell(title)=
"{ item }"
>
<div
:class=
"
{ 'gl-display-flex gl-align-items-center': item.state === 'closed' }">
<div
:class=
"
{
'gl-display-flex gl-align-items-center gl-max-w-full': item.state === 'closed',
}"
>
<gl-link
<gl-link
v-gl-tooltip
:title=
"item.title"
data-testid=
"incident-link"
data-testid=
"incident-link"
:href=
"showIncidentLink(item)"
:href=
"showIncidentLink(item)"
class=
"gl-min-w-0"
>
>
{{
item
.
title
}}
<tooltip-on-truncate
:title=
"item.title"
class=
"gl-text-truncate gl-display-block"
>
{{
item
.
title
}}
</tooltip-on-truncate>
</gl-link>
</gl-link>
<gl-icon
<gl-icon
v-if=
"item.state === 'closed'"
v-if=
"item.state === 'closed'"
name=
"issue-close"
name=
"issue-close"
class=
"gl-m
x-1
gl-fill-blue-500 gl-flex-shrink-0"
class=
"gl-m
l-2
gl-fill-blue-500 gl-flex-shrink-0"
:size=
"16"
:size=
"16"
data-testid=
"incident-closed"
data-testid=
"incident-closed"
/>
/>
...
...
spec/frontend/incidents/components/incidents_list_spec.js
View file @
43e8d7dc
...
@@ -171,6 +171,7 @@ describe('Incidents List', () => {
...
@@ -171,6 +171,7 @@ describe('Incidents List', () => {
expect
(
link
.
text
()).
toBe
(
title
);
expect
(
link
.
text
()).
toBe
(
title
);
expect
(
link
.
attributes
(
'
href
'
)).
toContain
(
`issues/incident/
${
iid
}
`
);
expect
(
link
.
attributes
(
'
href
'
)).
toContain
(
`issues/incident/
${
iid
}
`
);
expect
(
link
.
find
(
'
.gl-text-truncate
'
).
exists
()).
toBe
(
true
);
});
});
describe
(
'
Assignees
'
,
()
=>
{
describe
(
'
Assignees
'
,
()
=>
{
...
@@ -201,15 +202,14 @@ describe('Incidents List', () => {
...
@@ -201,15 +202,14 @@ describe('Incidents List', () => {
describe
(
'
Escalation status
'
,
()
=>
{
describe
(
'
Escalation status
'
,
()
=>
{
it
(
'
renders escalation status per row
'
,
()
=>
{
it
(
'
renders escalation status per row
'
,
()
=>
{
expect
(
findEscalationStatus
().
length
).
toBe
(
mockIncidents
.
length
);
const
statuses
=
findEscalationStatus
().
wrappers
;
const
expectedStatuses
=
[
'
Triggered
'
,
'
Acknowledged
'
,
'
Resolved
'
,
I18N
.
noEscalationStatus
];
const
actualStatuses
=
findEscalationStatus
().
wrappers
.
map
((
status
)
=>
status
.
text
());
expect
(
actualStatuses
).
toEqual
([
expect
(
statuses
.
length
).
toBe
(
mockIncidents
.
length
);
'
Triggered
'
,
statuses
.
forEach
((
status
,
index
)
=>
{
'
Acknowledged
'
,
expect
(
status
.
text
()).
toEqual
(
expectedStatuses
[
index
]);
'
Resolved
'
,
expect
(
status
.
classes
(
'
gl-text-truncate
'
)).
toBe
(
true
);
I18N
.
noEscalationStatus
,
});
]);
});
});
describe
(
'
when feature is disabled
'
,
()
=>
{
describe
(
'
when feature is disabled
'
,
()
=>
{
...
...
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