Skip to content

Commit

Permalink
Make component trace visible in test failure debug screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Apr 26, 2024
1 parent b52629f commit 21b4074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ const CodePanel: React.FC<ErrorCalloutProps & { onClose: () => void }> = (props)
</EuiPanel>
</EuiFlyoutHeader>
<EuiFlyoutBody>
<EuiCodeBlock data-test-subj="errorBoundaryFatalDetailsErrorString">
<p>{(error.stack ?? error.toString()) + '\n\n'}</p>
<EuiCodeBlock data-test-subj="errorBoundaryFatalDetailsErrorString" fontSize="s">
<p>
{errorName}
{errorTrace}
{errorTrace + '\n\n'}
</p>
<p>{error.stack ?? error.toString()}</p>
</EuiCodeBlock>
</EuiFlyoutBody>
<EuiFlyoutFooter>
Expand Down Expand Up @@ -89,7 +89,7 @@ const CodePanel: React.FC<ErrorCalloutProps & { onClose: () => void }> = (props)

export const FatalPrompt: React.FC<ErrorCalloutProps> = (props) => {
const { onClickRefresh } = props;
const [isFlyoutVisible, setIsFlyoutVisible] = useState(false);
const [isFlyoutVisible, setIsFlyoutVisible] = useState(true);

return (
<EuiEmptyPrompt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const errorMessageStrings = {
}),
componentName: (errorComponentName: string) =>
i18n.translate('sharedUXPackages.error_boundary.fatal.prompt.details', {
defaultMessage: 'The above error occurred in {name}:',
defaultMessage: 'An error occurred in {name}:',
values: { name: errorComponentName },
}),
closeButton: () =>
Expand Down

0 comments on commit 21b4074

Please sign in to comment.