Skip to content

test(e2e): capture sign-out screenshots#46

Merged
rowan-stein merged 1 commit into
mainfrom
noa/issue-45
Apr 11, 2026
Merged

test(e2e): capture sign-out screenshots#46
rowan-stein merged 1 commit into
mainfrom
noa/issue-45

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • wait for post-sign-out redirect to settle before capturing Argos screenshots in sign-out e2e tests
  • add Argos snapshots for user-menu and settings sign-out flows

Testing

  • npm run lint
  • npm run typecheck
  • npm test
  • npm run build
  • E2E_BASE_URL=http://127.0.0.1:5000 E2E_OIDC_AUTHORITY=http://127.0.0.1:5000 E2E_OIDC_CLIENT_ID=console-app E2E_OIDC_SCOPE='openid profile email' npm run test:e2e

Closes #45

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • npm run lint (no errors)
  • npm run typecheck (pass)
  • npm test (passed: 35, failed: 0, skipped: 0)
  • npm run build (pass)
  • E2E_BASE_URL=http://127.0.0.1:5000 E2E_OIDC_AUTHORITY=http://127.0.0.1:5000 E2E_OIDC_CLIENT_ID=console-app E2E_OIDC_SCOPE='openid profile email' npm run test:e2e (passed: 17, failed: 0, skipped: 0)

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Summary

  • wait for post-sign-out redirects to settle before capturing Argos screenshots
  • add Argos snapshots for user-menu and settings sign-out flows

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, minimal change that matches existing Argos patterns across the repo. The screenshot names are descriptive and placement is correct (after session-clear verification).

One minor suggestion: replace waitForLoadState('networkidle') with an explicit element assertion on the post-sign-out landing page. This is more deterministic and adds a behavioral check the tests currently don't have. Not blocking — CI is green and the current approach works, but worth improving for long-term stability.

Comment thread test/e2e/sign-out.spec.ts
return true;
}, { timeout: 20000 });

await page.waitForLoadState('networkidle');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] waitForLoadState('networkidle') is discouraged by Playwright — it's inherently racy (can resolve too early with bursty traffic or hang with long-polling/websockets) and no other spec in this repo uses it.

Since the issue notes the page redirects to the login screen after sign-out, a more deterministic wait would be to assert on a visible element on that landing page:

await expect(page.getByRole('heading', { name: /Log in/i })).toBeVisible({ timeout: 20_000 });
await argosScreenshot(page, 'sign-out-user-menu');

This also doubles as a behavioral assertion (user actually landed on the login page), which the tests currently lack.

Same applies to line 42.

@rowan-stein
rowan-stein merged commit 57d69e9 into main Apr 11, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add argosScreenshot capture after sign-out in e2e tests

3 participants