refactor: use application error alert in flowchart

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-08-06 13:38:40 +02:00
parent cdd368bc81
commit 8bc167239c
13 changed files with 152 additions and 145 deletions

View file

@ -2,12 +2,18 @@
exports[`TranslatedApplicationErrorAlert renders correctly 1`] = `
<div>
This is a mock for ApplicationErrorAlert.
<br />
Props:
{"className":"test-css-class"}
<br />
Children:
testKey
<div>
<h3>
This is a mock for ApplicationErrorAlert.
</h3>
Props:
<code>
{"className":"test-css-class"}
</code>
Children:
<div>
testKey
</div>
</div>
</div>
`;

View file

@ -8,17 +8,16 @@ import { render } from '@testing-library/react'
import { mockI18n } from '../../../test-utils/mock-i18n'
import { TranslatedApplicationErrorAlert } from './translated-application-error-alert'
import type { PropsWithChildren } from 'react'
import React, { Fragment } from 'react'
import React from 'react'
jest.mock('./application-error-alert', () => ({
ApplicationErrorAlert: ({ children, ...props }: PropsWithChildren) => (
<Fragment>
This is a mock for ApplicationErrorAlert.
<br />
Props: {JSON.stringify(props)}
<br />
Children: {children}
</Fragment>
<div>
<h3>This is a mock for ApplicationErrorAlert.</h3>
Props: <code>{JSON.stringify(props)}</code>
Children:
<div>{children}</div>
</div>
)
}))