From 864ad5894020f45953d2aac95b1b85744c242f7e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Tue, 7 May 2019 16:06:27 +0200 Subject: [PATCH] SONAR-12026 Update status labels in sercurity reports pages --- .../main/js/apps/issues/sidebar/StatusFacet.tsx | 2 +- .../sidebar/__tests__/StatusFacet-test.tsx | 10 +++++----- .../__snapshots__/StatusFacet-test.tsx.snap | 16 ++++++++-------- .../resources/org/sonar/l10n/core.properties | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx index ea83e7a20c2..5c0c51f433e 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx @@ -39,7 +39,7 @@ interface Props { } const STATUSES = ['OPEN', 'CONFIRMED', 'REOPENED', 'RESOLVED']; -const HOTSPOT_STATUSES = ['TO_REVIEW', 'REVIEWED', 'IN_REVIEW']; +const HOTSPOT_STATUSES = ['TOREVIEW', 'REVIEWED', 'INREVIEW']; const COMMON_STATUSES = ['CLOSED']; export default class StatusFacet extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx index 3b7b1482d35..6e7ee1ec10d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx @@ -35,7 +35,7 @@ it('should toggle status facet', () => { it('should clear status facet', () => { const onChange = jest.fn(); - const wrapper = shallowRender({ onChange, statuses: ['TO_REVIEW'] }); + const wrapper = shallowRender({ onChange, statuses: ['TOREVIEW'] }); wrapper.children('FacetHeader').prop('onClear')(); expect(onChange).toBeCalledWith({ statuses: [] }); }); @@ -43,8 +43,8 @@ it('should clear status facet', () => { it('should select a status', () => { const onChange = jest.fn(); const wrapper = shallowRender({ onChange }); - clickAndCheck('TO_REVIEW'); - clickAndCheck('OPEN', true, ['OPEN', 'TO_REVIEW']); + clickAndCheck('TOREVIEW'); + clickAndCheck('OPEN', true, ['OPEN', 'TOREVIEW']); clickAndCheck('CONFIRMED'); function clickAndCheck(status: string, multiple = false, expected = [status]) { @@ -70,8 +70,8 @@ function shallowRender(props: Partial = {}) { REOPENED: 0, RESOLVED: 0, CLOSED: 8, - TO_REVIEW: 150, - IN_REVIEW: 7, + TOREVIEW: 150, + INREVIEW: 7, REVIEWED: 1105 }} statuses={[]} diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/StatusFacet-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/StatusFacet-test.tsx.snap index 9d01da1c88e..de473009503 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/StatusFacet-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/StatusFacet-test.tsx.snap @@ -90,17 +90,17 @@ exports[`should render correctly 1`] = ` active={false} disabled={false} halfWidth={true} - key="TO_REVIEW" + key="TOREVIEW" loading={false} name={ } onClick={[Function]} stat="150" - tooltip="issue.status.TO_REVIEW" - value="TO_REVIEW" + tooltip="issue.status.TOREVIEW" + value="TOREVIEW" /> } onClick={[Function]} stat="7" - tooltip="issue.status.IN_REVIEW" - value="IN_REVIEW" + tooltip="issue.status.INREVIEW" + value="INREVIEW" />