From 8196a6ba1e0a4e24c0b70d0b2cd661f2c8137023 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 9 Oct 2024 17:24:15 -0700 Subject: [PATCH] lint --- packages/html-reporter/src/testErrorView.tsx | 8 ++++---- packages/html-reporter/src/testResultView.tsx | 10 +++++----- packages/web/src/shared/imageDiffView.tsx | 3 +-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/html-reporter/src/testErrorView.tsx b/packages/html-reporter/src/testErrorView.tsx index 80db4c9fb9..06cfdfd45b 100644 --- a/packages/html-reporter/src/testErrorView.tsx +++ b/packages/html-reporter/src/testErrorView.tsx @@ -35,10 +35,10 @@ export const TestScreenshotErrorView: React.FC<{ const prefixHtml = React.useMemo(() => ansiErrorToHtml(errorPrefix), [errorPrefix]); const suffixHtml = React.useMemo(() => ansiErrorToHtml(errorSuffix), [errorSuffix]); return
-
- -
-
+
+ +
+ ; }; function ansiErrorToHtml(text?: string): string { diff --git a/packages/html-reporter/src/testResultView.tsx b/packages/html-reporter/src/testResultView.tsx index 54d349eea8..b2e899ebfb 100644 --- a/packages/html-reporter/src/testResultView.tsx +++ b/packages/html-reporter/src/testResultView.tsx @@ -98,9 +98,9 @@ export const TestResultView: React.FC<{ {!!errors.length && {errors.map((error, index) => { if (error.type === 'screenshot') - return ; - return - })} + return ; + return ; + })} } {!!result.steps.length && {result.steps.map((step, i) => )} @@ -156,8 +156,8 @@ function classifyErrors(testErrors: string[], diffs: ImageDiff[]) { let screenshotError; if (error.includes('Screenshot comparison failed:')) { for (const diff of diffs) { - if (!diff.actual?.attachment.name) - continue; + if (!diff.actual?.attachment.name) + continue; if (!error.includes(diff.actual!.attachment.name)) continue; const index = error.search(/Expected:|Previous:|Received:/); diff --git a/packages/web/src/shared/imageDiffView.tsx b/packages/web/src/shared/imageDiffView.tsx index 0d26e12be5..6f0028bca9 100644 --- a/packages/web/src/shared/imageDiffView.tsx +++ b/packages/web/src/shared/imageDiffView.tsx @@ -63,7 +63,6 @@ export const ImageDiffView: React.FC<{ noTargetBlank?: boolean, hideDetails?: boolean, }> = ({ diff, noTargetBlank, hideDetails }) => { - console.log('hideDetails', hideDetails); const [mode, setMode] = React.useState<'diff' | 'actual' | 'expected' | 'slider' | 'sxs'>(diff.diff ? 'diff' : 'actual'); const [showSxsDiff, setShowSxsDiff] = React.useState(false); @@ -138,7 +137,7 @@ export const ImageDiffSlider: React.FC<{ canvasHeight: number, scale: number, expectedTitle: string, - hideSize?: boolean, + hideSize?: boolean, }> = ({ expectedImage, actualImage, canvasWidth, canvasHeight, scale, expectedTitle, hideSize }) => { const absoluteStyle: React.CSSProperties = { position: 'absolute',