This scripts/ folder holds Playwright automation used to capture tutorial screenshots. Key files live in the repository root relative to this folder:
capture-angular.js,capture-webapi.js,capture-identityserver.js: component-specific screenshot scripts.package.json: Playwright dependency and npm scripts.docs/images/{angular|webapi|identityserver}/: screenshot output directories.README.md: full runbook, credentials, and troubleshooting.
Run from scripts/:
npm install: installs Playwright and dependencies.npm run screenshots:angular: captures Angular app screenshots.npm run screenshots:webapi: captures Swagger UI screenshot.npm run screenshots:identityserver: captures IdentityServer admin screenshots.npm run screenshots:all: runs all three scripts sequentially.
These scripts require the three services to be running locally:
- IdentityServer:
https://localhost:44310 - API:
https://localhost:44378 - Angular:
http://localhost:4200
- Language: Node.js (CommonJS) with Playwright.
- Indentation: 2 spaces (match existing scripts).
- Filenames:
capture-<component>.js. - Screenshot names are lowercase kebab-case (for example
employee-list-page.png). - Prefer explicit selectors and
waitForTimeout/waitForSelectorfor stability.
No automated tests are configured in this folder. Use the scripts above as smoke tests, and validate output in docs/images/<component>/.
Recent commit messages are short, sentence-style summaries (for example add screenshots, Update readme). Use simple, imperative phrasing and keep messages concise.
PRs should include:
- A short description of what changed and why.
- Links to any related issue or tutorial update.
- Before/after screenshots when you modify capture logic or UI flows.
- Credentials are stored in
README.mdfor local usage. Do not reuse them outside this tutorial environment. - Scripts run with
headless: falseby default to aid debugging; switch totruefor unattended runs.