Skip to content

Commit 737e1c6

Browse files
committed
chore: fix up storybook tests
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 590eb4e commit 737e1c6

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.stories.tsx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export const PresetsButNoneSelected: Story = {
136136
{
137137
ID: "preset-2",
138138
Name: "Preset 2",
139-
Default: true,
139+
Default: false,
140140
Parameters: [
141141
{
142142
Name: MockTemplateVersionParameter2.name,
@@ -243,6 +243,45 @@ export const PresetNoneSelected: Story = {
243243
},
244244
};
245245

246+
export const PresetsWithDefault: Story = {
247+
args: {
248+
presets: [
249+
{
250+
ID: "preset-1",
251+
Name: "Preset 1",
252+
Default: false,
253+
Parameters: [
254+
{
255+
Name: MockTemplateVersionParameter1.name,
256+
Value: "preset 1 override",
257+
},
258+
],
259+
},
260+
{
261+
ID: "preset-2",
262+
Name: "Preset 2",
263+
Default: true,
264+
Parameters: [
265+
{
266+
Name: MockTemplateVersionParameter2.name,
267+
Value: "150189",
268+
},
269+
],
270+
},
271+
],
272+
parameters: [
273+
MockTemplateVersionParameter1,
274+
MockTemplateVersionParameter2,
275+
MockTemplateVersionParameter3,
276+
],
277+
},
278+
play: async ({ canvasElement }) => {
279+
const canvas = within(canvasElement);
280+
// Toggle off the show preset parameters switch
281+
await userEvent.click(canvas.getByLabelText("Show preset parameters"));
282+
},
283+
};
284+
246285
export const ExternalAuth: Story = {
247286
args: {
248287
externalAuth: [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy