Skip to content

Commit

Permalink
use new play feature
Browse files Browse the repository at this point in the history
- bump TS
  • Loading branch information
andrewHEguardian committed Oct 25, 2023
1 parent 4cfe6ff commit 3ae9544
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
11 changes: 8 additions & 3 deletions client/components/mma/shared/CallCentrePrompt.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { userEvent, within } from '@storybook/testing-library';
import { CallCentrePrompt } from './CallCentrePrompt';

export default {
Expand All @@ -7,6 +8,10 @@ export default {

export const Default = {};

// export const Expanded = {
// play:
// }
export const Expanded = {
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
const canvas = within(canvasElement);
const buttonLink = canvas.getByText('call our customer support team');
await userEvent.click(buttonLink);
},
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"react-test-renderer": "18.2.0",
"storybook": "7.5.0",
"ts-jest": "29.1.1",
"typescript": "4.4.4",
"typescript": "4.5",
"utility-types": "3.10.0",
"uuid": "8.3.2",
"webpack": "5.76.0",
Expand All @@ -152,6 +152,7 @@
"@guardian/source-react-components-development-kitchen": "14.0.2",
"@sentry/browser": "5.22.3",
"@sentry/node": "5.22.3",
"@storybook/testing-library": "0.2.2",
"@stripe/react-stripe-js": "1.16.5",
"@stripe/stripe-js": "1.52.1",
"aws-sdk": "2.814.0",
Expand Down
24 changes: 19 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3635,6 +3635,15 @@
fs-extra "^11.1.0"
read-pkg-up "^7.0.1"

"@storybook/testing-library@0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@storybook/testing-library/-/testing-library-0.2.2.tgz#c8e089cc8d7354f6066fdb580fae3eedf568aa7c"
integrity sha512-L8sXFJUHmrlyU2BsWWZGuAjv39Jl1uAqUHdxmN42JY15M4+XCMjGlArdCCjDe1wpTSW6USYISA9axjZojgtvnw==
dependencies:
"@testing-library/dom" "^9.0.0"
"@testing-library/user-event" "^14.4.0"
ts-dedent "^2.2.0"

"@storybook/theming@7.5.0":
version "7.5.0"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-7.5.0.tgz#b48b774c5d4f55f234205cd1cb9b8e0127575b7b"
Expand Down Expand Up @@ -3812,6 +3821,11 @@
"@babel/runtime" "^7.12.5"
"@testing-library/dom" "^8.0.0"

"@testing-library/user-event@^14.4.0":
version "14.5.1"
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.1.tgz#27337d72046d5236b32fd977edee3f74c71d332f"
integrity sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==

"@tootallnate/once@2":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
Expand Down Expand Up @@ -14262,7 +14276,7 @@ triple-beam@^1.3.0:
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9"
integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==

ts-dedent@^2.0.0:
ts-dedent@^2.0.0, ts-dedent@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5"
integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==
Expand Down Expand Up @@ -14436,10 +14450,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==

typescript@4.4.4:
version "4.4.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==
typescript@4.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==

ua-parser-js@1.0.34:
version "1.0.34"
Expand Down

0 comments on commit 3ae9544

Please sign in to comment.