docs: update documentation and e2e tests
- Add configuration docs for database and rate limiting - Remove completed tasks from tracking list - Update testing requirements with new test patterns - Enhance web development docs with frontend guidelines - Expand page loading and ban records e2e test coverage
This commit is contained in:
@@ -1792,6 +1792,30 @@ it("should render a row for each ban", () => {
|
||||
});
|
||||
```
|
||||
|
||||
### E2E Page Loading Selectors
|
||||
|
||||
The E2E test suite (`e2e/tests/01_page_loading.robot`) verifies every protected route renders without triggering `PageErrorBoundary`. Tests use CSS selectors scoped to semantic page landmarks — not `data-testid` attributes (see [E2E-6] for the attribute task).
|
||||
|
||||
**Why fragile selectors are intentional:** E2E tests catch real rendering failures. Fragile selectors mean tests may need updating when markup changes, but they reliably detect PageErrorBoundary fallbacks, broken imports, and missing API fields that unit tests with mocks cannot catch.
|
||||
|
||||
**Page landmarks by route:**
|
||||
|
||||
| Route | Expected selectors | Notes |
|
||||
|---|---|---|
|
||||
| `/login` | `css=form` | Login form visible when setup complete |
|
||||
| `/setup` | `css=form,button` | Setup wizard; redirects to `/login` if done |
|
||||
| `/` (Dashboard) | `css=main` | Dashboard stats/charts rendered after auth |
|
||||
| `/map` | `css=canvas,svg,.map-container` | Map canvas or SVG; D3/Canvas renders after load |
|
||||
| `/jails` | `css=main,table,.jails-list` | Jail list table visible |
|
||||
| `/jails/:name` | `css=main,h1,h2,.jail-detail` | Jail detail heading; guard: check `/api/jails` first |
|
||||
| `/config` | `css=main,.tabs,.config-editor` | Tab navigation and editor panel |
|
||||
| `/history` | `css=main,table,.history-table` | History table visible |
|
||||
| `/blocklists` | `css=main,.blocklists-panel,.panel` | Blocklist management panel |
|
||||
|
||||
**Error detection:** Tests assert `Get Text css=body not contains Something went wrong` — the PageErrorBoundary fallback title. Scoped to `<body>` to avoid matching unrelated text elsewhere in the DOM.
|
||||
|
||||
**Vite SPA note:** All routes return HTTP 200 from the dev server (SPA routing). HTTP status checks are not meaningful — focus on DOM state after client-side navigation.
|
||||
|
||||
---
|
||||
|
||||
## 15. Error Observability & Telemetry
|
||||
|
||||
Reference in New Issue
Block a user