8000 fix: update storybook testsw · coder/coder@636bf9c · GitHub
[go: up one dir, main page]

Skip to content

Commit 636bf9c

Browse files
committed
fix: update storybook testsw
1 parent 6544543 commit 636bf9c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

site/src/pages/TemplatePage/TemplatePageHeader.stories.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const meta: Meta<typeof TemplatePageHeader> = {
1313
permissions: {
1414
canUpdateTemplate: true,
1515
},
16+
workspacePermissions: {
17+
createWorkspaceForUser: true,
18+
},
1619
},
1720
};
1821

@@ -29,6 +32,14 @@ export const CanNotUpdate: Story = {
2932
},
3033
};
3134

35+
export const CannotCreateWorkspace: Story = {
36+
args: {
37+
workspacePermissions: {
38+
createWorkspaceForUser: false,
39+
},
40+
},
41+
};
42+
3243
export const Deprecated: Story = {
3344
args: {
3445
template: {

site/src/pages/TemplatesPage/TemplatesPageView.stories.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export const WithTemplates: Story = {
7474
},
7575
],
7676
examples: [],
77+
workspacePermissions: {
78+
[MockTemplate.organization_id]: {
79+
createWorkspaceForUser: true,
80+
},
81+
},
7782
},
7883
};
7984

@@ -84,6 +89,17 @@ export const MultipleOrganizations: Story = {
8489
},
8590
};
8691

92+
export const CannotCreateWorkspaces: Story = {
93+
args: {
94+
...WithTemplates.args,
95+
workspacePermissions: {
96+
[MockTemplate.organization_id]: {
97+
createWorkspaceForUser: false,
98+
},
99+
},
100+
},
101+
};
102+
87103
export const WithFilteredAllTemplates: Story = {
88104
args: {
89105
...WithTemplates.args,

0 commit comments

Comments
 (0)
0