|
1 | 1 | import {test} from 'playwright/core'; |
2 | 2 |
|
3 | | -import {PlaygroundMini} from '../../demo/components/PlaygroundMini'; |
4 | | -import {markup} from '../../demo/stories/markdown/markup'; |
| 3 | +import { |
| 4 | + Blockquotes, |
| 5 | + Code, |
| 6 | + DefinitionList, |
| 7 | + Emojis, |
| 8 | + Emphasis, |
| 9 | + Heading, |
| 10 | + HorizontalRules, |
| 11 | + Images, |
| 12 | + Links, |
| 13 | + Lists, |
| 14 | + SubscriptSuperscript, |
| 15 | + Tables, |
| 16 | +} from './MarkdownExtensions.helpers'; |
5 | 17 |
|
6 | 18 | test.describe('Extensions, Markdown', () => { |
7 | 19 | test('Heading', async ({mount, expectScreenshot}) => { |
8 | | - await mount(<PlaygroundMini initial={markup.heading} />); |
| 20 | + await mount(<Heading />); |
9 | 21 | await expectScreenshot(); |
10 | 22 | }); |
11 | 23 | test('Blockquotes', async ({mount, expectScreenshot}) => { |
12 | | - await mount(<PlaygroundMini initial={markup.blockquote} />); |
| 24 | + await mount(<Blockquotes />); |
13 | 25 | await expectScreenshot(); |
14 | 26 | }); |
15 | 27 | test('Emphasis', async ({mount, expectScreenshot}) => { |
16 | | - await mount(<PlaygroundMini initial={markup.emphasis} />); |
| 28 | + await mount(<Emphasis />); |
17 | 29 | await expectScreenshot(); |
18 | 30 | }); |
19 | 31 | test('Horizontal Rules', async ({mount, expectScreenshot}) => { |
20 | | - await mount(<PlaygroundMini initial={markup.horizontalRules} />); |
| 32 | + await mount(<HorizontalRules />); |
21 | 33 | await expectScreenshot(); |
22 | 34 | }); |
23 | 35 | test('Lists', async ({mount, expectScreenshot}) => { |
24 | | - await mount(<PlaygroundMini initial={markup.lists} />); |
| 36 | + await mount(<Lists />); |
25 | 37 | await expectScreenshot(); |
26 | 38 | }); |
27 | 39 | test('Code', async ({mount, expectScreenshot}) => { |
28 | | - await mount(<PlaygroundMini initial={markup.code} />); |
| 40 | + await mount(<Code />); |
29 | 41 | await expectScreenshot(); |
30 | 42 | }); |
31 | 43 | test('Tables', async ({mount, expectScreenshot}) => { |
32 | | - await mount(<PlaygroundMini initial={markup.tables} />); |
| 44 | + await mount(<Tables />); |
33 | 45 | await expectScreenshot(); |
34 | 46 | }); |
35 | 47 | test('Links', async ({mount, expectScreenshot}) => { |
36 | | - await mount(<PlaygroundMini initial={markup.links} />); |
| 48 | + await mount(<Links />); |
37 | 49 | await expectScreenshot(); |
38 | 50 | }); |
39 | 51 | test('Images', async ({mount, expectScreenshot}) => { |
40 | | - await mount(<PlaygroundMini initial={markup.images} />); |
| 52 | + await mount(<Images />); |
41 | 53 | await expectScreenshot(); |
42 | 54 | }); |
43 | 55 | test('Subscript & Superscript', async ({mount, expectScreenshot}) => { |
44 | | - await mount(<PlaygroundMini initial={markup.subAndSub} />); |
| 56 | + await mount(<SubscriptSuperscript />); |
45 | 57 | await expectScreenshot(); |
46 | 58 | }); |
47 | 59 | test('Emojis', async ({mount, expectScreenshot}) => { |
48 | | - await mount(<PlaygroundMini initial={markup.emojis} />); |
| 60 | + await mount(<Emojis />); |
49 | 61 | await expectScreenshot(); |
50 | 62 | }); |
51 | 63 | test('Definition list', async ({mount, expectScreenshot}) => { |
52 | | - await mount(<PlaygroundMini initial={markup.deflist} />); |
| 64 | + await mount(<DefinitionList />); |
53 | 65 | await expectScreenshot(); |
54 | 66 | }); |
55 | 67 | }); |
0 commit comments