Skip to content

Commit cfc98a6

Browse files
committed
chore(build): update AGENTS.md
1 parent 8adaf82 commit cfc98a6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ The e2e project uses ESLint + Prettier with these key rules:
198198
Docs screenshot tests generate screenshots used in the documentation site
199199
(`components/secutils-docs/`). Each test file in `e2e/docs/` corresponds to a guide topic
200200
(e.g. `csp.spec.ts`, `webhooks.spec.ts`, `digital_certificates.spec.ts`,
201-
`web_scraping.spec.ts`). Screenshots are saved directly into
201+
`web_scraping.spec.ts`, `export_import.spec.ts`, `home.spec.ts`, `secrets.spec.ts`,
202+
`user_scripts.spec.ts`). Screenshots are saved directly into
202203
`components/secutils-docs/static/img/docs/guides/<topic>/`.
203204

204205
```bash
@@ -223,11 +224,13 @@ All docs tests import from `helpers.ts`. Key exports:
223224
| `highlightOn(locator)` | Add a red dashed outline around an element for visual emphasis. |
224225
| `highlightOff(locator)` | Remove the highlight outline. |
225226
| `dismissAllToasts(page)` | Dismiss every visible toast notification (iterate all, not just one). |
226-
| `pinEntityTimestamps(json)` | Replace `createdAt`/`updatedAt` with `FIXED_ENTITY_TIMESTAMP` in a JSON value. |
227+
| `pinEntityTimestamps(json)` | Replace `createdAt`/`updatedAt` (and `scheduledAt`/`lastRanAt` for scheduled trackers) with `FIXED_ENTITY_TIMESTAMP` in a JSON value. |
227228
| `fixEntityTimestamps(page, pattern)` | Set up a route handler that pins timestamps in GET JSON responses matching `pattern`. |
228229
| `fixResponderRequestFields(page)` | Intercept responder request history API and pin `createdAt`/`clientAddress` to fixed values. |
229230
| `fixCertificateTemplateValidityDates(page)` | Pin `notValidBefore`/`notValidAfter` to fixed dates while preserving their duration. |
230231
| `fixTrackerResourceRevisions(page)` | Stabilize tracker revision history: strip URL query strings, normalize webhook subdomains, compute deterministic sizes, fix timestamps. |
232+
| `fixTrackerExecutionLogs(page)` | Intercept tracker execution log responses and pin `startedAt`/`finishedAt`/phase durations to fixed values. |
233+
| `fixTrackerHealthDots(page)` | Intercept tracker health summary (`logs_summary`) responses and pin timestamps to fixed values for stable health dot screenshots. |
231234

232235
### Screenshot stability
233236

@@ -285,6 +288,10 @@ Each source of dynamic data needs explicit stabilization in the test code:
285288
`element.evaluate()` after the UI renders them.
286289
- **Home page summary**: Intercept `/api/ui/home/summary` and call `pinEntityTimestamps()`
287290
on `recentItems` to avoid relative time strings.
291+
- **Tracker execution logs**: Intercept `*/logs` responses and pin `startedAt`/`finishedAt`
292+
and phase durations with `fixTrackerExecutionLogs(page)`.
293+
- **Tracker health dots**: Intercept `*/logs_summary` responses and pin timestamps with
294+
`fixTrackerHealthDots(page)`.
288295

289296
General pattern for stabilization - intercept with `page.route()`, call `route.fetch()`
290297
to get the real response, mutate the JSON, then `route.fulfill({ response, json })`:

0 commit comments

Comments
 (0)