Skip to content

Commit 82ed9e4

Browse files
stirbyBrunoQuaresmaParkreiner
authored
chore: patch 2.12.4 (#13925)
* fix(site): enable dormant workspace to be deleted (#13850) (cherry picked from commit 01b30ea) * chore: add SVG desktop icon (#13765) * chore: add SVG desktop icon * fix: add desktop icon to to icons.json (cherry picked from commit 21a923a) * fix: update import order for Storybook --------- Co-authored-by: Bruno Quaresma <bruno@coder.com> Co-authored-by: Michael Smith <throwawayclover@gmail.com>
1 parent 534d4ea commit 82ed9e4

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

site/src/pages/WorkspacePage/WorkspaceActions/WorkspaceActions.stories.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Meta, StoryObj } from "@storybook/react";
2+
import { userEvent, within, expect } from "@storybook/test";
23
import * as Mocks from "testHelpers/entities";
34
import { WorkspaceActions } from "./WorkspaceActions";
45

@@ -140,3 +141,15 @@ export const CancelHiddenForUser: Story = {
140141
isOwner: false,
141142
},
142143
};
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+
};

site/src/pages/WorkspacePage/WorkspaceActions/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const abilitiesByWorkspaceStatus = (
4949
return {
5050
actions: ["activate"],
5151
canCancel: false,
52-
canAcceptJobs: false,
52+
canAcceptJobs: true,
5353
};
5454
}
5555

site/src/theme/icons.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"datagrip.svg",
2626
"dataspell.svg",
2727
"debian.svg",
28+
"desktop.svg",
2829
"discord.svg",
2930
"do.png",
3031
"docker-white.svg",

site/static/icon/desktop.svg

+7
Loading

0 commit comments

Comments
 (0)