Playwright E2E Test Suite
A full end-to-end test suite for a demo e-commerce application built with Playwright. Covers critical user flows including registration, login, product browsing, cart management, and checkout. Integrated with GitHub Actions for automatic runs on PR.
What's covered
- Page Object Model (POM) architecture
- Fixtures and reusable test helpers
- Data-driven tests with JSON fixtures
- Visual regression testing
- GitHub Actions CI pipeline
- HTML test reports
- Cross-browser (Chrome, Firefox, WebKit)
Tech Stack
Test Stats
// Playwright E2E — Checkout Flow
test.describe('Checkout Flow', () => {
test.beforeEach(async ({ page }) => {
await loginAs(page, 'standard_user');
await addToCart(page, 'Sauce Labs Backpack');
});
test('completes checkout successfully', async ({ page }) => {
await page.getByTestId('checkout').click();
await fillCheckoutForm(page, checkoutData.valid);
await expect(page.locator('.complete-header'))
.toContainText('Thank you');
});
});