e2e-test-builder
Skill3 starsChanged 11 months agoApache-2.0View on GitHub
Build end-to-end tests with Playwright or Cypress. Use when the user needs to test user flows, browser interactions, or full application functionality.
In this repository100 other files it gives its agents.
- accessibility-checkerSkill
- analytics-trackerSkill
- api-contract-testerSkill
- api-documentation-generatorSkill
- api-rate-limiterSkill
- appstore-screenshot-resizerSkill
- architecture-documenterSkill
- authentication-implementerSkill
- aws-resource-provisionerSkill
- browser-extension-builderSkill
- caching-implementerSkill
- changelog-generatorSkill
- chart-generatorSkill
- ci-pipeline-debuggerSkill
- cli-tool-builderSkill
- code-documenterSkill
- code-explainerSkill
- code-migration-helperSkill
- code-refactorerSkill
- code-reviewerSkill
- color-palette-generatorSkill
- comment-generatorSkill
- contributing-guide-writerSkill
- cron-job-schedulerSkill
- css-animatorSkill
- csv-processorSkill
- data-aggregatorSkill
- database-backup-restoreSkill
- database-migration-generatorSkill
- database-query-optimizerSkill
- data-transformerSkill
- data-validatorSkill
- date-time-helperSkill
- debug-helperSkill
- dependency-updaterSkill
- dependency-vulnerability-checkerSkill
- discord-bot-builderSkill
- docker-compose-builderSkill
- dockerfile-generatorSkill
- email-template-builderSkill
- env-setupSkill
- error-handlerSkill
- error-message-writerSkill
- error-response-handlerSkill
- etl-pipeline-builderSkill
- file-organizerSkill
- form-builderSkill
- git-commit-messageSkill
- github-actions-builderSkill
- gitignore-generatorSkill
- graphql-schema-builderSkill
- icon-system-builderSkill
- input-validatorSkill
- integration-test-builderSkill
- jsdoc-generatorSkill
- json-schema-generatorSkill
- kubernetes-manifest-generatorSkill
- license-chooserSkill
- linter-fixerSkill
- load-testerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create end-to-end tests for web applications.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
E2E Test Builder
Create end-to-end tests for web applications.
Playwright Tests
import { test, expect } from '@playwright/test';
test.describe('User Authentication', () => {
test('should login successfully', async ({ page }) => {
await page.goto('/login');
await page.fill('[data-testid="email"]', 'user@example.com');
await page.fill('[data-testid="password"]', 'password123');
await page.click('[data-testid="submit"]');
await expect(page).toHaveURL('/dashboard');
await expect(page.locator('[data-testid="welcome"]')).toContainText('Welcome');
});
test('should show error for invalid credentials', async ({ page }) => {
await page.goto('/login');
await page.fill('[data-testid="email"]', 'wrong@example.com');
await page.fill('[data-testid="password"]', 'wrongpass');
await page.click('[data-testid="submit"]');
await expect(page.locator('[data-testid="error"]')).toBeVisible();
await expect(page.locator('[data-testid="error"]')).toContainText('Invalid');
});
});
test.describe('Shopping Cart', () => {
test.beforeEach(async ({ page }) => {
// Login before each test
await page.goto('/login');
await page.fill('[data-testid="email"]', 'user@example.com');
await page.fill('[data-testid="password"]', 'password123');
await page.click('[data-testid="submit"]');
await page.waitForURL('/dashboard');
});
test('should add item to cart', async ({ page }) => {
await page.goto('/products');
await page.click('[data-testid="product-1"] >> text=Add to Cart');
await expect(page.locator('[data-testid="cart-count"]')).toHaveText('1');
});
test('should complete checkout', async ({ page }) => {
await page.goto('/cart');
await page.click('text=Checkout');
// Fill shipping info
await page.fill('#address', '123 Main St');
await page.fill('#city', 'New York');
await page.selectOption('#state', 'NY');
await page.click('text=Continue');
// Fill payment (test card)
await page.fill('#card', '4242424242424242');
await page.fill('#expiry', '12/25');
await page.fill('#cvc', '123');
await page.click('text=Place Order');
await expect(page.locator('h1')).toContainText('Order Confirmed');
});
});Cypress Tests
describe('User Authentication', () => {
it('should login successfully', () => {
cy.visit('/login');
cy.get('[data-testid="email"]').type('user@example.com');
cy.get('[data-testid="password"]').type('password123');
cy.get('[data-testid="submit"]').click();
cy.url().should('include', '/dashboard');
cy.get('[data-testid="welcome"]').should('contain', 'Welcome');
});
});
// Custom commands
Cypress.Commands.add('login', (email, password) => {
cy.session([email, password], () => {
cy.visit('/login');
cy.get('[data-testid="email"]').type(email);
cy.get('[data-testid="password"]').type(password);
cy.get('[data-testid="submit"]').click();
cy.url().should('include', '/dashboard');
});
});
// Usage
beforeEach(() => {
cy.login('user@example.com', 'password123');
});Best Practices
| Practice | Description |
| Use data-testid | Stable selectors |
| Isolate tests | Each test independent |
| Mock external | Mock third-party APIs |
| Wait properly | Use proper assertions |
| Clean state | Reset between tests |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

