mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -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
|
@ -9,8 +9,20 @@ import { FlowChart } from './flowchart'
|
|||
import * as useMediaQuery from '@restart/hooks/useMediaQuery'
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import type * as flowchartJsModule from 'flowchart.js'
|
||||
import type { PropsWithChildren } from 'react'
|
||||
import React from 'react'
|
||||
|
||||
jest.mock('@restart/hooks/useMediaQuery')
|
||||
jest.mock('../../../components/common/application-error-alert/application-error-alert', () => ({
|
||||
ApplicationErrorAlert: ({ children, ...props }: PropsWithChildren) => (
|
||||
<div>
|
||||
<h3>This is a mock for ApplicationErrorAlert.</h3>
|
||||
Props: <code>{JSON.stringify(props)}</code>
|
||||
Children:
|
||||
<div>{children}</div>
|
||||
</div>
|
||||
)
|
||||
}))
|
||||
|
||||
describe('Flowchart', () => {
|
||||
const successText = 'Flowchart rendering succeeded!'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue