mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
refactor: use application error alert in flowchart
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
cdd368bc81
commit
8bc167239c
13 changed files with 152 additions and 145 deletions
|
@ -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>
|
||||
`;
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue