feat: upgrade Storybook to version 9 (#17077)
Upgraded from 8.6.15 to 9.1.17 in two steps: - 8.6.15 -> 9.0.0 - 9.0.0 -> 9.1.17 I had to disable `storybook-addon-cookie` since it is not supported for Storybook 9. However, I do intend to upgrade to Storybook 10 when this is merged, so we can replace the aforementioned add-on with this fork specifically created to support Storybook 10 and above: https://www.npmjs.com/package/@storybook-community/storybook-addon-cookie. Additionally, once we upgrade to Version 10 successfully, I will start looking into integrating the official Vitest add-on.
This commit is contained in:
+4
-4
@@ -1,16 +1,16 @@
|
||||
import { useArgs } from '@storybook/preview-api';
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { expect, userEvent, within } from '@storybook/test';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { useArgs } from 'storybook/preview-api';
|
||||
import { expect, userEvent, within } from 'storybook/test';
|
||||
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';
|
||||
import { sleep } from '~/utils/sleep';
|
||||
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import {
|
||||
IconPicker,
|
||||
type IconPickerProps,
|
||||
} from '@/ui/input/components/IconPicker';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
type RenderProps = IconPickerProps;
|
||||
const Render = (args: RenderProps) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { workspaceLogoUrl } from '~/testing/mock-data/users';
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { userEvent, within } from '@storybook/test';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { useState } from 'react';
|
||||
import { userEvent, within } from 'storybook/test';
|
||||
|
||||
import { Select, type SelectProps } from '@/ui/input/components/Select';
|
||||
import { IconPlus } from 'twenty-ui/display';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { Select, type SelectProps } from '@/ui/input/components/Select';
|
||||
|
||||
type RenderProps = SelectProps<string | number | boolean | null>;
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { expect, userEvent, within } from '@storybook/test';
|
||||
import { TextArea, type TextAreaProps } from '@/ui/input/components/TextArea';
|
||||
import { expect, userEvent, within } from 'storybook/test';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
type RenderProps = TextAreaProps;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { useState } from 'react';
|
||||
|
||||
import {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
|
||||
import { TitleInput } from '@/ui/input/components/TitleInput';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { useArgs } from '@storybook/preview-api';
|
||||
import { type Meta, type StoryObj } from '@storybook/react';
|
||||
import { expect, userEvent, within } from '@storybook/test';
|
||||
import { DateTimePicker } from '@/ui/input/components/internal/date/components/DateTimePicker';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { useArgs } from 'storybook/preview-api';
|
||||
import { expect, userEvent, within } from 'storybook/test';
|
||||
import { Temporal } from 'temporal-polyfill';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { DateTimePicker } from '@/ui/input/components/internal/date/components/DateTimePicker';
|
||||
|
||||
const meta: Meta<typeof DateTimePicker> = {
|
||||
title: 'UI/Input/Internal/InternalDatePicker',
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { getHighlightedDates } from '@/ui/input/components/internal/date/utils/getHighlightedDates';
|
||||
import { expect } from '@storybook/test';
|
||||
import { expect } from 'storybook/test';
|
||||
import { Temporal } from 'temporal-polyfill';
|
||||
|
||||
jest.useFakeTimers().setSystemTime(new Date('2024-10-01T00:00:00.000Z'));
|
||||
|
||||
Reference in New Issue
Block a user