-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathYfmExtensions.visual.test.tsx
More file actions
60 lines (54 loc) · 2.1 KB
/
YfmExtensions.visual.test.tsx
File metadata and controls
60 lines (54 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import {test} from 'playwright/core';
import {YFMStories} from './YfmExtensions.helpers';
test.describe('Extensions, YFM', () => {
test('Task lists', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.Tasklist />);
await expectScreenshot();
});
test('Folding Headings', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.FoldingHeadings />);
await expectScreenshot();
});
test('YFM Notes', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.YfmNote />);
await expectScreenshot();
});
test('YFM Cut', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.YfmCut />);
await expectScreenshot();
});
test('YFM Tabs', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.YfmTabs />);
await expectScreenshot();
});
// TODO: investigate and fix, unskip after fixing
// Now screenshot in .playground__preview has text cut off (as if overlapped);
test.skip('YFM HTML', async ({mount, expectScreenshot, page}) => {
await mount(<YFMStories.YfmHtmlBlock />);
await page.waitForTimeout(2000);
await expectScreenshot();
});
test('YFM File', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.YfmFile />);
await expectScreenshot();
});
test('YFM Table', async ({mount, expectScreenshot}) => {
await mount(<YFMStories.YfmTable />);
await expectScreenshot();
});
test('LaTeX Formulas', async ({mount, expectScreenshot, wait}) => {
await mount(<YFMStories.LaTeXFormulas />);
await wait.loadersHidden();
await expectScreenshot();
});
test('Mermaid diagram', async ({mount, expectScreenshot, wait}) => {
await mount(<YFMStories.MermaidDiagram />);
await wait.loadersHidden();
await expectScreenshot();
});
test('YFM Page Constructor', async ({mount, expectScreenshot, wait}) => {
await mount(<YFMStories.YfmPageConstructor />);
await wait.loadersHidden();
await expectScreenshot();
});
});