Skip to content

refactor: add modules/templates and modules/workspaces #11947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: move some things to modules/templates and modules/workspaces
  • Loading branch information
aslilac committed Jan 30, 2024
commit f203740f9c9167e75e94e51dcc67be498859d9f7
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { TemplateExampleCard } from "./TemplateExampleCard";

const meta: Meta<typeof TemplateExampleCard> = {
title: "components/TemplateExampleCard",
title: "modules/templates/TemplateExampleCard",
parameters: { chromatic },
component: TemplateExampleCard,
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { action } from "@storybook/addon-actions";
import type { Meta, StoryObj } from "@storybook/react";
import { expect, userEvent, waitFor, within } from "@storybook/test";
import { MockTemplateVersion, MockTemplate } from "testHelpers/entities";
import { WorkspaceOutdatedTooltip } from "./WorkspaceOutdatedTooltip";

Expand All @@ -24,6 +25,19 @@ const meta: Meta<typeof WorkspaceOutdatedTooltip> = {
export default meta;
type Story = StoryObj<typeof WorkspaceOutdatedTooltip>;

const Example: Story = {};
const Example: Story = {
play: async ({ canvasElement, step }) => {
const screen = within(canvasElement);

await step("activate hover trigger", async () => {
await userEvent.hover(screen.getByRole("button"));
await waitFor(() =>
expect(
screen.getByText(MockTemplateVersion.message),
).toBeInTheDocument(),
);
});
},
};

export { Example as WorkspaceOutdatedTooltip };