Skip to content

Commit a79090f

Browse files
committed
ci: added pre style
1 parent 79f83ee commit a79090f

File tree

55 files changed

+47
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+47
-15
lines changed

demo/components/Playground.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
margin: 0;
3030
padding: 5px 10px;
3131

32+
font-family: var(--g-font-family-monospace);
33+
3234
background-color: var(--g-color-base-generic);
3335
}
3436

tests/playwright/core/expectScreenshotFixture.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export const expectScreenshotFixture: PlaywrightFixture<ExpectScreenshotFixture>
4444
// Wait for loading fonts
4545
await page.evaluate(() => document.fonts.ready);
4646

47+
// Additional wait
48+
await page.waitForTimeout(100);
49+
4750
if (themes?.includes('light')) {
4851
await page.emulateMedia({colorScheme: 'light'});
4952

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {PlaygroundMini} from '../../demo/components/PlaygroundMini';
2+
import {markup} from '../../demo/stories/markdown/markup';
3+
4+
export const Heading = () => <PlaygroundMini initial={markup.heading} />;
5+
export const Blockquotes = () => <PlaygroundMini initial={markup.blockquote} />;
6+
export const Emphasis = () => <PlaygroundMini initial={markup.emphasis} />;
7+
export const HorizontalRules = () => <PlaygroundMini initial={markup.horizontalRules} />;
8+
export const Lists = () => <PlaygroundMini initial={markup.lists} />;
9+
export const Code = () => <PlaygroundMini initial={markup.code} />;
10+
export const Tables = () => <PlaygroundMini initial={markup.tables} />;
11+
export const Links = () => <PlaygroundMini initial={markup.links} />;
12+
export const Images = () => <PlaygroundMini initial={markup.images} />;
13+
export const SubscriptSuperscript = () => <PlaygroundMini initial={markup.subAndSub} />;
14+
export const Emojis = () => <PlaygroundMini initial={markup.emojis} />;
15+
export const DefinitionList = () => <PlaygroundMini initial={markup.deflist} />;
Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,67 @@
11
import {test} from 'playwright/core';
22

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';
517

618
test.describe('Extensions, Markdown', () => {
719
test('Heading', async ({mount, expectScreenshot}) => {
8-
await mount(<PlaygroundMini initial={markup.heading} />);
20+
await mount(<Heading />);
921
await expectScreenshot();
1022
});
1123
test('Blockquotes', async ({mount, expectScreenshot}) => {
12-
await mount(<PlaygroundMini initial={markup.blockquote} />);
24+
await mount(<Blockquotes />);
1325
await expectScreenshot();
1426
});
1527
test('Emphasis', async ({mount, expectScreenshot}) => {
16-
await mount(<PlaygroundMini initial={markup.emphasis} />);
28+
await mount(<Emphasis />);
1729
await expectScreenshot();
1830
});
1931
test('Horizontal Rules', async ({mount, expectScreenshot}) => {
20-
await mount(<PlaygroundMini initial={markup.horizontalRules} />);
32+
await mount(<HorizontalRules />);
2133
await expectScreenshot();
2234
});
2335
test('Lists', async ({mount, expectScreenshot}) => {
24-
await mount(<PlaygroundMini initial={markup.lists} />);
36+
await mount(<Lists />);
2537
await expectScreenshot();
2638
});
2739
test('Code', async ({mount, expectScreenshot}) => {
28-
await mount(<PlaygroundMini initial={markup.code} />);
40+
await mount(<Code />);
2941
await expectScreenshot();
3042
});
3143
test('Tables', async ({mount, expectScreenshot}) => {
32-
await mount(<PlaygroundMini initial={markup.tables} />);
44+
await mount(<Tables />);
3345
await expectScreenshot();
3446
});
3547
test('Links', async ({mount, expectScreenshot}) => {
36-
await mount(<PlaygroundMini initial={markup.links} />);
48+
await mount(<Links />);
3749
await expectScreenshot();
3850
});
3951
test('Images', async ({mount, expectScreenshot}) => {
40-
await mount(<PlaygroundMini initial={markup.images} />);
52+
await mount(<Images />);
4153
await expectScreenshot();
4254
});
4355
test('Subscript & Superscript', async ({mount, expectScreenshot}) => {
44-
await mount(<PlaygroundMini initial={markup.subAndSub} />);
56+
await mount(<SubscriptSuperscript />);
4557
await expectScreenshot();
4658
});
4759
test('Emojis', async ({mount, expectScreenshot}) => {
48-
await mount(<PlaygroundMini initial={markup.emojis} />);
60+
await mount(<Emojis />);
4961
await expectScreenshot();
5062
});
5163
test('Definition list', async ({mount, expectScreenshot}) => {
52-
await mount(<PlaygroundMini initial={markup.deflist} />);
64+
await mount(<DefinitionList />);
5365
await expectScreenshot();
5466
});
5567
});

tests/visual-tests/Presets.visual.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {test} from 'playwright/core';
22

3-
import {Commonmark, Custom, Default, Full, Yfm, Zero} from './helpers';
3+
import {Commonmark, Custom, Default, Full, Yfm, Zero} from './Presets.helpers';
44

55
test.describe('Extensions, Presets', () => {
66
test('Zero', async ({mount, expectScreenshot}) => {

0 commit comments

Comments
 (0)