File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
site/src/modules/resources Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
import type { Meta , StoryObj } from "@storybook/react" ;
2
+ import { within , userEvent } from "@storybook/test" ;
2
3
import {
3
4
MockWorkspace ,
4
5
MockWorkspaceAgent ,
@@ -31,3 +32,30 @@ export const WithPorts: Story = {
31
32
} ,
32
33
} ,
33
34
} ;
35
+
36
+ export const Dirty : Story = {
37
+ args : {
38
+ container : {
39
+ ...MockWorkspaceAgentContainer ,
40
+ devcontainer_dirty : true ,
41
+ ports : MockWorkspaceAgentContainerPorts ,
42
+ } ,
43
+ } ,
44
+ } ;
45
+
46
+ export const Recreating : Story = {
47
+ args : {
48
+ container : {
49
+ ...MockWorkspaceAgentContainer ,
50
+ devcontainer_dirty : true ,
51
+ ports : MockWorkspaceAgentContainerPorts ,
52
+ } ,
53
+ } ,
54
+ play : async ( { canvasElement } ) => {
55
+ const canvas = within ( canvasElement ) ;
56
+ const recreateButton = await canvas . findByRole ( "button" , {
57
+ name : / r e c r e a t e / i,
58
+ } ) ;
59
+ await userEvent . click ( recreateButton ) ;
60
+ } ,
61
+ } ;
You can’t perform that action at this time.
0 commit comments