mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-26 01:04:40 +00:00
fix: missing wait for element in blockquote-extra-tag-markdown-extension.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
b763413108
commit
16bf5bb2af
2 changed files with 76 additions and 9 deletions
|
@ -2,6 +2,11 @@
|
|||
|
||||
exports[`blockquote extra tag renders the tag "> [color=#f00] text" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<blockquote
|
||||
style="border-left-color: #f00;"
|
||||
>
|
||||
|
@ -20,6 +25,11 @@ exports[`blockquote extra tag renders the tag "> [color=#f00] text" correctly 1`
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[=value]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[=value]
|
||||
</p>
|
||||
|
@ -30,6 +40,11 @@ exports[`blockquote extra tag renders the tag "[=value]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[color=#abcdef]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
@ -45,6 +60,11 @@ exports[`blockquote extra tag renders the tag "[color=#abcdef]" correctly 1`] =
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[color=#dfe]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
@ -60,6 +80,11 @@ exports[`blockquote extra tag renders the tag "[color=#dfe]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[color=]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[color=]
|
||||
</p>
|
||||
|
@ -70,6 +95,11 @@ exports[`blockquote extra tag renders the tag "[color=]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[color=notarealcolor]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
@ -84,6 +114,11 @@ exports[`blockquote extra tag renders the tag "[color=notarealcolor]" correctly
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[color=white]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
@ -99,6 +134,11 @@ exports[`blockquote extra tag renders the tag "[color=white]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[key=]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[key=]
|
||||
</p>
|
||||
|
@ -109,6 +149,11 @@ exports[`blockquote extra tag renders the tag "[key=]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[key]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[key]
|
||||
</p>
|
||||
|
@ -119,6 +164,11 @@ exports[`blockquote extra tag renders the tag "[key]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[name=]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[name=]
|
||||
</p>
|
||||
|
@ -129,6 +179,11 @@ exports[`blockquote extra tag renders the tag "[name=]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[name=giowehg]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
@ -143,6 +198,11 @@ exports[`blockquote extra tag renders the tag "[name=giowehg]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[time=]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
[time=]
|
||||
</p>
|
||||
|
@ -153,6 +213,11 @@ exports[`blockquote extra tag renders the tag "[time=]" correctly 1`] = `
|
|||
|
||||
exports[`blockquote extra tag renders the tag "[time=tomorrow]" correctly 1`] = `
|
||||
<div>
|
||||
<p>
|
||||
blockquote
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span
|
||||
class="blockquote-extra"
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
*/
|
||||
import { TestMarkdownRenderer } from '../../../components/markdown-renderer/test-utils/test-markdown-renderer'
|
||||
import { BlockquoteExtraTagMarkdownExtension } from './blockquote-extra-tag-markdown-extension'
|
||||
import { render } from '@testing-library/react'
|
||||
import { screen, render } from '@testing-library/react'
|
||||
import React from 'react'
|
||||
|
||||
describe('blockquote extra tag', () => {
|
||||
;[
|
||||
it.each([
|
||||
'[color=white]',
|
||||
'[color=#dfe]',
|
||||
'[color=notarealcolor]',
|
||||
|
@ -23,12 +23,14 @@ describe('blockquote extra tag', () => {
|
|||
'[key=]',
|
||||
'[=value]',
|
||||
'> [color=#f00] text'
|
||||
].forEach((content) => {
|
||||
it(`renders the tag "${content}" correctly`, () => {
|
||||
const view = render(
|
||||
<TestMarkdownRenderer extensions={[new BlockquoteExtraTagMarkdownExtension()]} content={content} />
|
||||
)
|
||||
expect(view.container).toMatchSnapshot()
|
||||
})
|
||||
])(`renders the tag "%s" correctly`, async (content) => {
|
||||
const view = render(
|
||||
<TestMarkdownRenderer
|
||||
extensions={[new BlockquoteExtraTagMarkdownExtension()]}
|
||||
content={'blockquote\n\n' + content}
|
||||
/>
|
||||
)
|
||||
await screen.findByText('blockquote')
|
||||
expect(view.container).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue