Skip to content

Commit

Permalink
Storybook updates (#68)
Browse files Browse the repository at this point in the history
* Update Storybook and use new test library

* Remove test parameter from build

* Edit Storybook config
  • Loading branch information
ahosgood authored Dec 26, 2023
1 parent d47bd3d commit 2132841
Show file tree
Hide file tree
Showing 10 changed files with 937 additions and 376 deletions.
2 changes: 1 addition & 1 deletion .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
run: mkdir temp && npm run validatehtml
shell: bash
- name: Build Storybook
run: npm run build
run: npm run build --test
shell: bash
- name: Start Storybook
run: npm start &
Expand Down
1,269 changes: 919 additions & 350 deletions package-lock.json

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,16 @@
"@babel/preset-env": "^7.23.2",
"@chromaui/addon-visual-tests": "^0.0.124",
"@mdx-js/react": "^3.0.0",
"@storybook/addon-a11y": "^7.6.4",
"@storybook/addon-docs": "^7.6.4",
"@storybook/addon-essentials": "^7.6.4",
"@storybook/addon-interactions": "^7.6.4",
"@storybook/addon-links": "^7.6.4",
"@storybook/addon-mdx-gfm": "^7.6.4",
"@storybook/html": "^7.6.4",
"@storybook/html-webpack5": "^7.6.4",
"@storybook/jest": "^0.2.3",
"@storybook/addon-a11y": "^7.6.6",
"@storybook/addon-docs": "^7.6.6",
"@storybook/addon-essentials": "^7.6.6",
"@storybook/addon-interactions": "^7.6.6",
"@storybook/addon-links": "^7.6.6",
"@storybook/addon-mdx-gfm": "^7.6.6",
"@storybook/html": "^7.6.6",
"@storybook/html-webpack5": "^7.6.6",
"@storybook/test": "^8.0.0-alpha.5",
"@storybook/test-runner": "^0.16.0",
"@storybook/testing-library": "^0.2.2",
"axe-playwright": "^1.2.3",
"babel-jest": "^29.7.0",
"babel-loader": "^9.0.1",
Expand All @@ -72,7 +71,7 @@
"sass": "^1.69.4",
"sass-loader": "^13.0.2",
"simple-nunjucks-loader": "^3.2.0",
"storybook": "^7.6.4",
"storybook": "^7.6.6",
"style-loader": "^3.3.1",
"stylelint": "^16.0.2",
"stylelint-config-standard-scss": "^12.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Breadcrumbs from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";
import { customViewports } from "../../../../.storybook/viewports";

const argTypes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import CookieBanner from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";
import Cookies from "../../lib/cookies.mjs";

const argTypes = {
Expand Down
3 changes: 1 addition & 2 deletions src/nationalarchives/components/header/header.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Header from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";
import { customViewports } from "../../../../.storybook/viewports";

const argTypes = {
Expand Down
3 changes: 1 addition & 2 deletions src/nationalarchives/components/hero/hero.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Hero from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";
import { customViewports } from "../../../../.storybook/viewports";

const argTypes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import SensitiveImage from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";

const argTypes = {
src: { control: "text" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import SkipLink from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";

const argTypes = {
text: { control: "text" },
Expand Down
3 changes: 1 addition & 2 deletions src/nationalarchives/components/tabs/tabs.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Tabs from "./template.njk";
import macroOptions from "./macro-options.json";
import { expect } from "@storybook/jest";
import { within, userEvent } from "@storybook/testing-library";
import { within, userEvent, expect } from "@storybook/test";

const argTypes = {
items: { control: "object" },
Expand Down

0 comments on commit 2132841

Please sign in to comment.