Skip to content

Commit 8866cc9

Browse files
committed
feat: add story
1 parent 8d1d2af commit 8866cc9

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

site/src/modules/management/OrganizationSidebarView.stories.tsx

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,90 @@ export const NoCreateOrg: Story = {
7171
},
7272
};
7373

74+
export const OverflowDropdown: Story = {
75+
args: {
76+
activeOrganization: {
77+
...MockOrganization,
78+
permissions: { createOrganization: true },
79+
},
80+
permissions: {
81+
...MockPermissions,
82+
createOrganization: true,
83+
},
84+
organizations: [
85+
{
86+
...MockOrganization,
87+
permissions: {},
88+
},
89+
{
90+
...MockOrganization2,
91+
permissions: {},
92+
},
93+
{
94+
id: "my-organization-3-id",
95+
name: "my-organization-3",
96+
display_name: "My Organization 3",
97+
description: "Another organization that gets used for stuff.",
98+
icon: "/emojis/1f957.png",
99+
created_at: "",
100+
updated_at: "",
101+
is_default: false,
102+
permissions: {},
103+
},
104+
{
105+
id: "my-organization-4-id",
106+
name: "my-organization-4",
107+
display_name: "My Organization 4",
108+
description: "Another organization that gets used for stuff.",
109+
icon: "/emojis/1f957.png",
110+
created_at: "",
111+
updated_at: "",
112+
is_default: false,
113+
permissions: {},
114+
},
115+
{
116+
id: "my-organization-5-id",
117+
name: "my-organization-5",
118+
display_name: "My Organization 5",
119+
description: "Another organization that gets used for stuff.",
120+
icon: "/emojis/1f957.png",
121+
created_at: "",
122+
updated_at: "",
123+
is_default: false,
124+
permissions: {},
125+
},
126+
{
127+
id: "my-organization-6-id",
128+
name: "my-organization-6",
129+
display_name: "My Organization 6",
130+
description: "Another organization that gets used for stuff.",
131+
icon: "/emojis/1f957.png",
132+
created_at: "",
133+
updated_at: "",
134+
is_default: false,
135+
permissions: {},
136+
},
137+
{
138+
id: "my-organization-7-id",
139+
name: "my-organization-7",
140+
display_name: "My Organization 7",
141+
description: "Another organization that gets used for stuff.",
142+
icon: "/emojis/1f957.png",
143+
created_at: "",
144+
updated_at: "",
145+
is_default: false,
146+
permissions: {},
147+
},
148+
],
149+
},
150+
play: async ({ canvasElement }) => {
151+
const canvas = within(canvasElement);
152+
await userEvent.click(
153+
canvas.getByRole("button", { name: /My Organization/i }),
154+
);
155+
},
156+
};
157+
74158
export const NoPermissions: Story = {
75159
args: {
76160
activeOrganization: {

0 commit comments

Comments
 (0)