No description
  • TypeScript 100%
Find a file
Ronit Nath 621811b4a1 feat(e2e): add knowledge-base Playwright stories
2 page stories (main app, editor view) + 5 workflow stories
(create collection, create document, search, upload, formatting)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 03:26:30 -07:00
helpers test: UI convergence test patterns for WS-driven live updates 2026-03-22 20:33:40 -07:00
lib Add story-based visual testing system 2026-03-22 04:26:30 -07:00
stories feat(e2e): add knowledge-base Playwright stories 2026-03-23 03:26:30 -07:00
tests test: UI convergence test patterns for WS-driven live updates 2026-03-22 20:33:40 -07:00
.gitignore Add story-based visual testing system 2026-03-22 04:26:30 -07:00
auth.setup.ts Initial Playwright E2E smoke test suite 2026-03-22 03:42:30 -07:00
bun.lock Initial Playwright E2E smoke test suite 2026-03-22 03:42:30 -07:00
package.json Add story-based visual testing system 2026-03-22 04:26:30 -07:00
playwright.config.ts Add story-based visual testing system 2026-03-22 04:26:30 -07:00
README.md fix: auth setup uses service OIDC flow instead of IDP portal 2026-03-22 07:04:12 -07:00

Isoastra E2E Tests

Playwright-based smoke tests and visual story testing for deployed Isoastra services.

Setup

bun install
bunx playwright install chromium

Smoke Tests

Quick pass/fail checks that services are up, rendering, and auth works.

bunx playwright test                          # all smoke tests
bunx playwright test tests/idp.spec.ts        # single service
bunx playwright test tests/grafana.spec.ts
bunx playwright test tests/photos.spec.ts

Also runs via deploy up --e2e post-deploy.

Story-Based Visual Testing

Stories define what UI pages/workflows should look like. The runner screenshots them into artifacts/, then a Claude Code agent reviews screenshots against expectations.

Running stories

bunx playwright test --project=stories                        # all stories
STORY_SERVICE=idp bunx playwright test --project=stories      # IDP only

Writing stories

Stories are TypeScript files in stories/{service}.stories.ts. See stories/idp.stories.ts for examples. Two types:

  • Page stories — navigate to a URL, take a screenshot
  • Workflow stories — multi-step interactions with a screenshot per step

Each story has expectations (what the reviewer checks) and touches (source files it depends on, for git-diff filtering).

Reviewing

A Claude Code agent reads screenshots from artifacts/ and evaluates against the story's expectations list. No API calls needed — the agent reads images directly.

Artifacts

Screenshots go to artifacts/{service}/{story-name}.png (gitignored). Workflow steps go to artifacts/{service}/{story-name}/{step-name}.png.

Environment Variables

Variable Default Description
TEST_IDP_EMAIL claude-test@isoastra.com Email for SSO login
TEST_IDP_PASSWORD TestAccount2026! Password for SSO login
AUTH_TARGET_URL https://photos.ronitnath.com Service URL to authenticate against (navigates to /auth/login, triggers OIDC redirect)
STORY_SERVICE (all) Filter stories to a single service
AFFECTED_FILES (all) Comma-separated file paths to filter affected stories