Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/golid-ai/golidWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/golid-ai/golid/write-tests-e2e)<a href="https://agentmods.dev/rules/golid-ai/golid/write-tests-e2e"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/write-tests-e2e/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/golid-ai/golid/write-tests-e2e"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/write-tests-e2e.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01034 |
| Opus 5.5 | $0.00000 | $0.00414 |
| Sonnet 5.5 | $0.00000 | $0.00207 |
| Haiku 4.5 | $0.00000 | $0.00103 |
Grade A, and why
write-tests-e2e scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing E2E Tests
Thesis: E2E tests verify browser-visible user journeys against the full stack, so they wait for rendered UI, use stable role selectors, and run serially against shared state.
E2E tests live in frontend/tests/e2e/. They require the full stack running
(backend + DB + frontend).
SPA Navigation: Wait for Page Content
SolidJS uses client-side routing (pushState). Playwright's waitForURL waits
for a browser load event that never fires during SPA navigation. Always wait
for page content instead.
// BAD: hangs forever on SPA navigation
await page.click('button[type="submit"]');
await page.waitForURL("**/dashboard", { timeout: 15000 });
// GOOD: waits for actual rendered content
await page.click('button[type="submit"]');
await expect(page.getByRole("heading", { name: "Dashboard" })).toBeVisible({
timeout: 15000,
});
Login Verification
The login page shows "Welcome back" as its heading. Never use /welcome/i to
verify login succeeded because it matches the login page before login completes.
// BAD: matches the login page itself
await expect(page.getByText(/welcome/i)).toBeVisible();
// GOOD: "Dashboard" h1 only exists after successful login
await expect(page.getByRole("heading", { name: "Dashboard" })).toBeVisible({
timeout: 15000,
});
Selectors
When text appears in multiple elements, use role-based selectors:
// BAD: "Golid" appears in navbar, h1, and footer
await expect(page.getByText("Golid")).toBeVisible();
// GOOD: targets the specific heading
await expect(page.getByRole("heading", { name: "Golid" })).toBeVisible();
When a heading and button share text, target the button role:
// BAD: may click the h2 heading instead of the button
await page.click("text=Change Password");
// GOOD
await page.getByRole("button", { name: "Change Password" }).click();
Playwright has no getByDisplayValue. Use locator + toHaveValue:
await expect(page.locator("#email")).toHaveValue("[email protected]");
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 144 lines · 0 tokens per session scan A 85a41d8be1b4
write-tests-e2e is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,034 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
puppeteer
This guide provides opinionated, actionable best practices for writing robust, performant, and maintainable Puppeteer scripts for web scraping, automation, and testing. It emphasizes modern patterns like page.locator() and efficient resource management.
local-compose-db-lifecycle-for-web-tests
Keep local compose DB lifecycle ready for web tests.
playwright
A set of guidelines for Playwright, a tool that controls a web browser to test websites and web applications.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.