Commit f2c2b556 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch...

Merge branch '347508-requirements-should-use-a-generic-status-icons-instead-of-pipeline-status' into 'master'

Update status icons for requirements

See merge request gitlab-org/gitlab!80775
parents b1157f59 e4d5c3cb
...@@ -27,14 +27,14 @@ export default { ...@@ -27,14 +27,14 @@ export default {
if (this.testReport.state === TestReportStatus.Passed) { if (this.testReport.state === TestReportStatus.Passed) {
return { return {
variant: 'success', variant: 'success',
icon: 'status_success', icon: 'status-success',
text: __('satisfied'), text: __('satisfied'),
tooltipTitle: __('Passed on'), tooltipTitle: __('Passed on'),
}; };
} else if (this.testReport.state === TestReportStatus.Failed) { } else if (this.testReport.state === TestReportStatus.Failed) {
return { return {
variant: 'danger', variant: 'danger',
icon: 'status_failed', icon: 'status-failed',
text: __('failed'), text: __('failed'),
tooltipTitle: __('Failed on'), tooltipTitle: __('Failed on'),
}; };
......
...@@ -8,7 +8,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
id: 1, id: 1,
value: 'satisfied', value: 'satisfied',
text: __('Satisfied'), text: __('Satisfied'),
icon: 'status_success', icon: 'status-success',
iconClass: 'gl-text-green-700', iconClass: 'gl-text-green-700',
containerClass: 'gl-bg-green-100 gl-text-gray-900', containerClass: 'gl-bg-green-100 gl-text-gray-900',
}, },
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
id: 2, id: 2,
value: 'failed', value: 'failed',
text: __('Failed'), text: __('Failed'),
icon: 'status_failed', icon: 'status-failed',
iconClass: 'gl-text-red-700', iconClass: 'gl-text-red-700',
containerClass: 'gl-bg-red-100 gl-text-gray-900', containerClass: 'gl-bg-red-100 gl-text-gray-900',
}, },
......
...@@ -21,14 +21,14 @@ const findGlTooltip = (wrapper) => wrapper.findComponent(GlTooltip); ...@@ -21,14 +21,14 @@ const findGlTooltip = (wrapper) => wrapper.findComponent(GlTooltip);
const successBadgeProps = { const successBadgeProps = {
variant: 'success', variant: 'success',
icon: 'status_success', icon: 'status-success',
text: 'satisfied', text: 'satisfied',
tooltipTitle: 'Passed on', tooltipTitle: 'Passed on',
}; };
const failedBadgeProps = { const failedBadgeProps = {
variant: 'danger', variant: 'danger',
icon: 'status_failed', icon: 'status-failed',
text: 'failed', text: 'failed',
tooltipTitle: 'Failed on', tooltipTitle: 'Failed on',
}; };
......
...@@ -1107,12 +1107,12 @@ describe('RequirementsRoot', () => { ...@@ -1107,12 +1107,12 @@ describe('RequirementsRoot', () => {
it('renders a failed badge after the update', async () => { it('renders a failed badge after the update', async () => {
await nextTick(); await nextTick();
expect(findBadge().props('icon')).toBe('status_success'); expect(findBadge().props('icon')).toBe('status-success');
editRequirementToFailed(); editRequirementToFailed();
await waitForPromises(); await waitForPromises();
expect(findBadge().props('icon')).toBe('status_failed'); expect(findBadge().props('icon')).toBe('status-failed');
}); });
}); });
......
...@@ -9,11 +9,11 @@ import { mockStatusToken } from '../../mock_data'; ...@@ -9,11 +9,11 @@ import { mockStatusToken } from '../../mock_data';
const mockStatuses = [ const mockStatuses = [
{ {
text: 'Satisfied', text: 'Satisfied',
icon: 'status_success', icon: 'status-success',
}, },
{ {
text: 'Failed', text: 'Failed',
icon: 'status_failed', icon: 'status-failed',
}, },
{ {
text: 'Missing', text: 'Missing',
...@@ -62,8 +62,8 @@ describe('StatusToken', () => { ...@@ -62,8 +62,8 @@ describe('StatusToken', () => {
it.each` it.each`
value | text | icon value | text | icon
${'satisfied'} | ${'Satisfied'} | ${'status_success'} ${'satisfied'} | ${'Satisfied'} | ${'status-success'}
${'failed'} | ${'Failed'} | ${'status_failed'} ${'failed'} | ${'Failed'} | ${'status-failed'}
${'missing'} | ${'Missing'} | ${'status-waiting'} ${'missing'} | ${'Missing'} | ${'status-waiting'}
`( `(
'renders token icon and text representing status "$text" when `value.data` is set to "$value"', 'renders token icon and text representing status "$text" when `value.data` is set to "$value"',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment