Skip to content
Prev Previous commit
Next Next commit
fix: update storybook testsw
  • Loading branch information
jaaydenh committed Apr 2, 2025
commit 3ecc9d9a3f1314e986280db003b240a0d247302f
11 changes: 11 additions & 0 deletions site/src/pages/TemplatePage/TemplatePageHeader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const meta: Meta<typeof TemplatePageHeader> = {
permissions: {
canUpdateTemplate: true,
},
workspacePermissions: {
createWorkspaceForUser: true,
},
},
};

Expand All @@ -29,6 +32,14 @@ export const CanNotUpdate: Story = {
},
};

export const CannotCreateWorkspace: Story = {
args: {
workspacePermissions: {
createWorkspaceForUser: false,
},
},
};

export const Deprecated: Story = {
args: {
template: {
Expand Down
16 changes: 16 additions & 0 deletions site/src/pages/TemplatesPage/TemplatesPageView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export const WithTemplates: Story = {
},
],
examples: [],
workspacePermissions: {
[MockTemplate.organization_id]: {
createWorkspaceForUser: true,
},
},
},
};

Expand All @@ -84,6 +89,17 @@ export const MultipleOrganizations: Story = {
},
};

export const CannotCreateWorkspaces: Story = {
args: {
...WithTemplates.args,
workspacePermissions: {
[MockTemplate.organization_id]: {
createWorkspaceForUser: false,
},
},
},
};

export const WithFilteredAllTemplates: Story = {
args: {
...WithTemplates.args,
Expand Down
Loading