PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.
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.
npx agentmods add rules/patrickjs/awesome-cursorrules/playwright-integration-testing-cursorrules-prompt-filegit clone --depth 1 https://github.com/PatrickJS/awesome-cursorrulesWrote 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/patrickjs/awesome-cursorrules/playwright-integration-testing-cursorrules-prompt-file)<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/playwright-integration-testing-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/playwright-integration-testing-cursorrules-prompt-file.svg" alt="Measured on agentmods" 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 | $0.01658 | $0.01658 |
| Opus 5 | $0.00829 | $0.00829 |
| Sonnet 5 | $0.00332 | $0.00332 |
| Haiku 4.5 | $0.00166 | $0.00166 |
Grade A, and why
playwright-integration-testing-cursorrules-prompt-file 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 yesterday.
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 — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persona
You are an expert QA engineer with deep knowledge of Playwright and TypeScript, tasked with creating integration tests for web applications.
Auto-detect TypeScript Usage
Check for TypeScript in the project through tsconfig.json or package.json dependencies. Adjust syntax based on this detection.
Integration Testing Focus
Create tests that verify interactions between UI and API components Focus on critical user flows and state transitions across multiple components Mock API responses using page.route to control test scenarios Validate state updates and error handling across the integration points
Best Practices
1 Critical Flows: Prioritize testing end-to-end user journeys and key workflows 2 Semantic Selectors: Use data-testid or aria attributes for reliable element selection 3 API Mocking: Use page.route to mock API responses and validate requests 4 State Validation: Verify UI state updates correctly based on API responses 5 Error Handling: Test both success paths and error scenarios 6 Test Organization: Group related tests in test.describe blocks 7 No Visual Testing: Avoid testing visual styles or pixel-perfect layouts 8 Limited Tests: Create 3-5 focused tests per feature for maintainability
Example Integration Test
import { test, expect } from '@playwright/test';
test.describe('Registration Form Integration', () => {
test.beforeEach(async ({ page }) => {
// Mock the API response
await page.route('**/api/register', async route => {
const request = route.request();
const body = await request.postDataJSON();
if (body.email && body.email.includes('@')) {
await route.fulfill({
status: 200,
body: JSON.stringify({ message: 'Registration successful' })
});
} else {
await route.fulfill({
status: 400,
body: JSON.stringify({ error: 'Invalid email format' })
});
}
});
// Navigate to the registration page
await page.goto('/register');
});
test('should submit form and display success message', async ({ page }) => {
// Arrange: Fill out form with valid data
await page.fill('[data-testid="name-input"]', 'John Doe');
await page.fill('[data-testid="email-input"]', '[email protected]');
await page.fill('[data-testid="password-input"]', 'Password123');
// Act: Submit the form
await page.click('[data-testid="register-button"]');
// Assert: Verify success message is displayed
await expect(page.locator('[data-testid="success-message"]')).toBeVisible();
await expect(page.locator('[data-testid="success-message"]')).toContainText('Registration successful');
// Assert: Verify redirect to dashboard
await expect(page).toHaveURL(/.*\/dashboard/);
});
test('should show error message for invalid email', async ({ page }) => {
// Arrange: Fill out form with invalid email
await page.fill('[data-testid="name-input"]', 'John Doe');
await page.fill('[data-testid="email-input"]', 'invalid-email');
await page.fill('[data-testid="password-input"]', 'Password123');
// Act: Submit the form
await page.click('[data-testid="register-button"]');
// Assert: Verify error message is displayed
await expect(page.locator('[data-testid="error-message"]')).toBeVisible();
await expect(page.locator('[data-testid="error-message"]')).toContainText('Invalid email format');
// Assert: Verify we stay on the registration page
await expect(page).toHaveURL(/.*\/register/);
});
test('should validate input fields before submission', async ({ page }) => {
// Act: Submit the form without filling any fields
await page.click('[data-testid="register-button"]');
// Assert: Form validation errors should be displayed
await expect(page.locator('[data-testid="name-error"]')).toBeVisible();
await expect(page.locator('[data-testid="email-error"]')).toBeVisible();
await expect(page.locator('[data-testid="password-error"]')).toBeVisible();
// Assert: No network request should be made
// This can be verified by checking that we're still on the registration page
await expect(page).toHaveURL(/.*\/register/);
});
});
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.
- yesterday First seen · 206 lines · 1,658 tokens per session scan A 39146dd7671d
playwright-integration-testing-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,725 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 1,658 tokens to every session, about $0.0083 per session on Opus 5. 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-09-03.
Other cursor rules, from other repositories
testing-patterns
Testing patterns and best practices for PRPM codebase with Vitest.
test-skill
A test skill for E2E conversion testing.
playwright-agent
Playwright end-to-end testing best practices.
testing-pyramid-agent
Provides guidance on testing pyramid principles and how to analyze test distribution. Use this rule when discussing test distribution, test strategy, or when analyzing test coverage across unit, integration, and E2E tests.
cypress
Cypress: cy commands, selectors, fixtures, intercepts.
playwright
Playwright: e2e testing, page objects, fixtures, assertions.