This commit is contained in:
Yury Semikhatsky 2024-10-09 17:24:15 -07:00
parent c6d47bda9f
commit 8196a6ba1e
3 changed files with 10 additions and 11 deletions

View file

@ -38,7 +38,7 @@ export const TestScreenshotErrorView: React.FC<{
<div dangerouslySetInnerHTML={{ __html: prefixHtml || '' }}></div>
<ImageDiffView key='image-diff' diff={diff} hideDetails={true} ></ImageDiffView>
<div dangerouslySetInnerHTML={{ __html: suffixHtml || '' }}></div>
</div>
</div>;
};
function ansiErrorToHtml(text?: string): string {

View file

@ -98,8 +98,8 @@ export const TestResultView: React.FC<{
{!!errors.length && <AutoChip header='Errors'>
{errors.map((error, index) => {
if (error.type === 'screenshot')
return <TestScreenshotErrorView errorPrefix={error.errorPrefix} diff={error.diff!} errorSuffix={error.errorSuffix}></TestScreenshotErrorView>;
return <TestErrorView key={'test-result-error-message-' + index} error={error.error!}></TestErrorView>
return <TestScreenshotErrorView key={'test-result-error-message-' + index} errorPrefix={error.errorPrefix} diff={error.diff!} errorSuffix={error.errorSuffix}></TestScreenshotErrorView>;
return <TestErrorView key={'test-result-error-message-' + index} error={error.error!}></TestErrorView>;
})}
</AutoChip>}
{!!result.steps.length && <AutoChip header='Test Steps'>

View file

@ -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<boolean>(false);