File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
site/src/pages/WorkspacesPage Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
22
22
} from "testHelpers/entities" ;
23
23
import { withDashboardProvider } from "testHelpers/storybook" ;
24
24
import { WorkspacesPageView } from "./WorkspacesPageView" ;
25
+ import { expect , within } from "@storybook/test" ;
25
26
26
27
const createWorkspace = (
27
28
status : WorkspaceStatus ,
@@ -265,3 +266,30 @@ export const InvalidPageNumber: Story = {
265
266
page : 1000 ,
266
267
} ,
267
268
} ;
269
+
270
+ export const ShowOrganizations : Story = {
271
+ args : {
272
+ workspaces : [
273
+ {
274
+ ...MockWorkspace ,
275
+ organization_name : "Limbus Co." ,
276
+ } ,
277
+ ] ,
278
+ } ,
279
+
280
+ parameters : {
281
+ showOrganizations : true ,
282
+ } ,
283
+
284
+ play : async ( { canvasElement } ) => {
285
+ const canvas = within ( canvasElement ) ;
286
+ const accessibleTableCell = await canvas . findByRole ( "cell" , {
287
+ // Need whitespace classes because different parts of the element
288
+ // are going in different spans, and Storybook doesn't consolidate
289
+ // these
290
+ name : / o r g \s ? (?: a n i z a t i o n ) ? \s ? : \s ? L i m b u s C o \. / i,
291
+ } ) ;
292
+
293
+ expect ( accessibleTableCell ) . toBeDefined ( ) ;
294
+ } ,
295
+ } ;
You can’t perform that action at this time.
0 commit comments