chore: upgrade storybook 7.6.3 + use @storybook/nextjs (#12673)

* chore: upgrade storybook 7.6.3 + use @storybook/nextjs

* fix: color picker tests
This commit is contained in:
Morgan authored and GitHub committed 2023-12-04 11:06:44 +00:00
1 parent 9a6d4e63e8
commit 80b92b5f11
13 files changed
+112 -83

No files matched your search

@@ -53,6 +53,11 @@ The `Dialog` component is composed of the following components:
<Canvas>
<Story
name="Dialog"
parameters={{
nextjs: {
appDirectory: true,
},
}}
args={{
title: "Example Dialog",
description: "Example Dialog Description",
@@ -1,4 +1,7 @@
import { TooltipProvider } from "@radix-ui/react-tooltip";
import {
Tooltip,
} from "@calcom/ui";
import { Canvas, Meta, Story } from "@storybook/addon-docs";
import {
@@ -46,14 +46,9 @@ describe("Tests for ColorPicker component", () => {
render(<ColorPicker defaultValue={defaultValue} onChange={onChange} />);
const colorInput = screen.getByRole("textbox");
await act(async () => {
userEvent.clear(colorInput);
});
await act(async () => userEvent.clear(colorInput));
const newColorValue = "#00FF00";
await act(async () => {
userEvent.type(colorInput, newColorValue);
});
await act(async () => userEvent.type(colorInput, newColorValue));
expect(screen.getByRole("button", { name: "pick colors" })).toHaveStyle(
`background-color: ${newColorValue}`
);
@@ -27,6 +27,11 @@ To observe the actual step navigation behavior, please refer to the Storybook st
<Canvas>
<Story
parameters={{
nextjs: {
appDirectory: true,
},
}}
name="Basic"
args={{
href: "/wizard",
@@ -22,6 +22,11 @@ Below are the props for `Image uploader`
<Canvas>
<Story
parameters={{
nextjs: {
appDirectory: true,
},
}}
name="ImageUploader"
play={({ canvasElement }) => {
const darkVariantContainer = canvasElement.querySelector("#dark-variant");
@@ -26,7 +26,7 @@ Defines the spacing guide used in Cal.coms design system
<Examples title="Spacing">
<TooltipPrimitive.Provider>
<>
<div className="flex flex-row gap-6">
<Example title="0"></Example>
<Example title="px">
<Tooltip content="1px">
@@ -78,6 +78,6 @@ Defines the spacing guide used in Cal.coms design system
<div className="bg-inverted h-4 w-10 rounded-sm"> </div>
</Tooltip>
</Example>
</>
</div>
</TooltipPrimitive.Provider>
</Examples>