mirror of https://github.com/coder/coder.git
23 lines
634 B
TypeScript
23 lines
634 B
TypeScript
import { CreateTemplateButton } from "./CreateTemplateButton";
|
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
import { userEvent, screen } from "@storybook/test";
|
|
|
|
const meta: Meta<typeof CreateTemplateButton> = {
|
|
title: "pages/TemplatesPage/CreateTemplateButton",
|
|
component: CreateTemplateButton,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof CreateTemplateButton>;
|
|
|
|
export const Close: Story = {};
|
|
|
|
export const Open: Story = {
|
|
play: async ({ step }) => {
|
|
const user = userEvent.setup();
|
|
await step("click on trigger", async () => {
|
|
await user.click(screen.getByRole("button"));
|
|
});
|
|
},
|
|
};
|