feat(admin): Playwright E2E каркас — TESTIDS, login/shell/roles, CI mock. Refs EventHub/EventHubFrontAdmin#33 #34 #35
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# E2E testid contract (EventHubFrontAdmin)
|
||||
|
||||
Селекторы: **`data-testid`** + a11y (`getByRole` / `getByLabel`) где имя стабильно.
|
||||
|
||||
## Naming
|
||||
|
||||
| Pattern | Example |
|
||||
|---------|---------|
|
||||
| `page-{name}` | `page-login`, `page-users` |
|
||||
| `nav-{slug}` | `nav-users` (slug = path without `/`) |
|
||||
| `{entity}-row-{id}` | `user-row-{uuid}` |
|
||||
| `{entity}-detail` | `user-detail` |
|
||||
| `{entity}-filter-{field}` | `event-filter-status` |
|
||||
| `btn-{action}` | `btn-login`, `btn-save`, `btn-delete-confirm` |
|
||||
| `dialog-{name}` | `dialog-edit-user` |
|
||||
| `menu-user` | avatar dropdown |
|
||||
| `palette-input` | command palette |
|
||||
|
||||
Helper in app: `src/lib/testid.ts` → `testid(['user-row', id])`.
|
||||
|
||||
## Rules
|
||||
|
||||
- kebab-case only
|
||||
- Dynamic id segment = real API entity id
|
||||
- Prefer roles/labels for login email/password and primary submit when i18n fixed to `ru` in mock suite
|
||||
- Do not decorate every layout div — only interaction anchors
|
||||
Reference in New Issue
Block a user