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
06ad62cd
Commit
06ad62cd
authored
Apr 01, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Health Status code
Make changes as a result of reviewer comments
parent
fe2ef898
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
doc/user/project/issues/img/issue_health_status_v12_9.png
doc/user/project/issues/img/issue_health_status_v12_9.png
+0
-0
ee/app/assets/javascripts/sidebar/components/status/status.vue
...p/assets/javascripts/sidebar/components/status/status.vue
+5
-5
ee/spec/frontend/sidebar/components/status/sidebar_status_spec.js
...frontend/sidebar/components/status/sidebar_status_spec.js
+7
-4
ee/spec/frontend/sidebar/components/status/status_spec.js
ee/spec/frontend/sidebar/components/status/status_spec.js
+3
-3
No files found.
doc/user/project/issues/img/issue_health_status_v12_9.png
0 → 100644
View file @
06ad62cd
10.3 KB
ee/app/assets/javascripts/sidebar/components/status/status.vue
View file @
06ad62cd
...
...
@@ -145,20 +145,20 @@ export default {
</div>
<gl-loading-icon
v-if=
"isFetching"
:inline=
"true"
/>
<p
v-else
class=
"value m-0"
:class=
"
{ 'no-value': !status }">
<p
v-else
class=
"value
d-flex align-items-center
m-0"
:class=
"
{ 'no-value': !status }">
<gl-icon
v-if=
"status"
name=
"severity-low"
:size=
"14"
class=
"align-bottom
mr-2
"
class=
"align-bottom
append-right-10
"
:class=
"statusColor"
/>
{{
statusText
}}
<template
v-if=
"canRemoveStatus"
>
<span
class=
"text-secondary"
aria-hidden=
"true"
>
-
</span>
<
button
class=
"btn-link
text-secondary"
@
click=
"removeStatus"
>
<span
class=
"text-secondary
mx-1
"
aria-hidden=
"true"
>
-
</span>
<
gl-button
variant=
"link"
class=
"
text-secondary"
@
click=
"removeStatus"
>
{{
__
(
'
remove status
'
)
}}
</button>
</
gl-
button>
</
template
>
</p>
</div>
...
...
ee/spec/frontend/sidebar/components/status/sidebar_status_spec.js
View file @
06ad62cd
...
...
@@ -59,9 +59,12 @@ describe('SidebarStatus', () => {
status
:
'
onTrack
'
,
},
updateStatus
(
status
)
{
const
newMediator
=
{
...
this
};
newMediator
.
store
.
status
=
status
;
wrapper
.
setProps
({
mediator
:
newMediator
});
this
.
store
.
status
=
status
;
wrapper
.
setProps
({
mediator
:
{
...
this
,
},
});
return
Promise
.
resolve
();
},
};
...
...
@@ -77,7 +80,7 @@ describe('SidebarStatus', () => {
wrapper
.
find
(
'
button.btn-link
'
).
trigger
(
'
click
'
);
return
Vue
.
nextTick
().
then
(()
=>
{
expect
(
getStatusText
(
wrapper
)).
to
Contain
(
'
None
'
);
expect
(
getStatusText
(
wrapper
)).
to
Be
(
'
None
'
);
});
});
});
ee/spec/frontend/sidebar/components/status/status_spec.js
View file @
06ad62cd
import
{
GlFormRadioGroup
,
GlLoadingIcon
,
GlTooltip
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
,
Gl
FormRadioGroup
,
GlLoadingIcon
,
GlTooltip
}
from
'
@gitlab/ui
'
;
import
{
mount
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Status
from
'
ee/sidebar/components/status/status.vue
'
;
...
...
@@ -12,7 +12,7 @@ const getStatusIconCssClasses = wrapper => wrapper.find('[name="severity-low"]')
const
getEditButton
=
wrapper
=>
wrapper
.
find
({
ref
:
'
editButton
'
});
const
getRemoveStatusButton
=
wrapper
=>
wrapper
.
find
(
'
.value .btn-link
'
);
const
getRemoveStatusButton
=
wrapper
=>
wrapper
.
find
(
GlButton
);
const
getEditForm
=
wrapper
=>
wrapper
.
find
(
'
form
'
);
...
...
@@ -120,7 +120,7 @@ describe('Status', () => {
shallowMountStatus
(
props
);
getRemoveStatusButton
(
wrapper
).
trigger
(
'
click
'
);
getRemoveStatusButton
(
wrapper
).
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
().
onStatusChange
[
0
]).
toEqual
([
null
]);
});
...
...
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