Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add UnhealthyWithoutUpdatePermission Workspace story
  • Loading branch information
aqandrew committed Aug 21, 2025
commit 988c3d3176948ed4b5e17ca1f1b169479c1b32f4
11 changes: 11 additions & 0 deletions site/src/pages/WorkspacePage/Workspace.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { ProvisionerJobLog } from "api/typesGenerated";
import { action } from "storybook/actions";
import type { WorkspacePermissions } from "../../modules/workspaces/permissions";
import { Workspace } from "./Workspace";
import { defaultPermissions } from "./WorkspaceNotifications/WorkspaceNotifications.stories";

// Helper function to create timestamps easily - Copied from AppStatuses.stories.tsx
const createTimestamp = (
Expand Down Expand Up @@ -356,6 +357,16 @@ export const Unhealthy: Story = {
},
};

export const UnhealthyWithoutUpdatePermission: Story = {
args: {
...Unhealthy.args,
permissions: {
...defaultPermissions,
updateWorkspace: false,
},
},
};

export const FailedWithLogs: Story = {
args: {
...Running.args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { WorkspacePermissions } from "modules/workspaces/permissions";
import { expect, userEvent, waitFor, within } from "storybook/test";
import { WorkspaceNotifications } from "./WorkspaceNotifications";

const defaultPermissions: WorkspacePermissions = {
export const defaultPermissions: WorkspacePermissions = {
readWorkspace: true,
updateWorkspaceVersion: true,
updateWorkspace: true,
Expand Down
Loading