Skip to content

Commit

Permalink
refactor: swap storybook/jest for storybook/test
Browse files Browse the repository at this point in the history
  • Loading branch information
booc0mtaco committed Feb 26, 2024
1 parent 2330a68 commit a1925a9
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 1,239 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"@storybook/addon-styling": "^1.3.7",
"@storybook/react": "^7.6.17",
"@storybook/react-webpack5": "^7.6.17",
"@storybook/test": "^7.6.17",
"@storybook/testing-library": "^0.2.2",
"@storybook/testing-react": "^2.0.1",
"@testing-library/jest-dom": "^6.4.2",
Expand Down
12 changes: 6 additions & 6 deletions src/components/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from '@storybook/jest';
import type { StoryObj, Meta } from '@storybook/react';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { expect } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import React from 'react';
import { Select } from './Select';
import Icon from '../Icon';
Expand Down Expand Up @@ -514,16 +514,16 @@ export const LongOptionList: StoryObj = {
await openMenu(playOptions);
await userEvent.keyboard('{ArrowDown}{ArrowDown}{ArrowDown}{ArrowDown}');

await waitFor(async () => {
await expect(selectButton.getAttribute('aria-expanded')).toEqual('true');
});
// await waitFor(async () => {
await expect(selectButton.getAttribute('aria-expanded')).toEqual('true');
// });
},
parameters: {
badges: ['1.2'],
layout: 'centered',
chromatic: { delay: 450 },
},
decorators: [(Story) => <div className="px-3 py-16">{Story()}</div>],
decorators: [(Story) => <div className="p-8 pb-16">{Story()}</div>],
};

/**
Expand Down
Loading

0 comments on commit a1925a9

Please sign in to comment.