1
- import type { Meta , Parameters , StoryObj } from "@storybook/react" ;
2
- import { expect , screen , userEvent , within } from "@ storybook/test" ;
1
+ import type { Meta , Parameters , StoryObj } from "@storybook/react-vite " ;
2
+ import { expect , screen , userEvent , within } from "storybook/test" ;
3
3
import { templateVersionRoot } from "api/queries/templates" ;
4
4
import type {
5
5
TemplateVersion ,
@@ -10,6 +10,7 @@ import { useQueryClient } from "react-query";
10
10
import { MockTemplateVersion , MockWorkspace } from "testHelpers/entities" ;
11
11
import { BatchUpdateModalForm } from "./BatchUpdateModalForm" ;
12
12
import { ACTIVE_BUILD_STATUSES } from "./WorkspacesPage" ;
13
+ import { action } from "storybook/internal/actions" ;
13
14
14
15
type Writeable < T > = { - readonly [ Key in keyof T ] : T [ Key ] } ;
15
16
type MutableWorkspace = Writeable < Omit < Workspace , "latest_build" > > & {
@@ -22,11 +23,8 @@ const meta: Meta<typeof BatchUpdateModalForm> = {
22
23
args : {
23
24
open : true ,
24
25
isProcessing : false ,
25
- onSubmit : ( ) => window . alert ( "Hooray! Everything has been submitted" ) ,
26
- // Since we're using Radix, any cancel functionality is also going to
27
- // trigger when you click outside the component bounds, which would make
28
- // doing an alert really annoying in the Storybook web UI
29
- onCancel : ( ) => console . log ( "Canceled" ) ,
26
+ onSubmit : action ( "All selected workspaces have been updated" ) ,
27
+ onCancel : action ( "Update canceled" ) ,
30
28
} ,
31
29
} ;
32
30
0 commit comments