diff options
author | stanislavh <stanislav.honcharov@sonarsource.com> | 2024-01-29 18:05:17 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-01-31 20:03:37 +0000 |
commit | d2cca0a99b38a2b0068a104f5c3cf068927bac73 (patch) | |
tree | 076cc7110b032d019f97fccd13d06435dfa291ee | |
parent | acce78657a7ed1219283849c7c35e9b875d42249 (diff) | |
download | sonarqube-d2cca0a99b38a2b0068a104f5c3cf068927bac73.tar.gz sonarqube-d2cca0a99b38a2b0068a104f5c3cf068927bac73.zip |
SONAR-21455 Update BBTs to new taxonomy
Co-authored-by: Eric Giffon <eric.giffon@sonarsource.com>
7 files changed, 14 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx index 895a2846625..b45c3c3780c 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx @@ -107,7 +107,7 @@ export default function NewCodeMeasuresPanel(props: Readonly<Props>) { <div className="sw-mt-6" id={getTabPanelId(MeasuresTabs.New)}> <LightGreyCard className="sw-flex sw-rounded-2 sw-gap-4"> <IssueMeasuresCardInner - data-test="overview__measures-new_issues" + data-testid="overview__measures-new_issues" disabled={component.needIssueSync} className="sw-w-1/2" metric={MetricKey.new_violations} @@ -126,7 +126,7 @@ export default function NewCodeMeasuresPanel(props: Readonly<Props>) { /> <StyledCardSeparator /> <IssueMeasuresCardInner - data-test="overview__measures-accepted_issues" + data-testid="overview__measures-accepted_issues" disabled={Boolean(component.needIssueSync) || !newAcceptedIssues} className="sw-w-1/2" metric={MetricKey.new_accepted_issues} diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx index d752b0f4b23..f5bf2c2142f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx @@ -67,7 +67,7 @@ export function QualityGatePanel(props: QualityGatePanelProps) { qgStatuses.some((p) => Boolean(p.ignoredConditions)); return ( - <div data-test="overview__quality-gate-panel"> + <div data-testid="overview__quality-gate-panel"> <QualityGateStatusTitle /> <div className="sw-pt-5"> <Spinner loading={loading}> diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx index d07db0ef836..d8755ae82ad 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx @@ -50,7 +50,7 @@ export function SoftwareImpactMeasureBreakdownCard( impactSeverities: severity, }); - const testId = `software-impact-${softwareQuality}-severity-${severity}`; + const testId = `overview__software-impact-${softwareQuality}-severity-${severity}`; const cardClasses = 'sw-w-1/3 sw-p-2 sw-rounded-1 sw-text-xs sw-font-semibold sw-select-none sw-flex sw-gap-1 sw-justify-center sw-items-center'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx index e6df00f3ac9..b4d71c1b9ef 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx @@ -81,7 +81,7 @@ export function SoftwareImpactMeasureCard(props: Readonly<SoftwareImpactBreakdow return ( <LightGreyCard - data-testid={`software-impact-card-${softwareQuality}`} + data-testid={`overview__software-impact-card-${softwareQuality}`} className="sw-w-1/3 sw-overflow-hidden sw-rounded-2 sw-p-4 sw-flex-col" > <TextBold name={intl.formatMessage({ id: `software_quality.${softwareQuality}` })} /> @@ -94,6 +94,7 @@ export function SoftwareImpactMeasureCard(props: Readonly<SoftwareImpactBreakdow > {measure ? ( <NakedLink + data-testid={`overview__software-impact-${softwareQuality}`} aria-label={intl.formatMessage( { id: `overview.measures.software_impact.see_list_of_x_open_issues`, diff --git a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx index 7734ff7952d..9a4fa00083a 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx @@ -130,7 +130,7 @@ export function TabsPanel(props: React.PropsWithChildren<MeasuresPanelProps>) { ]; return ( - <div data-test="overview__measures-panel"> + <div data-testid="overview__measures-panel"> <div className="sw-flex sw-justify-between sw-items-center sw-mb-4"> <PageTitle as="h2" text={translate('overview.measures')} /> <LastAnalysisLabel analysisDate={branch?.analysisDate} /> diff --git a/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts b/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts index 70f8c243408..1ae64e6e865 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts +++ b/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts @@ -30,7 +30,7 @@ export const getPageObjects = () => { const selectors = { overallCodeButton: byRole('tab', { name: /overview.overall_code/ }), softwareImpactMeasureCard: (softwareQuality: SoftwareQuality) => - byTestId(`software-impact-card-${softwareQuality}`), + byTestId(`overview__software-impact-card-${softwareQuality}`), }; const ui = { ...selectors, @@ -94,9 +94,9 @@ export const getPageObjects = () => { severity: SoftwareImpactSeverity, active: boolean, ) => { - const link = byTestId(`software-impact-${softwareQuality}-severity-${severity}`).get( - ui.softwareImpactMeasureCard(softwareQuality).get(), - ); + const link = byTestId( + `overview__software-impact-${softwareQuality}-severity-${severity}`, + ).get(ui.softwareImpactMeasureCard(softwareQuality).get()); if (active) { expect(link).toHaveClass('active'); } else { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx index 2386b41d1a8..0bca878392c 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx @@ -83,7 +83,7 @@ export default function IssueMeasuresCard( <IssueMeasuresCardInner className="sw-w-1/3" header={intl.formatMessage({ id: 'overview.new_issues' })} - data-test={`overview__measures-${MetricKey.new_violations}`} + data-testid={`overview__measures-${MetricKey.new_violations}`} data-guiding-id={issuesConditionFailed ? 'overviewZeroNewIssuesSimplification' : undefined} metric={MetricKey.new_violations} value={formatMeasure(issuesCount, MetricType.ShortInteger)} @@ -108,7 +108,7 @@ export default function IssueMeasuresCard( <IssueMeasuresCardInner className="sw-w-1/3" header={intl.formatMessage({ id: 'overview.accepted_issues' })} - data-test={`overview__measures-${MetricKey.new_accepted_issues}`} + data-testid={`overview__measures-${MetricKey.new_accepted_issues}`} metric={MetricKey.new_accepted_issues} value={formatMeasure(acceptedCount, MetricType.ShortInteger)} disabled={component.needIssueSync} @@ -149,7 +149,7 @@ export default function IssueMeasuresCard( </Tooltip> </> } - data-test={`overview__measures-${MetricKey.pull_request_fixed_issues}`} + data-testid={`overview__measures-${MetricKey.pull_request_fixed_issues}`} metric={MetricKey.pull_request_fixed_issues} value={formatMeasure(fixedCount, MetricType.ShortInteger)} disabled={component.needIssueSync} |