Skip to content

Commit 6f55691

Browse files
committed
test: added tests for experiment with preserving markup formatting
1 parent f2cf03d commit 6f55691

5 files changed

+33
-0
lines changed

tests/visual-tests/playground/Experimental.visual.test.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import dd from 'ts-dedent';
2+
13
import {test} from 'playwright/core';
24

35
import {Playground} from './Playground.helpers';
@@ -45,3 +47,34 @@ test.describe('Empty rows', () => {
4547
});
4648
});
4749
});
50+
51+
test.describe('Preserve markup formatting', () => {
52+
test.beforeEach(async ({mount, editor}) => {
53+
await mount(<Playground experimental={{preserveMarkupFormatting: true}} />);
54+
await editor.clearContent();
55+
});
56+
57+
test('should preserve markup formatting for yfm-table @table', async ({
58+
editor,
59+
expectScreenshot,
60+
}) => {
61+
const markup = dd`
62+
#|
63+
||**Header1**|**Header2**||
64+
||
65+
Text
66+
|Text
67+
||
68+
|#
69+
70+
a
71+
`;
72+
73+
await editor.switchMode('markup');
74+
await editor.fill(markup);
75+
await editor.switchMode('wysiwyg');
76+
await editor.press('a');
77+
await editor.switchMode('markup');
78+
await expectScreenshot();
79+
});
80+
});

0 commit comments

Comments
 (0)