From 26ca7559fab8b6a0379468a0a5b5f7d83c1baaa9 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Wed, 24 Feb 2021 18:37:27 +0100 Subject: [PATCH] SONAR-14513 Add e2e tests for security hotspots --- .../security-hotspots/components/FilterBar.tsx | 2 +- .../components/HotspotReviewHistory.tsx | 4 ++-- .../HotspotReviewHistoryAndComments.tsx | 4 ++-- .../components/HotspotViewerRenderer.tsx | 4 ++-- .../__snapshots__/FilterBar-test.tsx.snap | 8 ++++---- .../HotspotReviewHistory-test.tsx.snap | 4 ++-- .../HotspotReviewHistoryAndComments-test.tsx.snap | 6 +++--- .../HotspotViewerRenderer-test.tsx.snap | 15 ++++++++++----- 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx index 921c07fb4b5..8cea9a03a74 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx @@ -144,7 +144,7 @@ export function FilterBar(props: FilterBarProps) { {hotspotsReviewedMeasure && } }> setEditedCommentKey(key)} /> @@ -129,7 +129,7 @@ export default function HotspotReviewHistory(props: HotspotReviewHistoryProps) { } overlayPlacement={PopupPlacement.BottomRight}> - + )} diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx index 9af216b9fe0..f959b0fa334 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx @@ -96,7 +96,7 @@ export default class HotspotReviewHistoryAndComments extends React.PureComponent return ( <>

{translate('hotspot.section.activity')}

-
+
@@ -120,7 +120,7 @@ export function HotspotViewerRenderer(props: HotspotViewerRendererProps) { {translate('risk_exposure', hotspot.rule.vulnerabilityProbability)}
-
+
{translate('assignee')}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap index 5363cfcb571..b45ba01e3c8 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap @@ -108,7 +108,7 @@ exports[`should render correctly: anonymous 1`] = ` loading={false} > @@ -224,7 +224,7 @@ exports[`should render correctly: logged-in 1`] = ` loading={false} > @@ -396,7 +396,7 @@ exports[`should render correctly: on Pull request 1`] = ` loading={false} > @@ -496,7 +496,7 @@ exports[`should render correctly: with hotspots reviewed measure 1`] = ` value="23.30" /> @@ -117,7 +117,7 @@ exports[`should render correctly 1`] = ` overlayPlacement="bottom-right" >
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotReviewHistoryAndComments-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotReviewHistoryAndComments-test.tsx.snap index 0ebc649edc0..8758b8bff1c 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotReviewHistoryAndComments-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotReviewHistoryAndComments-test.tsx.snap @@ -6,7 +6,7 @@ exports[`should render correctly 1`] = ` hotspot.section.activity