Skip to content

Commit 5c72bce

Browse files
committed
Storybook changes
1 parent a952148 commit 5c72bce

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

site/src/components/Workspace/Workspace.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ export const WithoutUpdateAccess: Story = {
9898
},
9999
}
100100

101+
export const PendingInQueue: Story = {
102+
args: {
103+
...Running.args,
104+
workspace: Mocks.MockPendingWorkspace,
105+
},
106+
}
107+
101108
export const Starting: Story = {
102109
args: {
103110
...Running.args,

site/src/pages/WorkspacesPage/WorkspacesPageView.stories.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
MockExperiments,
1616
mockApiError,
1717
MockUser,
18+
MockPendingProvisionerJob,
1819
} from "testHelpers/entities"
1920
import { WorkspacesPageView } from "./WorkspacesPageView"
2021
import { DashboardProviderContext } from "components/Dashboard/DashboardProvider"
@@ -33,6 +34,10 @@ const createWorkspace = (
3334
latest_build: {
3435
...MockWorkspace.latest_build,
3536
status,
37+
job:
38+
status === "pending"
39+
? MockPendingProvisionerJob
40+
: MockWorkspace.latest_build.job,
3641
},
3742
last_used_at: lastUsedAt,
3843
}

site/src/testHelpers/entities.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ export const MockRunningProvisionerJob: TypesGen.ProvisionerJob = {
310310
export const MockPendingProvisionerJob: TypesGen.ProvisionerJob = {
311311
...MockProvisionerJob,
312312
status: "pending",
313+
queue_position: 2,
314+
queue_size: 4,
313315
}
314316
export const MockTemplateVersion: TypesGen.TemplateVersion = {
315317
id: "test-template-version",

0 commit comments

Comments
 (0)