Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ProgressBar story * Update docs path * Add Playground * Add Features * Enable test * Add e2e tests * Update generated/components.json * Add width when inline * test(e2e): update story ids for ProgressBar * test(vrt): update snapshots --------- Co-authored-by: simurai <simurai@users.noreply.github.com> Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
- Loading branch information
1 parent
fa375f9
commit c67fb24
Showing
82 changed files
with
375 additions
and
41 deletions.
There are no files selected for viewing
Binary file added
BIN
+4.88 KB
...nents/ProgressBar.test.ts-snapshots/ProgressBar-Color-dark-colorblind-linux.png
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
+4.88 KB
...omponents/ProgressBar.test.ts-snapshots/ProgressBar-Color-dark-dimmed-linux.png
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
+4.89 KB
...ts/ProgressBar.test.ts-snapshots/ProgressBar-Color-dark-high-contrast-linux.png
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
+4.88 KB
...shots/components/ProgressBar.test.ts-snapshots/ProgressBar-Color-dark-linux.png
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
+4.88 KB
...nents/ProgressBar.test.ts-snapshots/ProgressBar-Color-dark-tritanopia-linux.png
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
+4.88 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Color-light-colorblind-linux.png
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
+4.89 KB
...s/ProgressBar.test.ts-snapshots/ProgressBar-Color-light-high-contrast-linux.png
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
+4.88 KB
...hots/components/ProgressBar.test.ts-snapshots/ProgressBar-Color-light-linux.png
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
+4.88 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Color-light-tritanopia-linux.png
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
+4.83 KB
...nts/ProgressBar.test.ts-snapshots/ProgressBar-Default-dark-colorblind-linux.png
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
+4.84 KB
...ponents/ProgressBar.test.ts-snapshots/ProgressBar-Default-dark-dimmed-linux.png
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
+4.84 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Default-dark-high-contrast-linux.png
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
+4.83 KB
...ots/components/ProgressBar.test.ts-snapshots/ProgressBar-Default-dark-linux.png
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
+4.83 KB
...nts/ProgressBar.test.ts-snapshots/ProgressBar-Default-dark-tritanopia-linux.png
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
+4.83 KB
...ts/ProgressBar.test.ts-snapshots/ProgressBar-Default-light-colorblind-linux.png
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
+4.84 KB
...ProgressBar.test.ts-snapshots/ProgressBar-Default-light-high-contrast-linux.png
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
+4.83 KB
...ts/components/ProgressBar.test.ts-snapshots/ProgressBar-Default-light-linux.png
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
+4.83 KB
...ts/ProgressBar.test.ts-snapshots/ProgressBar-Default-light-tritanopia-linux.png
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
+4.88 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Inline-dark-colorblind-linux.png
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
+4.87 KB
...mponents/ProgressBar.test.ts-snapshots/ProgressBar-Inline-dark-dimmed-linux.png
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
+4.9 KB
...s/ProgressBar.test.ts-snapshots/ProgressBar-Inline-dark-high-contrast-linux.png
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
+4.86 KB
...hots/components/ProgressBar.test.ts-snapshots/ProgressBar-Inline-dark-linux.png
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
+4.88 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Inline-dark-tritanopia-linux.png
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
+4.89 KB
...nts/ProgressBar.test.ts-snapshots/ProgressBar-Inline-light-colorblind-linux.png
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
+4.9 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Inline-light-high-contrast-linux.png
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
+4.89 KB
...ots/components/ProgressBar.test.ts-snapshots/ProgressBar-Inline-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.89 KB
...nts/ProgressBar.test.ts-snapshots/ProgressBar-Inline-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Done-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.84 KB
...s/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Done-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...essBar.test.ts-snapshots/ProgressBar-Progress-Done-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...mponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Done-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Done-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Done-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.86 KB
...ssBar.test.ts-snapshots/ProgressBar-Progress-Done-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...ponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Done-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Done-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.87 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Half-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.86 KB
...s/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Half-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.89 KB
...essBar.test.ts-snapshots/ProgressBar-Progress-Half-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...mponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Half-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.87 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Half-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Half-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.89 KB
...ssBar.test.ts-snapshots/ProgressBar-Progress-Half-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...ponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Half-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Half-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Zero-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.84 KB
...s/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Zero-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.84 KB
...essBar.test.ts-snapshots/ProgressBar-Progress-Zero-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...mponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Zero-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ogressBar.test.ts-snapshots/ProgressBar-Progress-Zero-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Zero-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.84 KB
...ssBar.test.ts-snapshots/ProgressBar-Progress-Zero-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ponents/ProgressBar.test.ts-snapshots/ProgressBar-Progress-Zero-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...gressBar.test.ts-snapshots/ProgressBar-Progress-Zero-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.87 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.86 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.89 KB
...ogressBar.test.ts-snapshots/ProgressBar-Size-Large-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.86 KB
.../components/ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.87 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.89 KB
...gressBar.test.ts-snapshots/ProgressBar-Size-Large-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...components/ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.88 KB
...ProgressBar.test.ts-snapshots/ProgressBar-Size-Large-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ents/ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...ogressBar.test.ts-snapshots/ProgressBar-Size-Small-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.8 KB
.../components/ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
.../ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.86 KB
...gressBar.test.ts-snapshots/ProgressBar-Size-Small-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.84 KB
...components/ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.83 KB
...ProgressBar.test.ts-snapshots/ProgressBar-Size-Small-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
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,229 @@ | ||
import {test, expect} from '@playwright/test' | ||
import {visit} from '../test-helpers/storybook' | ||
import {themes} from '../test-helpers/themes' | ||
|
||
test.describe('ProgressBar', () => { | ||
test.describe('Default', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar--default', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Default.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar--default', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Progress Zero', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-zero', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Progress Zero.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-zero', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Progress Half', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-half', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Progress Half.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-half', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Progress Done', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-done', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Progress Done.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--progress-done', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Size Small', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--size-small', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Size Small.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--size-small', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Size Large', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--size-large', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Size Large.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--size-large', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Inline', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--inline', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Inline.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--inline', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
await expect(page).toHaveNoViolations() | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
test.describe('Color', () => { | ||
for (const theme of themes) { | ||
test.describe(theme, () => { | ||
test('default @vrt', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--color', | ||
globals: { | ||
colorScheme: theme, | ||
}, | ||
}) | ||
|
||
// Default state | ||
expect(await page.screenshot()).toMatchSnapshot(`ProgressBar.Color.${theme}.png`) | ||
}) | ||
|
||
test('axe @aat', async ({page}) => { | ||
await visit(page, { | ||
id: 'components-progressbar-features--color', | ||
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
File renamed without changes.
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,19 @@ | ||
import React from 'react' | ||
import {ComponentMeta} from '@storybook/react' | ||
import ProgressBar from './ProgressBar' | ||
|
||
export default { | ||
title: 'Components/ProgressBar/Features', | ||
component: ProgressBar, | ||
} as ComponentMeta<typeof ProgressBar> | ||
|
||
export const ProgressZero = () => <ProgressBar progress="0" /> | ||
export const ProgressHalf = () => <ProgressBar progress="50" /> | ||
export const ProgressDone = () => <ProgressBar progress="100" /> | ||
|
||
export const SizeSmall = () => <ProgressBar progress="66" barSize="small" /> | ||
export const SizeLarge = () => <ProgressBar progress="66" barSize="large" /> | ||
|
||
export const Inline = () => <ProgressBar inline progress="66" sx={{width: '100px'}} /> | ||
|
||
export const Color = () => <ProgressBar progress="66" bg="done.emphasis" /> |
Oops, something went wrong.