diff --git a/scripts/screenshots/checks.mjs b/scripts/screenshots/checks.mjs index 308bda4a..fea7a4ec 100644 --- a/scripts/screenshots/checks.mjs +++ b/scripts/screenshots/checks.mjs @@ -31,11 +31,13 @@ try { if (!res.ok()) throw new Error(`dev-login: HTTP ${res.status()}`) const page = await ctx.newPage() await page.goto('/#start') - await page.getByRole('heading', { name: 'How did you hear about VisualCI?' }).waitFor({ timeout: 10000 }) - await page.getByRole('heading', { name: /Set up VisualCI/ }).waitFor() + await page.getByRole('heading', { name: /Set up VisualCI/ }).waitFor({ timeout: 10000 }) + // The survey waits until the GitHub App is installed: a new account's first step is the App. + if ((await page.getByRole('heading', { name: 'How did you hear about VisualCI?' }).count()) > 0) + throw new Error('a new account sees the "How did you hear" survey before installing the GitHub App') const url = new URL(page.url()) if (url.pathname === '/' || url.hash) throw new Error(`a new account stayed on ${page.url()}`) - console.log(`new account: lands on ${url.pathname} with the card and the checklist`) + console.log(`new account: lands on ${url.pathname} with the checklist and no survey yet`) // Sign out from there. await page.locator('summary[aria-label="Account"]').click() diff --git a/server/frontend/src/pages/OrgPage.tsx b/server/frontend/src/pages/OrgPage.tsx index 23a36aa8..c3bb63d2 100644 --- a/server/frontend/src/pages/OrgPage.tsx +++ b/server/frontend/src/pages/OrgPage.tsx @@ -27,6 +27,7 @@ export function OrgPage() { const o = q.data const canCreate = o.role === 'admin' const showSetup = !o.setup.complete && !o.setup.dismissed + const appInstalled = o.setup.steps.some((s) => s.key === 'install_github_app' && s.done) return (