mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix(site): enable dormant workspace to be deleted (#13850)
This commit is contained in:
@@ -206,6 +206,18 @@ export const OpenDownloadLogs: Story = {
|
||||
},
|
||||
};
|
||||
|
||||
export const CanDeleteDormantWorkspace: Story = {
|
||||
args: {
|
||||
workspace: Mocks.MockDormantWorkspace,
|
||||
},
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
await userEvent.click(canvas.getByRole("button", { name: "More options" }));
|
||||
const deleteButton = canvas.getByText("Delete…");
|
||||
await expect(deleteButton).toBeEnabled();
|
||||
},
|
||||
};
|
||||
|
||||
function generateLogs(count: number) {
|
||||
return Array.from({ length: count }, (_, i) => ({
|
||||
output: `log ${i + 1}`,
|
||||
|
||||
@@ -48,7 +48,7 @@ export const abilitiesByWorkspaceStatus = (
|
||||
return {
|
||||
actions: ["activate"],
|
||||
canCancel: false,
|
||||
canAcceptJobs: false,
|
||||
canAcceptJobs: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user