-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 3692-remove-tabpanels-component
- Loading branch information
Showing
135 changed files
with
2,436 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Add `link` variant to Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': major | ||
--- | ||
|
||
Update Primer React to emit *.css files that are imported by emitted *.js files for styling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Header: Add overflow when there are a lot of items |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
Update Blankslate component to use CSS Modules behind a feature flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': patch | ||
--- | ||
|
||
Bumps @github/relative-time-element to v4.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+28.4 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-Default-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.1 KB
...omponents/Blankslate.test.ts-snapshots/Blankslate-Default-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28 KB
...ts/Blankslate.test.ts-snapshots/Blankslate-Default-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.6 KB
...shots/components/Blankslate.test.ts-snapshots/Blankslate-Default-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.4 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-Default-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.2 KB
...ents/Blankslate.test.ts-snapshots/Blankslate-Default-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.8 KB
...s/Blankslate.test.ts-snapshots/Blankslate-Default-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.3 KB
...hots/components/Blankslate.test.ts-snapshots/Blankslate-Default-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.2 KB
...ents/Blankslate.test.ts-snapshots/Blankslate-Default-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.8 KB
.../Blankslate.test.ts-snapshots/Blankslate-Default-primer-breakpoint-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25 KB
.../Blankslate.test.ts-snapshots/Blankslate-Default-primer-breakpoint-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.2 KB
...onents/Blankslate.test.ts-snapshots/Blankslate-Narrow-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16 KB
...components/Blankslate.test.ts-snapshots/Blankslate-Narrow-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16 KB
...nts/Blankslate.test.ts-snapshots/Blankslate-Narrow-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.2 KB
...pshots/components/Blankslate.test.ts-snapshots/Blankslate-Narrow-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.2 KB
...onents/Blankslate.test.ts-snapshots/Blankslate-Narrow-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.3 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-Narrow-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16 KB
...ts/Blankslate.test.ts-snapshots/Blankslate-Narrow-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.3 KB
...shots/components/Blankslate.test.ts-snapshots/Blankslate-Narrow-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.3 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-Narrow-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15 KB
...s/Blankslate.test.ts-snapshots/Blankslate-Narrow-primer-breakpoint-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.2 KB
...s/Blankslate.test.ts-snapshots/Blankslate-Narrow-primer-breakpoint-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.6 KB
...ents/Blankslate.test.ts-snapshots/Blankslate-Spacious-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.4 KB
...mponents/Blankslate.test.ts-snapshots/Blankslate-Spacious-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.4 KB
...s/Blankslate.test.ts-snapshots/Blankslate-Spacious-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.6 KB
...hots/components/Blankslate.test.ts-snapshots/Blankslate-Spacious-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...ents/Blankslate.test.ts-snapshots/Blankslate-Spacious-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...nts/Blankslate.test.ts-snapshots/Blankslate-Spacious-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
.../Blankslate.test.ts-snapshots/Blankslate-Spacious-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...ots/components/Blankslate.test.ts-snapshots/Blankslate-Spacious-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...nts/Blankslate.test.ts-snapshots/Blankslate-Spacious-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.5 KB
...Blankslate.test.ts-snapshots/Blankslate-Spacious-primer-breakpoint-sm-linux.png
Oops, something went wrong.
Binary file added
BIN
+12.2 KB
...Blankslate.test.ts-snapshots/Blankslate-Spacious-primer-breakpoint-xs-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...s/Blankslate.test.ts-snapshots/Blankslate-With-Border-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.9 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-With-Border-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.9 KB
...lankslate.test.ts-snapshots/Blankslate-With-Border-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...s/components/Blankslate.test.ts-snapshots/Blankslate-With-Border-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...s/Blankslate.test.ts-snapshots/Blankslate-With-Border-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
.../Blankslate.test.ts-snapshots/Blankslate-With-Border-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.9 KB
...ankslate.test.ts-snapshots/Blankslate-With-Border-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
.../components/Blankslate.test.ts-snapshots/Blankslate-With-Border-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
.../Blankslate.test.ts-snapshots/Blankslate-With-Border-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.9 KB
...nkslate.test.ts-snapshots/Blankslate-With-Border-primer-breakpoint-sm-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.4 KB
...late.test.ts-snapshots/Blankslate-With-Primary-Action-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.3 KB
...ankslate.test.ts-snapshots/Blankslate-With-Primary-Action-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.2 KB
...e.test.ts-snapshots/Blankslate-With-Primary-Action-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.5 KB
...ents/Blankslate.test.ts-snapshots/Blankslate-With-Primary-Action-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.4 KB
...late.test.ts-snapshots/Blankslate-With-Primary-Action-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.5 KB
...ate.test.ts-snapshots/Blankslate-With-Primary-Action-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.4 KB
....test.ts-snapshots/Blankslate-With-Primary-Action-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.5 KB
...nts/Blankslate.test.ts-snapshots/Blankslate-With-Primary-Action-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.5 KB
...ate.test.ts-snapshots/Blankslate-With-Primary-Action-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.3 KB
...test.ts-snapshots/Blankslate-With-Primary-Action-primer-breakpoint-sm-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...te.test.ts-snapshots/Blankslate-With-Secondary-Action-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.8 KB
...kslate.test.ts-snapshots/Blankslate-With-Secondary-Action-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.9 KB
...test.ts-snapshots/Blankslate-With-Secondary-Action-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...ts/Blankslate.test.ts-snapshots/Blankslate-With-Secondary-Action-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...te.test.ts-snapshots/Blankslate-With-Secondary-Action-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...e.test.ts-snapshots/Blankslate-With-Secondary-Action-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...est.ts-snapshots/Blankslate-With-Secondary-Action-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...s/Blankslate.test.ts-snapshots/Blankslate-With-Secondary-Action-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...e.test.ts-snapshots/Blankslate-With-Secondary-Action-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.8 KB
...st.ts-snapshots/Blankslate-With-Secondary-Action-primer-breakpoint-sm-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...s/Blankslate.test.ts-snapshots/Blankslate-With-Visual-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...nents/Blankslate.test.ts-snapshots/Blankslate-With-Visual-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...lankslate.test.ts-snapshots/Blankslate-With-Visual-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...s/components/Blankslate.test.ts-snapshots/Blankslate-With-Visual-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
...s/Blankslate.test.ts-snapshots/Blankslate-With-Visual-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
.../Blankslate.test.ts-snapshots/Blankslate-With-Visual-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...ankslate.test.ts-snapshots/Blankslate-With-Visual-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
.../components/Blankslate.test.ts-snapshots/Blankslate-With-Visual-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.6 KB
.../Blankslate.test.ts-snapshots/Blankslate-With-Visual-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.5 KB
...nkslate.test.ts-snapshots/Blankslate-With-Visual-primer-breakpoint-sm-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.04 KB
...shots/components/Button.test.ts-snapshots/Button-Link-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.97 KB
...snapshots/components/Button.test.ts-snapshots/Button-Link-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.09 KB
...ts/components/Button.test.ts-snapshots/Button-Link-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.04 KB
...wright/snapshots/components/Button.test.ts-snapshots/Button-Link-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.04 KB
...shots/components/Button.test.ts-snapshots/Button-Link-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.99 KB
...hots/components/Button.test.ts-snapshots/Button-Link-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.05 KB
...s/components/Button.test.ts-snapshots/Button-Link-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.99 KB
...right/snapshots/components/Button.test.ts-snapshots/Button-Link-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+7.99 KB
...hots/components/Button.test.ts-snapshots/Button-Link-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+41 Bytes
(100%)
...ents/Button.test.ts-snapshots/Button-Trailing-Counter-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-32 Bytes
(100%)
...mponents/Button.test.ts-snapshots/Button-Trailing-Counter-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
+54 Bytes
(100%)
...s/Button.test.ts-snapshots/Button-Trailing-Counter-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+41 Bytes
(100%)
...hots/components/Button.test.ts-snapshots/Button-Trailing-Counter-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+41 Bytes
(100%)
...ents/Button.test.ts-snapshots/Button-Trailing-Counter-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+51 Bytes
(100%)
...nts/Button.test.ts-snapshots/Button-Trailing-Counter-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+56 Bytes
(100%)
.../Button.test.ts-snapshots/Button-Trailing-Counter-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+51 Bytes
(100%)
...ots/components/Button.test.ts-snapshots/Button-Trailing-Counter-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+51 Bytes
(100%)
...nts/Button.test.ts-snapshots/Button-Trailing-Counter-light-tritanopia-linux.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docs/public/**/*.css | ||
**/lib-esm/**/*.css | ||
**/lib/**/*.css | ||
**/dist/**/*.css | ||
**/.next/**/*.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
import {test, expect} from '@playwright/test' | ||
import {visit} from '../test-helpers/storybook' | ||
import {themes} from '../test-helpers/themes' | ||
import {viewports} from '../test-helpers/viewports' | ||
|
||
const stories: Array<{title: string; id: string; viewports?: Array<keyof typeof viewports>}> = [ | ||
{ | ||
title: 'Default', | ||
id: 'drafts-components-blankslate--default', | ||
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'Narrow', | ||
id: 'drafts-components-blankslate-features--narrow', | ||
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'Spacious', | ||
id: 'drafts-components-blankslate-features--spacious', | ||
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'With Border', | ||
id: 'drafts-components-blankslate-features--with-border', | ||
viewports: ['primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'With Primary Action', | ||
id: 'drafts-components-blankslate-features--with-primary-action', | ||
viewports: ['primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'With Secondary Action', | ||
id: 'drafts-components-blankslate-features--with-secondary-action', | ||
viewports: ['primer.breakpoint.sm'], | ||
}, | ||
{ | ||
title: 'With Visual', | ||
id: 'drafts-components-blankslate-features--with-visual', | ||
viewports: ['primer.breakpoint.sm'], | ||
}, | ||
] | ||
|
||
test.describe('Blankslate', () => { | ||
for (const story of stories) { | ||
test.describe(story.title, () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
colorScheme: theme, | ||
featureFlags: { | ||
primer_react_css_modules: true, | ||
}, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`Blankslate.${story.title}.${theme}.png`) | ||
}) | ||
|
||
test('default (styled-components) @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
colorScheme: theme, | ||
featureFlags: { | ||
primer_react_css_modules: false, | ||
}, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`Blankslate.${story.title}.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
colorScheme: theme, | ||
featureFlags: { | ||
primer_react_css_modules: true, | ||
}, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
|
||
test('axe (styled-components) @aat', async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
|
||
if (story.viewports) { | ||
for (const name of story.viewports) { | ||
test(`${name} @vrt`, async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
featureFlags: { | ||
primer_react_css_modules: true, | ||
}, | ||
}, | ||
}) | ||
const width = viewports[name] | ||
|
||
await page.setViewportSize({ | ||
width, | ||
height: 667, | ||
}) | ||
expect(await page.screenshot()).toMatchSnapshot(`Blankslate.${story.title}.${name}.png`) | ||
}) | ||
|
||
test(`${name} (styled-components) @vrt`, async ({page}) => { | ||
await visit(page, { | ||
id: story.id, | ||
globals: { | ||
featureFlags: { | ||
primer_react_css_modules: false, | ||
}, | ||
}, | ||
}) | ||
const width = viewports[name] | ||
|
||
await page.setViewportSize({ | ||
width, | ||
height: 667, | ||
}) | ||
expect(await page.screenshot()).toMatchSnapshot(`Blankslate.${story.title}.${name}.png`) | ||
}) | ||
} | ||
} | ||
}) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.