-
Notifications
You must be signed in to change notification settings - Fork 33
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
1 parent
72d109f
commit 1480a63
Showing
195 changed files
with
11,568 additions
and
1,722 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,20 @@ | ||
name: 'Storybook Tests' | ||
on: push | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: yarn | ||
- name: Install Playwright | ||
run: npx playwright install --with-deps | ||
- name: Build Storybook | ||
run: yarn build-storybook --quiet | ||
- name: Serve Storybook and run tests | ||
run: | | ||
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | ||
"npx http-server storybook-static --port 6006 --silent" \ | ||
"npx wait-on tcp:6006 && yarn test-storybook" |
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,26 @@ | ||
import { waitForPageReady, TestRunnerConfig } from '@storybook/test-runner'; | ||
|
||
import { toMatchImageSnapshot } from 'jest-image-snapshot'; | ||
|
||
const config: TestRunnerConfig = { | ||
setup() { | ||
expect.extend({ toMatchImageSnapshot }); | ||
}, | ||
async postVisit(page, context) { | ||
const elementHandler = await page.$('#storybook-root'); | ||
const innerHTML = await elementHandler?.innerHTML(); | ||
if (!innerHTML) throw new Error('No innerHTML found'); | ||
expect(innerHTML).toMatchSnapshot(); | ||
|
||
// Waits for the page to be ready before taking a screenshot to ensure consistent results | ||
await waitForPageReady(page); | ||
|
||
// To capture a screenshot for for different browsers, add page.context().browser().browserType().name() to get the browser name to prefix the file name | ||
const image = await page.screenshot(); | ||
expect(image).toMatchImageSnapshot({ | ||
customSnapshotIdentifier: context.id, | ||
}); | ||
}, | ||
}; | ||
|
||
export default config; |
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,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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 |
---|---|---|
|
@@ -14,18 +14,20 @@ | |
"@rollup/plugin-commonjs": "^24.1.0", | ||
"@rollup/plugin-node-resolve": "^15.0.2", | ||
"@rollup/plugin-typescript": "^11.1.0", | ||
"@storybook/addon-actions": "^7.0.2", | ||
"@storybook/addon-essentials": "^7.0.2", | ||
"@storybook/addon-links": "^7.0.2", | ||
"@storybook/addons": "^7.0.2", | ||
"@storybook/blocks": "^7.0.2", | ||
"@storybook/preview-web": "^7.0.2", | ||
"@storybook/react": "^7.0.2", | ||
"@storybook/react-vite": "^7.0.2", | ||
"@storybook/theming": "^7.0.2", | ||
"@storybook/addon-actions": "^7.6.7", | ||
"@storybook/addon-essentials": "^7.6.7", | ||
"@storybook/addon-links": "^7.6.7", | ||
"@storybook/addons": "^7.6.7", | ||
"@storybook/blocks": "^7.6.7", | ||
"@storybook/preview-web": "^7.6.7", | ||
"@storybook/react": "^7.6.7", | ||
"@storybook/react-vite": "^7.6.7", | ||
"@storybook/test-runner": "^0.16.0", | ||
"@storybook/theming": "^7.6.7", | ||
"@types/enzyme": "^3.10.8", | ||
"@types/jest": "^26.0.23", | ||
"@types/jest-axe": "^3.5.1", | ||
"@types/jest-image-snapshot": "^6.4.0", | ||
"@types/node": "^15.0.2", | ||
"@types/react": "16.14.0", | ||
"@types/react-dom": "^16.9.12", | ||
|
@@ -47,6 +49,7 @@ | |
"eslint-plugin-react-hooks": "^4.2.0", | ||
"jest": "^26.6.3", | ||
"jest-axe": "^4.1.0", | ||
"jest-image-snapshot": "^6.4.0", | ||
"nhsuk-frontend": "5.0.0", | ||
"nhsuk-frontend-legacy": "npm:[email protected]", | ||
"prettier": "^2.3.0", | ||
|
@@ -57,7 +60,7 @@ | |
"rollup-plugin-dts": "^5.3.0", | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"sass": "^1.32.12", | ||
"storybook": "^7.0.2", | ||
"storybook": "^7.6.7", | ||
"ts-jest": "^26.5.6", | ||
"ts-node": "^9.1.1", | ||
"typescript": "4.2.4", | ||
|
@@ -82,6 +85,7 @@ | |
"build": "yarn cleanup && yarn build:dist && yarn build:lib", | ||
"test": "jest", | ||
"test:ci": "jest --coverage", | ||
"test:storybook": "test-storybook", | ||
"lint": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}' --fix", | ||
"lint:ci": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}'", | ||
"build-storybook": "storybook build", | ||
|
Binary file added
BIN
+6.59 KB
.../Components/__image_snapshots__/components-actionlink--open-link-in-new-tab.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
+6.59 KB
stories/Components/__image_snapshots__/components-actionlink--standard-link.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
+5.9 KB
...es/Components/__image_snapshots__/components-backlink--open-in-new-tab-link.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
+5.9 KB
stories/Components/__image_snapshots__/components-backlink--standard-link.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
+9.24 KB
...s/Components/__image_snapshots__/components-breadcrumb--override-aria-label.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
+9.24 KB
stories/Components/__image_snapshots__/components-breadcrumb--standard.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
+7.75 KB
stories/Components/__image_snapshots__/components-button--disabled.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
+8.19 KB
stories/Components/__image_snapshots__/components-button--force-anchor.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
+8.37 KB
stories/Components/__image_snapshots__/components-button--force-button.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
+7.42 KB
stories/Components/__image_snapshots__/components-button--link-button.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
+7.33 KB
stories/Components/__image_snapshots__/components-button--primary.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
+7.83 KB
stories/Components/__image_snapshots__/components-button--reverse.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
+8.52 KB
stories/Components/__image_snapshots__/components-button--secondary.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
+61.7 KB
stories/Components/__image_snapshots__/components-card--card-group.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
+942 KB
stories/Components/__image_snapshots__/components-card--card-with-image.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
+21.8 KB
stories/Components/__image_snapshots__/components-card--clickable-card.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.8 KB
stories/Components/__image_snapshots__/components-card--feature-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
+49 KB
stories/Components/__image_snapshots__/components-carecard--immediate.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
+36.3 KB
stories/Components/__image_snapshots__/components-carecard--non-urgent.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
+64.5 KB
stories/Components/__image_snapshots__/components-carecard--urgent.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
+51.5 KB
...s/__image_snapshots__/components-carecard--with-custom-visually-hidden-text.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
+51.5 KB
...nents/__image_snapshots__/components-carecard--without-visually-hidden-text.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.6 KB
stories/Components/__image_snapshots__/components-checkboxes--standard.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
+34 KB
...ponents/__image_snapshots__/components-checkboxes--with-conditional-content.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
+9.05 KB
...es/Components/__image_snapshots__/components-checkboxes--with-disabled-item.png
Oops, something went wrong.
Binary file added
BIN
+45.6 KB
...es/Components/__image_snapshots__/components-checkboxes--with-error-boolean.png
Oops, something went wrong.
Binary file added
BIN
+52.8 KB
...ies/Components/__image_snapshots__/components-checkboxes--with-error-string.png
Oops, something went wrong.
Binary file added
BIN
+56.7 KB
stories/Components/__image_snapshots__/components-checkboxes--with-hint-text.png
Oops, something went wrong.
Binary file added
BIN
+42.8 KB
...ents/__image_snapshots__/components-checkboxes--with-legend-as-page-heading.png
Oops, something went wrong.
Binary file added
BIN
+19.9 KB
stories/Components/__image_snapshots__/components-contentslist--standard.png
Oops, something went wrong.
Binary file added
BIN
+19 KB
stories/Components/__image_snapshots__/components-details--expander-group.png
Oops, something went wrong.
Binary file added
BIN
+9.35 KB
stories/Components/__image_snapshots__/components-details--expander.png
Oops, something went wrong.
Binary file added
BIN
+10.9 KB
stories/Components/__image_snapshots__/components-details--standard.png
Oops, something went wrong.
Binary file added
BIN
+45 KB
...es/Components/__image_snapshots__/components-dodontlist--custom-prefix-text.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+35.8 KB
stories/Components/__image_snapshots__/components-dodontlist--dont.png
Oops, something went wrong.
Binary file added
BIN
+11.7 KB
...ts/__image_snapshots__/components-errormessage--custom-visually-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+11.7 KB
...onents/__image_snapshots__/components-errormessage--no-visually-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+11.7 KB
stories/Components/__image_snapshots__/components-errormessage--standard.png
Oops, something went wrong.
Binary file added
BIN
+27 KB
stories/Components/__image_snapshots__/components-errorsummary--standard.png
Oops, something went wrong.
Binary file added
BIN
+16.6 KB
stories/Components/__image_snapshots__/components-fieldset--as-a-page-heading.png
Oops, something went wrong.
Binary file added
BIN
+9.26 KB
stories/Components/__image_snapshots__/components-fieldset--standard.png
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
...Components/__image_snapshots__/components-fieldset--with-custom-legend-size.png
Oops, something went wrong.
Binary file added
BIN
+15.3 KB
stories/Components/__image_snapshots__/components-footer--standard.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+17.2 KB
stories/Components/__image_snapshots__/components-header--basic-header.png
Oops, something went wrong.
Binary file added
BIN
+24.6 KB
..._image_snapshots__/components-header--header-with-custom-nav-item-component.png
Oops, something went wrong.
Binary file added
BIN
+26.4 KB
...nents-header--header-with-custom-nav-menu-close-and-nav-item-list-component.png
Oops, something went wrong.
Binary file added
BIN
+6.42 KB
stories/Components/__image_snapshots__/components-header--header-with-logo.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...es/Components/__image_snapshots__/components-header--header-with-navigation.png
Oops, something went wrong.
Binary file added
BIN
+8.79 KB
stories/Components/__image_snapshots__/components-header--header-with-search.png
Oops, something went wrong.
Binary file added
BIN
+28.4 KB
...mage_snapshots__/components-header--organisational-header-with-white-header.png
Oops, something went wrong.
Binary file added
BIN
+28.8 KB
...ies/Components/__image_snapshots__/components-header--organisational-header.png
Oops, something went wrong.
Binary file added
BIN
+10.4 KB
...image_snapshots__/components-header--transactional-header-with-service-name.png
Oops, something went wrong.
Binary file added
BIN
+6.2 KB
stories/Components/__image_snapshots__/components-header--transactional-header.png
Oops, something went wrong.
Binary file added
BIN
+23.6 KB
...mponents/__image_snapshots__/components-hero--hero-with-heading-and-content.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...ts/__image_snapshots__/components-hero--hero-with-image-heading-and-content.png
Oops, something went wrong.
Binary file added
BIN
+488 KB
stories/Components/__image_snapshots__/components-hero--hero-with-image-only.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+5.36 KB
stories/Components/__image_snapshots__/components-icons--arrow-left.png
Oops, something went wrong.
Binary file added
BIN
+5.69 KB
stories/Components/__image_snapshots__/components-icons--arrow-right-circle.png
Oops, something went wrong.
Binary file added
BIN
+5.38 KB
stories/Components/__image_snapshots__/components-icons--arrow-right.png
Oops, something went wrong.
Binary file added
BIN
+5.39 KB
stories/Components/__image_snapshots__/components-icons--chevron-left.png
Oops, something went wrong.
Binary file added
BIN
+5.37 KB
stories/Components/__image_snapshots__/components-icons--chevron-right.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+5.26 KB
stories/Components/__image_snapshots__/components-icons--small-emdash.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+585 KB
stories/Components/__image_snapshots__/components-images--image-with-caption.png
Oops, something went wrong.
Binary file added
BIN
+581 KB
...ies/Components/__image_snapshots__/components-images--image-without-caption.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+22.6 KB
stories/Components/__image_snapshots__/components-input--with-error-boolean.png
Oops, something went wrong.
Binary file added
BIN
+27.1 KB
stories/Components/__image_snapshots__/components-input--with-error-string.png
Oops, something went wrong.
Binary file added
BIN
+22.5 KB
stories/Components/__image_snapshots__/components-input--with-hint-text.png
Oops, something went wrong.
Binary file added
BIN
+22.5 KB
stories/Components/__image_snapshots__/components-input--with-width-modifier.png
Oops, something went wrong.
Binary file added
BIN
+16.9 KB
stories/Components/__image_snapshots__/components-insettext--standard.png
Oops, something went wrong.
Binary file added
BIN
+16.9 KB
...omponents/__image_snapshots__/components-insettext--with-custom-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+16.9 KB
...ponents/__image_snapshots__/components-insettext--with-disabled-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+9.75 KB
stories/Components/__image_snapshots__/components-label--bold-label.png
Oops, something went wrong.
Binary file added
BIN
+11.1 KB
stories/Components/__image_snapshots__/components-label--custom-size-label.png
Oops, something went wrong.
Binary file added
BIN
+16 KB
stories/Components/__image_snapshots__/components-label--page-heading-label.png
Oops, something went wrong.
Binary file added
BIN
+9.99 KB
stories/Components/__image_snapshots__/components-label--standard.png
Oops, something went wrong.
Binary file added
BIN
+30.1 KB
stories/Components/__image_snapshots__/components-listpanel--standard.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+13.4 KB
...mponents/__image_snapshots__/components-navaz--using-a-combination-of-props.png
Oops, something went wrong.
Binary file added
BIN
+14.2 KB
...napshots__/components-navaz--using-full-alphabet-prop-with-disabled-letters.png
Oops, something went wrong.
Binary file added
BIN
+13 KB
...snapshots__/components-navaz--using-full-alphabet-prop-with-removed-letters.png
Oops, something went wrong.
Binary file added
BIN
+14.1 KB
...s/Components/__image_snapshots__/components-navaz--using-full-alphabet-prop.png
Oops, something went wrong.
Binary file added
BIN
+6.78 KB
...s/Components/__image_snapshots__/components-navaz--using-individual-letters.png
Oops, something went wrong.
Binary file added
BIN
+13 KB
stories/Components/__image_snapshots__/components-pagination--standard.png
Oops, something went wrong.
Binary file added
BIN
+24.8 KB
stories/Components/__image_snapshots__/components-radios--disabled-radios.png
Oops, something went wrong.
Binary file added
BIN
+24.1 KB
stories/Components/__image_snapshots__/components-radios--inline-radios.png
Oops, something went wrong.
Binary file added
BIN
+26.2 KB
...ies/Components/__image_snapshots__/components-radios--radios-with-a-divider.png
Oops, something went wrong.
Binary file added
BIN
+27 KB
...ents/__image_snapshots__/components-radios--radios-with-conditional-content.png
Oops, something went wrong.
Binary file added
BIN
+28 KB
...Components/__image_snapshots__/components-radios--radios-with-error-boolean.png
Oops, something went wrong.
Binary file added
BIN
+33.5 KB
.../Components/__image_snapshots__/components-radios--radios-with-error-string.png
Oops, something went wrong.
Binary file added
BIN
+51.4 KB
...omponents/__image_snapshots__/components-radios--radios-with-hints-on-items.png
Oops, something went wrong.
Binary file added
BIN
+13 KB
...s/Components/__image_snapshots__/components-radios--radios-without-fieldset.png
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
stories/Components/__image_snapshots__/components-radios--standard-radios.png
Oops, something went wrong.
Binary file added
BIN
+15.9 KB
...Components/__image_snapshots__/components-select--select-with-error-boolean.png
Oops, something went wrong.
Binary file added
BIN
+21.4 KB
.../Components/__image_snapshots__/components-select--select-with-error-string.png
Oops, something went wrong.
Binary file added
BIN
+16.5 KB
...ies/Components/__image_snapshots__/components-select--select-with-hint-text.png
Oops, something went wrong.
Binary file added
BIN
+13.6 KB
stories/Components/__image_snapshots__/components-select--standard.png
Oops, something went wrong.
Binary file added
BIN
+11.1 KB
..._snapshots__/components-skiplink--skip-link-with-default-behaviour-disabled.png
Oops, something went wrong.
Binary file added
BIN
+11.1 KB
stories/Components/__image_snapshots__/components-skiplink--standard.png
Oops, something went wrong.
Binary file added
BIN
+41.7 KB
stories/Components/__image_snapshots__/components-summarylist--standard.png
Oops, something went wrong.
Binary file added
BIN
+34.3 KB
...ts/__image_snapshots__/components-summarylist--summary-list-without-actions.png
Oops, something went wrong.
Binary file added
BIN
+34.2 KB
...nts/__image_snapshots__/components-summarylist--summary-list-without-border.png
Oops, something went wrong.
Binary file added
BIN
+25.9 KB
stories/Components/__image_snapshots__/components-table--numeric-cells.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
stories/Components/__image_snapshots__/components-table--responsive-table.png
Oops, something went wrong.
Binary file added
BIN
+27.2 KB
stories/Components/__image_snapshots__/components-table--standard-table.png
Oops, something went wrong.
Binary file added
BIN
+34.2 KB
stories/Components/__image_snapshots__/components-table--table-panel.png
Oops, something went wrong.
Binary file added
BIN
+21.4 KB
stories/Components/__image_snapshots__/components-tag--all-colours.png
Oops, something went wrong.
Binary file added
BIN
+7.24 KB
stories/Components/__image_snapshots__/components-tag--standard-tag.png
Oops, something went wrong.
Binary file added
BIN
+21.1 KB
stories/Components/__image_snapshots__/components-textarea--standard.png
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
...mage_snapshots__/components-textarea--textarea-with-auto-complete-attribute.png
Oops, something went wrong.
Binary file added
BIN
+16.3 KB
...onents/__image_snapshots__/components-textarea--textarea-with-error-boolean.png
Oops, something went wrong.
Binary file added
BIN
+25.2 KB
...ponents/__image_snapshots__/components-textarea--textarea-with-error-string.png
Oops, something went wrong.
Binary file added
BIN
+24.5 KB
...nts/__image_snapshots__/components-warningcallout--standard-warning-callout.png
Oops, something went wrong.
Binary file added
BIN
+24.5 KB
...components-warningcallout--warning-callout-with-custom-visually-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+24.5 KB
...mponents-warningcallout--warning-callout-with-disabled-visually-hidden-text.png
Oops, something went wrong.
Binary file added
BIN
+19.7 KB
..._image_snapshots__/components-warningcallout--warning-callout-without-label.png
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
stories/Components/__snapshots__/ActionLink.stories.tsx.snap
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,55 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Components/ActionLink OpenLinkInNewTab smoke-test 1`] = ` | ||
<div class="nhsuk-action-link"> | ||
<a class="nhsuk-action-link__link" | ||
href="#" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<svg class="nhsuk-icon nhsuk-icon__arrow-right-circle" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewbox="0 0 24 24" | ||
aria-hidden="true" | ||
height="36" | ||
width="36" | ||
> | ||
<path d="M0 0h24v24H0z" | ||
fill="none" | ||
> | ||
</path> | ||
<path d="M12 2a10 10 0 0 0-9.95 9h11.64L9.74 7.05a1 1 0 0 1 1.41-1.41l5.66 5.65a1 1 0 0 1 0 1.42l-5.66 5.65a1 1 0 0 1-1.41 0 1 1 0 0 1 0-1.41L13.69 13H2.05A10 10 0 1 0 12 2z"> | ||
</path> | ||
</svg> | ||
<span class="nhsuk-action-link__text"> | ||
Link | ||
</span> | ||
</a> | ||
</div> | ||
`; | ||
|
||
exports[`Components/ActionLink StandardLink smoke-test 1`] = ` | ||
<div class="nhsuk-action-link"> | ||
<a class="nhsuk-action-link__link" | ||
href="#" | ||
> | ||
<svg class="nhsuk-icon nhsuk-icon__arrow-right-circle" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewbox="0 0 24 24" | ||
aria-hidden="true" | ||
height="36" | ||
width="36" | ||
> | ||
<path d="M0 0h24v24H0z" | ||
fill="none" | ||
> | ||
</path> | ||
<path d="M12 2a10 10 0 0 0-9.95 9h11.64L9.74 7.05a1 1 0 0 1 1.41-1.41l5.66 5.65a1 1 0 0 1 0 1.42l-5.66 5.65a1 1 0 0 1-1.41 0 1 1 0 0 1 0-1.41L13.69 13H2.05A10 10 0 1 0 12 2z"> | ||
</path> | ||
</svg> | ||
<span class="nhsuk-action-link__text"> | ||
Link | ||
</span> | ||
</a> | ||
</div> | ||
`; |
43 changes: 43 additions & 0 deletions
43
stories/Components/__snapshots__/BackLink.stories.tsx.snap
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,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Components/BackLink OpenInNewTabLink smoke-test 1`] = ` | ||
<div class="nhsuk-back-link"> | ||
<a class="nhsuk-back-link__link" | ||
href="/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<svg class="nhsuk-icon nhsuk-icon__chevron-left" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewbox="0 0 24 24" | ||
aria-hidden="true" | ||
height="24" | ||
width="24" | ||
> | ||
<path d="M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"> | ||
</path> | ||
</svg> | ||
Link | ||
</a> | ||
</div> | ||
`; | ||
|
||
exports[`Components/BackLink StandardLink smoke-test 1`] = ` | ||
<div class="nhsuk-back-link"> | ||
<a class="nhsuk-back-link__link" | ||
href="/" | ||
> | ||
<svg class="nhsuk-icon nhsuk-icon__chevron-left" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewbox="0 0 24 24" | ||
aria-hidden="true" | ||
height="24" | ||
width="24" | ||
> | ||
<path d="M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"> | ||
</path> | ||
</svg> | ||
Link | ||
</a> | ||
</div> | ||
`; |
79 changes: 79 additions & 0 deletions
79
stories/Components/__snapshots__/Breadcrumb.stories.tsx.snap
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,79 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Components/Breadcrumb OverrideAriaLabel smoke-test 1`] = ` | ||
<nav class="nhsuk-breadcrumb" | ||
aria-label="custom-aria-label" | ||
> | ||
<div class="nhsuk-width-container"> | ||
<ol class="nhsuk-breadcrumb__list"> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/one" | ||
> | ||
Level One | ||
</a> | ||
</li> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/two" | ||
> | ||
Level Two | ||
</a> | ||
</li> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/three" | ||
> | ||
Level Three | ||
</a> | ||
</li> | ||
</ol> | ||
<p class="nhsuk-breadcrumb__back"> | ||
<a class="nhsuk-breadcrumb__backlink" | ||
href="/level/three" | ||
> | ||
Back to Level Three | ||
</a> | ||
</p> | ||
</div> | ||
</nav> | ||
`; | ||
|
||
exports[`Components/Breadcrumb Standard smoke-test 1`] = ` | ||
<nav class="nhsuk-breadcrumb" | ||
aria-label="Breadcrumb" | ||
> | ||
<div class="nhsuk-width-container"> | ||
<ol class="nhsuk-breadcrumb__list"> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/one" | ||
> | ||
Level One | ||
</a> | ||
</li> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/two" | ||
> | ||
Level Two | ||
</a> | ||
</li> | ||
<li class="nhsuk-breadcrumb__item"> | ||
<a class="nhsuk-breadcrumb__link" | ||
href="/level/three" | ||
> | ||
Level Three | ||
</a> | ||
</li> | ||
</ol> | ||
<p class="nhsuk-breadcrumb__back"> | ||
<a class="nhsuk-breadcrumb__backlink" | ||
href="/level/three" | ||
> | ||
Back to Level Three | ||
</a> | ||
</p> | ||
</div> | ||
</nav> | ||
`; |
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,68 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Components/Button Disabled smoke-test 1`] = ` | ||
<button class="nhsuk-button nhsuk-button--disabled" | ||
disabled | ||
aria-disabled="true" | ||
type="submit" | ||
> | ||
Disabled | ||
</button> | ||
`; | ||
|
||
exports[`Components/Button ForceAnchor smoke-test 1`] = ` | ||
<a class="nhsuk-button" | ||
role="button" | ||
aria-disabled="false" | ||
draggable="false" | ||
> | ||
As an Anchor | ||
</a> | ||
`; | ||
|
||
exports[`Components/Button ForceButton smoke-test 1`] = ` | ||
<button class="nhsuk-button" | ||
aria-disabled="false" | ||
type="submit" | ||
> | ||
As a Button | ||
</button> | ||
`; | ||
|
||
exports[`Components/Button LinkButton smoke-test 1`] = ` | ||
<a class="nhsuk-button" | ||
role="button" | ||
aria-disabled="false" | ||
draggable="false" | ||
href="/" | ||
> | ||
As a Link | ||
</a> | ||
`; | ||
|
||
exports[`Components/Button Primary smoke-test 1`] = ` | ||
<button class="nhsuk-button" | ||
aria-disabled="false" | ||
type="submit" | ||
> | ||
Primary | ||
</button> | ||
`; | ||
|
||
exports[`Components/Button Reverse smoke-test 1`] = ` | ||
<button class="nhsuk-button nhsuk-button--reverse" | ||
aria-disabled="false" | ||
type="submit" | ||
> | ||
Reverse | ||
</button> | ||
`; | ||
|
||
exports[`Components/Button Secondary smoke-test 1`] = ` | ||
<button class="nhsuk-button nhsuk-button--secondary" | ||
aria-disabled="false" | ||
type="submit" | ||
> | ||
Secondary | ||
</button> | ||
`; |
Oops, something went wrong.