playwright-testing
E2E testing with Playwright - Page Objects, cross-browser, CI/CD
By alinaqi · 3,192 installs
npx skills add alinaqi/maggy --skill playwright-testing
Source repository · Upstream listing
Playwright E2E Testing Skill
For end to end testing of web applications with Playwright cross browser, fast, reliable.
Sources: [Playwright Best Practices](https://playwright.dev/docs/best practices) [Playwright Docs](https://playwright.dev/docs/intro) [Better Stack Guide](https://betterstack.com/community/guides/testing/playwright best practices/)
Setup
Installation
Configuration
Project Structure
Locator Strategy (Priority Order)
Use locators that mirror how users interact with the page:
Chaining Locators
Page Object Model
Base Page
Page Implementation
Export All Pages
Authentication
Global Auth Setup
Using Auth in Tests
Tests Without Auth
Writing Tests
Basic Test Structure
User Flow Tests
Assertions
Web First Assertions (Auto Wait)
Soft Assertions
Common Assertions
Mocking & Network
Mock API Responses
Wait for API Calls
Visual Testing
CI/CD Integration
GitHub Actions
Run Specific Tests
Test Data
Factories
Environment Variables
Debugging
Trace Viewer
Debug Mode
VS Code Extension
Install "Playwright Test for VS Code" for:
Run tests from editor
Debug with breakpoints
Pick locators visually
Watch mode
Dead Link Detection (REQUIRED)
Every project MUST include dead link detection tests. Run these on every deployment.
Link Validator Test
Comprehensive Link Crawler
Image Link Validation
CI Integration for Link Checking
Anti Patterns
Hardcoded waits Use auto waiting assertions instead
CSS/XPath selectors Use role/text/testid locators
Testing third party sites Mock external dependencies
Shared state between tests Each test must be isolated
Missing awaits Use ESLint rule no floating promises
Flaky time based tests Mock dates/times
Testing implementation details Test user visible behavior
Huge test files Split by feature/page
Quick Reference
Package.json Scripts