Skip to content

Commit

Permalink
[NO-JIRA] Fix issue severity badge text
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislavhh authored and sonartech committed Nov 29, 2024
1 parent 8222a93 commit 0db921e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('updating', () => {
ui.softwareQualitySeverity(SoftwareImpactSeverity.Medium).query(),
).not.toBeInTheDocument();
// popover visible
expect(byRole('heading', { name: 'severity_impact.title' }).get()).toBeInTheDocument();
expect(byRole('heading', { name: /severity_impact.title/ }).get()).toBeInTheDocument();
});

it('should allow updating the severity in Standard experience', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export default function SoftwareImpactPill(props: Props) {

return (
<Popover
title={translate('severity_impact.title')}
title={intl.formatMessage(
{ id: 'severity_impact.title' },
{ x: translate('severity_impact', severity) },
)}
description={
<>
<FormattedMessage
Expand All @@ -129,10 +132,15 @@ export default function SoftwareImpactPill(props: Props) {
quality: quality.toLowerCase(),
}}
/>
<p className="sw-mt-2">
<span className="sw-mr-1">{translate('severity_impact.help.line1')}</span>
{type === 'issue' && translate('severity_impact.help.line2')}
</p>
<div className="sw-mt-2">
{intl.formatMessage(
{ id: `severity_impact.help.description` },
{
p1: (text) => <p>{text}</p>,
p: (text) => (type === 'issue' ? <p className="sw-mt-2">{text}</p> : ''),
},
)}
</div>
</>
}
footer={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,7 @@ severity.INFO=Info
severity.INFO.description=Neither a bug nor a quality flaw. Just a finding.

# New severities
severity_impact.title=Severity of impact
severity_impact.title={x} severity of impact
severity_impact.levels=Severity levels
severity_impact.BLOCKER=Blocker
severity_impact.BLOCKER.description=Must be fixed immediately.
Expand Down

0 comments on commit 0db921e

Please sign in to comment.