File tree Expand file tree Collapse file tree
app/o/[organizationId]/components
scripts/org-redesign-e2e/checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export function OrganizationAccessDenied() {
1010 return (
1111 < main
1212 className = { cn (
13- 'desktop-title-bar-page flex min- h-dvh bg-[var(--bg)]' ,
13+ 'desktop-title-bar-page flex h-dvh bg-[var(--bg)]' ,
1414 hostBridge . tokens ,
1515 hostBridge . canvas
1616 ) }
Original file line number Diff line number Diff line change 1+ import assert from 'node:assert/strict'
12import {
23 ADMIN ,
34 ADMIN_CHATS ,
@@ -151,8 +152,17 @@ export async function landingChecks() {
151152 )
152153 await check ( 'a non-member sees the denial and a way to their workspaces' , async ( ) => {
153154 await onHome ( OUTSIDER , async ( { page } ) => {
154- await expect ( page . getByRole ( 'heading' , { name : 'Organization access denied' } ) ) . toBeVisible ( )
155+ const heading = page . getByRole ( 'heading' , { name : 'Organization access denied' } )
156+ await expect ( heading ) . toBeVisible ( )
155157 await expect ( page . getByRole ( 'link' , { name : 'View your workspaces' } ) ) . toBeVisible ( )
158+ // The other route states center in the page; this one sat at the top.
159+ const box = await heading . boundingBox ( )
160+ const viewport = page . viewportSize ( )
161+ assert . ok ( box && viewport , 'Nothing to measure' )
162+ assert . ok (
163+ box . y > viewport . height / 4 ,
164+ `The denial sits at ${ Math . round ( box . y ) } px of a ${ viewport . height } px page`
165+ )
156166 } )
157167 } )
158168 await check (
You can’t perform that action at this time.
0 commit comments