Skip to content

feat(site): add support for presets to the create workspace page #16567

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 8 commits into from
Feb 18, 2025
Merged
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
Prev Previous commit
Next Next commit
add a story to test when a preset has been selected
  • Loading branch information
SasSwart committed Feb 14, 2025
commit da9239e23578bbef12e49fd8e8c0b0e6768d7165
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
mockApiError,
} from "testHelpers/entities";
import { CreateWorkspacePageView } from "./CreateWorkspacePageView";
import { within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";

const meta: Meta<typeof CreateWorkspacePageView> = {
title: "pages/CreateWorkspacePage",
Expand Down Expand Up @@ -116,7 +118,7 @@ export const Parameters: Story = {
},
};

export const Presets: Story = {
export const PresetsButNoneSelected: Story = {
args: {
presets: [
{
Expand Down Expand Up @@ -148,6 +150,15 @@ export const Presets: Story = {
},
};

export const PresetSelected: Story = {
args: PresetsButNoneSelected.args,
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await userEvent.click(canvas.getByLabelText("Preset"));
await userEvent.click(canvas.getByText("Preset 1"));
},
};

export const ExternalAuth: Story = {
args: {
externalAuth: [
Expand Down
Loading