Skip to content

Commit

Permalink
chore: migrate to @storybook/test (#1101)
Browse files Browse the repository at this point in the history
* chore: migrate to @storybook/test

* fix: type error
  • Loading branch information
Niznikr authored Dec 7, 2023
1 parent fca2a2f commit 92d3c0f
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@storybook/core-events": "^7.6.3",
"@storybook/react": "^7.6.3",
"@storybook/react-vite": "^7.6.3",
"@storybook/testing-library": "^0.2.0",
"@storybook/test": "^7.6.3",
"@storybook/theming": "^7.6.3",
"@storybook/types": "^7.6.3",
"@testing-library/dom": "^9.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/clipboard/stories/CopyToClipboard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CopyToClipboardHandleRef } from '../src/CopyToClipboard';
import type { StoryObj, StoryFn } from '@storybook/react';

import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';
import { useRef } from 'react';

import { CopyToClipboard } from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/inline-edit/stories/InlineEdit.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CopyToClipboard } from '@launchpad-ui/clipboard';
import { Form, FormField, IconField, TextArea, TextField } from '@launchpad-ui/form';
import { Icon } from '@launchpad-ui/icons';
import { useState } from '@storybook/client-api';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';

import { InlineEdit } from '../src';

Expand Down
2 changes: 1 addition & 1 deletion packages/menu/stories/Menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StoryObj } from '@storybook/react';

import { Icon } from '@launchpad-ui/icons';
import { userEvent } from '@storybook/testing-library';
import { userEvent } from '@storybook/test';

import { Menu, MenuDivider, MenuItem, MenuSearch } from '../src';

Expand Down
2 changes: 1 addition & 1 deletion packages/modal/stories/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from '@launchpad-ui/button';
import { Icon } from '@launchpad-ui/icons';
import { Tooltip } from '@launchpad-ui/tooltip';
import { useState } from '@storybook/client-api';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';
import { useRef } from 'react';

import { REACT_NODE_TYPE_DOCS } from '../../../.storybook/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/popover/stories/Popover.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StoryObj, StoryFn } from '@storybook/react';

import { Button } from '@launchpad-ui/button';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';

import { Popover } from '../src';

Expand Down
2 changes: 1 addition & 1 deletion packages/snackbar/stories/SnackbarCenter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SnackbarRecord, SnackbarProps } from '../src';
import type { StoryObj } from '@storybook/react';

import { Button } from '@launchpad-ui/button';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';
import { useId, useState } from 'react';

import { SnackbarCenter } from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/toast/stories/ToastCenter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ToastRecord, ToastProps } from '../src';
import type { StoryObj } from '@storybook/react';

import { Button } from '@launchpad-ui/button';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';
import { useId, useState } from 'react';

import { ToastCenter } from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/tooltip/stories/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StoryObj, StoryFn } from '@storybook/react';

import { Button } from '@launchpad-ui/button';
import { userEvent, within } from '@storybook/testing-library';
import { userEvent, within } from '@storybook/test';

import { Tooltip } from '../src';

Expand Down
75 changes: 68 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@testing-library/jest-dom/vitest';
import '@testing-library/jest-dom';
import { configure } from '@testing-library/react';
import { vi } from 'vitest';

Expand Down

0 comments on commit 92d3c0f

Please sign in to comment.