Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ describe('ConsoleLayout', () => {

expect(html).toContain('Social providers')
expect(html).toContain('Default organization')
expect(html).toContain('data-smoke-authenticated-console="true"')
expect(html).toContain('data-active-announcements="true"')
expect(html).toContain('href="https://xid.dev/docs"')
expect(html).toContain('Documentation')
Expand Down
5 changes: 4 additions & 1 deletion apps/console/src/components/layout/ConsoleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,10 @@ export function ConsoleLayout({ children, navItems }: ConsoleLayoutProps): React
}

return (
<div {...stylex.props(styles.shell)}>
<div
data-smoke-authenticated-console={status === 'authenticated' ? 'true' : undefined}
{...stylex.props(styles.shell)}
>
<header {...stylex.props(styles.header)}>
<div {...stylex.props(styles.headerContext)}>
<span {...stylex.props(styles.brandNarrow)}>
Expand Down
6 changes: 3 additions & 3 deletions scripts/run-three-worker-browser-smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ async function assertAuthenticatedConsole(page, options) {
const { origin, browserHost, email, name } = options
await page.navigate(`${origin}/console/platform`)
await page.waitFor(
() => document.body.innerText.includes('admin@xid-smoke.test'),
() => document.querySelector('[data-smoke-authenticated-console]') !== null,
`${name} authenticated Console`,
)
if (page.documentOwner('/console/platform', browserHost) !== 'console') {
Expand Down Expand Up @@ -607,7 +607,7 @@ async function switchLocales(page, origin) {
await page.waitFor(
() =>
document.documentElement.lang === window.__xidExpectedLocale &&
document.body.innerText.includes('admin@xid-smoke.test'),
document.querySelector('[data-smoke-authenticated-console]') !== null,
`Console locale ${locale}`,
)
}
Expand Down Expand Up @@ -704,7 +704,7 @@ export async function runThreeWorkerBrowserSmoke(options) {

await page.navigate(`${apexOrigin}/console/platform`)
await page.waitFor(
() => document.body.innerText.includes('admin@xid-smoke.test'),
() => document.querySelector('[data-smoke-authenticated-console]') !== null,
'apex session after tenant logout',
)
const apexMe = await readMe(page)
Expand Down