automation-uilisted
Install: claude install-skill YevheniiaQA/qa-agent-toolkit
# Automation UI (TypeScript + Playwright)
UI tests fail for two reasons: the feature broke, or the test was written badly.
The entire craft is minimising the second category, because a suite that cries
wolf stops being read.
## Project shape
```
03-tests/ui/<target>/
├── playwright.config.ts
├── src/
│ ├── pages/ Page objects from selectors-collector
│ ├── fixtures/ Auth state, seeded data, page object injection
│ └── helpers/
└── specs/
└── <feature>/
└── <area>.spec.ts
One project per UI **target**, not per ticket. An admin panel and a public site
differ in base URL, authentication and page objects, so each gets its own project
under `03-tests/ui/<target>/`. Every ticket touching the admin panel adds specs to
`03-tests/ui/admin/` — never a new project.
```
## Non-negotiable patterns
**Set up through the API, assert through the UI.** Logging in via the form in
every test is slow and turns one broken login into a hundred red tests. Use
`storageState` for authentication and API calls for data provisioning; reserve UI
interaction for the thing under test.
```ts
// playwright.config.ts — auth once, reuse everywhere
projects: [
{ name: 'setup', testMatch: /global\.setup\.ts/ },
{ name: 'chromium', use: { ...devices['Desktop Chrome'], storageState: 'state.json' },
dependencies: ['setup'] },
]
```
**Web-first assertions only.** `await expect(locator).toBeVisible()` retries until
the timeout; `expect(await locator.isVisible())