Skip to content

Commit 7ce11ea

Browse files
committed
fix(org): center access denied, since only a definite height lets the status fill the page
1 parent 6693cfc commit 7ce11ea

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎apps/sim/app/o/[organizationId]/components/organization-access-denied.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
)}

‎apps/sim/scripts/org-redesign-e2e/checks/landing.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import assert from 'node:assert/strict'
12
import {
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(

0 commit comments

Comments
 (0)