-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
92 additions
and
55 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,51 @@ | ||
import {test, expect} from '@playwright/test' | ||
// @ts-ignore since this file is generated in the ci to generate this file run npx build storybook in packages/react | ||
import componentsConfig from '../../packages/react/storybook-static/index.json' | ||
import {visit} from '../test-helpers/storybook' | ||
import {themes} from '../test-helpers/themes' | ||
|
||
/** | ||
* These stories should not be tested in the CI because they are stress-tests and | ||
* perform slowly | ||
*/ | ||
const SKIPPED_TESTS = [ | ||
'components-treeview-features--stress-test', | ||
'components-treeview-features--contain-intrinsic-size', | ||
'components-flash-features--with-icon-action-dismiss', // TODO: Remove once color-contrast issues have been resolved | ||
'components-flash-features--with-icon-and-action', // TODO: Remove once color-contrast issues have been resolved | ||
] | ||
|
||
type Component = { | ||
name: string | ||
} | ||
|
||
const {entries} = componentsConfig | ||
|
||
test.describe('@aat', () => { | ||
for (const [id, entry] of Object.entries(entries as Record<string, Component>)) { | ||
if (SKIPPED_TESTS.includes(id)) { | ||
continue | ||
} | ||
|
||
const {name} = entry | ||
// remove parentheses and slashes from the name to avoid playwright file issues | ||
// eslint-disable-next-line no-useless-escape | ||
const cleanedName = name.replaceAll(/[\(\)\/]/g, '') | ||
|
||
test.describe(id, () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test(`${cleanedName} @aat`, async ({page}) => { | ||
await visit(page, { | ||
id, | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
} | ||
}) |
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
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
.HeaderDev { | ||
background-color: var(--label-olive-bgColor-active); | ||
color: var(--color-prettylights-syntax-carriage-return-text); | ||
/* stylelint-disable-next-line primer/no-display-colors */ | ||
background-color: var(--display-pine-bgColor-emphasis); | ||
} | ||
|
||
.HeaderDevItem { | ||
padding-left: var(--base-size-24); | ||
} | ||
|
||
.HeaderDevLink { | ||
color: var(--color-prettylights-syntax-markup-inserted-text); | ||
color: var(--color-prettylights-syntax-carriage-return-text); | ||
} |
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
17 changes: 0 additions & 17 deletions
17
packages/react/src/UnderlineNav/UnderlineNav.dev.stories.tsx
This file was deleted.
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
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