Skip to content

Commit 1e7c615

Browse files
committed
update test
1 parent 6fec919 commit 1e7c615

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/ra-input-rich-text/src/RichTextInput.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { render, waitFor } from '@testing-library/react';
44
import { Basic } from './RichTextInput.stories';
55

66
describe('<RichTextInput />', () => {
7-
it('should update its content when fields value changes', async () => {
7+
it('should update its content when fields value changes and add a trailing break to it', async () => {
88
const record = { id: 123, body: '<h1>Hello world!</h1>' };
99
const { container, rerender } = render(<Basic record={record} />);
1010

1111
await waitFor(() => {
1212
expect(container.querySelector('.ProseMirror')?.innerHTML).toEqual(
13-
'<h1>Hello world!</h1>'
13+
'<h1>Hello world!</h1><p><br class="ProseMirror-trailingBreak"></p>'
1414
);
1515
});
1616

@@ -19,7 +19,7 @@ describe('<RichTextInput />', () => {
1919

2020
await waitFor(() => {
2121
expect(container.querySelector('.ProseMirror')?.innerHTML).toEqual(
22-
'<h1>Goodbye world!</h1>'
22+
'<h1>Goodbye world!</h1><p><br class="ProseMirror-trailingBreak"></p>'
2323
);
2424
});
2525
});

0 commit comments

Comments
 (0)