diff --git a/package-lock.json b/package-lock.json index 06e1c3fe8..50b6bbed6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,6 @@ "@storybook/addon-links": "^6.5.3", "@storybook/addon-postcss": "^2.0.0", "@storybook/addons": "^6.5.3", - "@storybook/jest": "^0.0.10", "@storybook/react": "^6.5.3", "@storybook/testing-library": "^0.0.13", "@testing-library/jest-dom": "^5.14.1", @@ -6648,59 +6647,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/@storybook/expect": { - "version": "28.1.3-5", - "resolved": "https://registry.npmjs.org/@storybook/expect/-/expect-28.1.3-5.tgz", - "integrity": "sha512-lS1oJnY1qTAxnH87C765NdfvGhksA6hBcbUVI5CHiSbNsEtr456wtg/z+dT9XlPriq1D5t2SgfNL9dBAoIGyIA==", - "deprecated": "In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.", - "dev": true, - "dependencies": { - "@types/jest": "28.1.3" - } - }, - "node_modules/@storybook/expect/node_modules/@types/jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-Tsbjk8Y2hkBaY/gJsataeb4q9Mubw9EOz7+4RjPkzD5KjTvHHs7cpws22InaoXxAVAhF5HfFbzJjo6oKWqSZLw==", - "dev": true, - "dependencies": { - "jest-matcher-utils": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "node_modules/@storybook/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@storybook/expect/node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@storybook/expect/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true - }, "node_modules/@storybook/instrumenter": { "version": "6.5.16", "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-6.5.16.tgz", @@ -6729,18 +6675,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/@storybook/jest": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/@storybook/jest/-/jest-0.0.10.tgz", - "integrity": "sha512-qeYLIplpcOUQXboJde5pRCjTvkGmF80jEszRUoNYCNcEPfC2sMK68Wq6Ct8EQj3CoEdJqsK54O2YYh+7D9S+ag==", - "dev": true, - "dependencies": { - "@storybook/expect": "storybook-jest", - "@storybook/instrumenter": "^6.4.0", - "@testing-library/jest-dom": "^5.16.2", - "jest-mock": "^27.3.0" - } - }, "node_modules/@storybook/manager-webpack4": { "version": "6.5.16", "resolved": "https://registry.npmjs.org/@storybook/manager-webpack4/-/manager-webpack4-6.5.16.tgz", diff --git a/package.json b/package.json index 0a4316d0a..5e837e4e1 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,6 @@ "@storybook/addon-links": "^6.5.3", "@storybook/addon-postcss": "^2.0.0", "@storybook/addons": "^6.5.3", - "@storybook/jest": "^0.0.10", "@storybook/react": "^6.5.3", "@storybook/testing-library": "^0.0.13", "@testing-library/jest-dom": "^5.14.1", diff --git a/src/modal/modal-stories-components.tsx b/src/modal/modal-stories-components.tsx index 70e13c099..6187b2e90 100644 --- a/src/modal/modal-stories-components.tsx +++ b/src/modal/modal-stories-components.tsx @@ -1,6 +1,5 @@ import { createContext, useCallback, useContext, useMemo, useState } from 'react' import { within, userEvent } from '@storybook/testing-library' -import { expect } from '@storybook/jest' import { Placeholder, times } from '../utils/storybook-helper' import { SelectField } from '../select-field' @@ -246,7 +245,7 @@ function ModalActions(props: WithOptionals) { export async function openModal({ canvasElement }: { canvasElement: HTMLElement }) { const canvas = within(canvasElement) userEvent.click(canvas.getByRole('button', { name: 'Open modal' })) - expect(await canvas.findByRole('dialog')).toBeInTheDocument() + await canvas.findByRole('dialog') } export { Link, ModalStoryStateProvider, ModalOptionsForm, ModalButton as Button, ScrollableContent }