File tree 2 files changed +14
-1
lines changed
site/src/pages/WorkspacePage/WorkspaceActions
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { Meta , StoryObj } from "@storybook/react" ;
2
2
import * as Mocks from "testHelpers/entities" ;
3
3
import { WorkspaceActions } from "./WorkspaceActions" ;
4
+ import { userEvent , within , expect } from "@storybook/test" ;
4
5
5
6
const meta : Meta < typeof WorkspaceActions > = {
6
7
title : "pages/WorkspacePage/WorkspaceActions" ,
@@ -140,3 +141,15 @@ export const CancelHiddenForUser: Story = {
140
141
isOwner : false ,
141
142
} ,
142
143
} ;
144
+
145
+ export const CanDeleteDormantWorkspace : Story = {
146
+ args : {
147
+ workspace : Mocks . MockDormantWorkspace ,
148
+ } ,
149
+ play : async ( { canvasElement } ) => {
150
+ const canvas = within ( canvasElement ) ;
151
+ await userEvent . click ( canvas . getByRole ( "button" , { name : "More options" } ) ) ;
152
+ const deleteButton = canvas . getByText ( "Delete…" ) ;
153
+ await expect ( deleteButton ) . toBeEnabled ( ) ;
154
+ } ,
155
+ } ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const abilitiesByWorkspaceStatus = (
49
49
return {
50
50
actions : [ "activate" ] ,
51
51
canCancel : false ,
52
- canAcceptJobs : false ,
52
+ canAcceptJobs : true ,
53
53
} ;
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments