# playwright > E2E testing with Playwright - Author: Maciej Niepiekło - Repository: Lewiatan/theme-builder - Version: 20251212172841 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/Lewiatan/theme-builder - Web: https://mule.run/skillshub/@@Lewiatan/theme-builder~playwright:20251212172841 --- --- name: playwright description: E2E testing with Playwright --- ## TESTING ### Guidelines for E2E #### PLAYWRIGHT - Initialize configuration only with Chromium/Desktop Chrome browser - Use browser contexts for isolating test environments - Implement the Page Object Model for maintainable tests in ./e2e/page-objects - Use `data-testid` attributes when introducing resilient test-oriented selectors - When following `data-testid` convention, locate elements by `await page.getByTestId('selectorName')` - Leverage API testing for backend validation - Implement visual comparison with expect(page).toHaveScreenshot() - Use the codegen tool for test recording - Leverage trace viewer for debugging test failures - Implement test hooks for setup and teardown - Use expect assertions with specific matchers - Leverage parallel execution for faster test runs - Follow 'Arrange', 'Act', 'Assert' approach to test structure for simplicity and readability.