Skip to content

Commit

Permalink
build(storybook): upgrade to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Apr 12, 2024
1 parent 5cc91b2 commit 13d6d5b
Show file tree
Hide file tree
Showing 5 changed files with 2,088 additions and 1,983 deletions.
4 changes: 4 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config: StorybookConfig = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-webpack5-compiler-swc',
],
framework: {
name: '@storybook/react-webpack5',
Expand All @@ -34,6 +35,9 @@ const config: StorybookConfig = {
docs: {
autodocs: 'tag',
},
typescript: {
// reactDocgen: 'react-docgen-typescript',
},
};

export default config;
1 change: 0 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const preview: Preview = {
},
},
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
backgrounds: { disable: true }, // Use colorMode instead
options: {
showPanel: true, // default to showing the controls panel
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
],
"dependencies": {
"@hello-pangea/dnd": "^16.6.0",
"@storybook/test": "^8.0.5",
"@types/lodash": "^4.14.202",
"@types/numeral": "^2.0.5",
"@types/react-window": "^1.8.8",
Expand Down Expand Up @@ -118,13 +119,13 @@
"@emotion/react": "^11.11.0",
"@faker-js/faker": "^8.0.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@storybook/addon-essentials": "^7.5.2",
"@storybook/addon-interactions": "^7.5.2",
"@storybook/addon-links": "^7.5.2",
"@storybook/blocks": "^7.5.2",
"@storybook/react": "^7.5.2",
"@storybook/react-webpack5": "^7.5.2",
"@storybook/testing-library": "^0.2.2",
"@storybook/addon-essentials": "^8.0.5",
"@storybook/addon-interactions": "^8.0.5",
"@storybook/addon-links": "^8.0.5",
"@storybook/addon-webpack5-compiler-swc": "^1.0.2",
"@storybook/blocks": "^8.0.5",
"@storybook/react": "^8.0.5",
"@storybook/react-webpack5": "^8.0.5",
"@svgr/core": "8.0.0",
"@svgr/plugin-jsx": "^8.0.1",
"@svgr/plugin-svgo": "^8.0.1",
Expand Down Expand Up @@ -188,7 +189,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-storybook": "^0.8.0",
"expose-gc": "^1.0.0",
"file-loader": "^6.1.0",
"findup": "^0.1.5",
Expand Down Expand Up @@ -233,7 +234,7 @@
"sass-loader": "^13.2.0",
"shelljs": "^0.8.4",
"start-server-and-test": "^1.11.3",
"storybook": "^7.5.2",
"storybook": "^8.0.5",
"style-loader": "^3.3.1",
"stylelint": "^15.7.0",
"stylelint-config-prettier-scss": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import React from 'react';
import { fireEvent } from '@testing-library/react';
import { fireEvent, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { render, waitForEuiPopoverOpen } from '../../../test/rtl';
import { shouldRenderCustomStyles } from '../../../test/internal';
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('EuiSelectableTemplateSitewide', () => {
).not.toBeInTheDocument();
});

test('toggles the selectable popover for keyboard users', () => {
test('toggles the selectable popover for keyboard users', async () => {
const { getByTestSubject } = render(
<EuiSelectableTemplateSitewide
options={options}
Expand All @@ -179,7 +179,7 @@ describe('EuiSelectableTemplateSitewide', () => {
);
// fireEvent doesn't seem to work: https://github.com/testing-library/user-event/issues/179#issuecomment-1125146667
getByTestSubject('mobilePopoverButton').focus();
userEvent.keyboard('{enter}');
await waitFor(() => userEvent.keyboard('{enter}'));
waitForEuiPopoverOpen();

expect(getByTestSubject('euiSelectableList')).toBeInTheDocument();
Expand Down
Loading

0 comments on commit 13d6d5b

Please sign in to comment.