Skip to content

Commit

Permalink
fix: remove testing library addon and use unified testing package for…
Browse files Browse the repository at this point in the history
… storybook (#1121)
  • Loading branch information
spaenleh authored Nov 26, 2024
1 parent d059c67 commit ee588d1
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 181 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"@storybook/react": "8.4.5",
"@storybook/react-vite": "8.4.5",
"@storybook/test-runner": "0.19.1",
"@storybook/testing-library": "0.2.2",
"@tanstack/react-query": "5.61.0",
"@testing-library/react": "16.0.1",
"@testing-library/user-event": "14.5.2",
Expand Down
3 changes: 1 addition & 2 deletions src/ItemFlag/ItemFlagDialog.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { screen, userEvent, within } from '@storybook/testing-library';
import { expect, fn, screen, userEvent, within } from '@storybook/test';

import { FlagType } from '@graasp/sdk';

Expand Down
3 changes: 1 addition & 2 deletions src/MainMenu/MenuItem/MenuItem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';
import { SparklesIcon } from 'lucide-react';

import { TABLE_CATEGORIES } from '../../utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/Navigation/Navigation.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, within } from '@storybook/test';
import { CogIcon } from 'lucide-react';

import { BrowserRouter } from 'react-router-dom';
Expand Down
3 changes: 1 addition & 2 deletions src/PlatformSwitch/PlatformSwitch.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, userEvent, within } from '@storybook/test';
import type { BoundFunctions } from '@testing-library/dom';
import { queries } from '@testing-library/dom';
import { Snowflake } from 'lucide-react';
Expand Down
3 changes: 1 addition & 2 deletions src/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, within } from '@storybook/test';

import { TABLE_CATEGORIES } from '../utils/storybook.js';
import Select from './Select.js';
Expand Down
3 changes: 1 addition & 2 deletions src/Tree/Breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Meta, type StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';
import { Home } from 'lucide-react';

import { TABLE_CATEGORIES } from '@/utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/Tree/RowMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Meta, type StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { TABLE_CATEGORIES } from '@/utils/storybook.js';

Expand Down
3 changes: 1 addition & 2 deletions src/Tree/RowMenus.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Meta, type StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { Box } from '@mui/material';

Expand Down
3 changes: 1 addition & 2 deletions src/UserSwitch/UserSwitch.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { screen, userEvent, within } from '@storybook/testing-library';
import { expect, screen, userEvent, within } from '@storybook/test';

import { AccountType } from '@graasp/sdk';

Expand Down
3 changes: 1 addition & 2 deletions src/UserSwitch/UserSwitchWrapper.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { screen, userEvent, within } from '@storybook/testing-library';
import { expect, screen, userEvent, within } from '@storybook/test';

import {
GuestFactory,
Expand Down
3 changes: 1 addition & 2 deletions src/buttons/BookmarkButton/BookmarkButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton, ColorVariants } from '@/types.js';

Expand Down
3 changes: 1 addition & 2 deletions src/buttons/ChatboxButton/ChatboxButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton } from '../../types.js';
import { TABLE_CATEGORIES } from '../../utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/buttons/DownloadButton/DownloadButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton, ColorVariants } from '../../types.js';
import { TABLE_CATEGORIES } from '../../utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/buttons/EditButton/EditButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton } from '@/types.js';
import { TABLE_CATEGORIES } from '@/utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/buttons/PinButton/PinButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton, ColorVariants } from '@/types.js';
import { TABLE_CATEGORIES } from '@/utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/buttons/ShareButton/ShareButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ActionButton } from '@/types.js';
import { TABLE_CATEGORIES } from '@/utils/storybook.js';
Expand Down
3 changes: 1 addition & 2 deletions src/itemLogin/ItemLoginScreen.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { expect, fn, userEvent, within } from '@storybook/test';

import { ItemLoginSchemaType, PackedDocumentItemFactory } from '@graasp/sdk';

Expand Down
3 changes: 1 addition & 2 deletions src/itemLogin/ItemLoginWrapper.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, fn, within } from '@storybook/test';
import { StatusCodes } from 'http-status-codes';
import { v4 } from 'uuid';

Expand Down
3 changes: 1 addition & 2 deletions src/items/AppItem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, within } from '@storybook/test';

import {
AppItemFactory,
Expand Down
3 changes: 1 addition & 2 deletions src/upload/FileDropper/FileDropper.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, fn, within } from '@storybook/test';

import { Box } from '@mui/material';

Expand Down
3 changes: 1 addition & 2 deletions src/upload/UploadFileButton/UploadFileButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect } from '@storybook/test';
import { within } from '@storybook/testing-library';
import { expect, within } from '@storybook/test';
import { FileBox } from 'lucide-react';

import { TABLE_CATEGORIES } from '@/utils/storybook.js';
Expand Down
Loading

0 comments on commit ee588d1

Please sign in to comment.