- TypeScript 100%
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> |
||
|---|---|---|
| helpers | ||
| lib | ||
| stories | ||
| tests | ||
| .gitignore | ||
| auth.setup.ts | ||
| bun.lock | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
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 |