Test automation suite for a demo login form
- Clone the repository
git clone https://github.com/Coolb0x/playwright-login-form.git cd playwright-login-form - Install dependencies
2.1. (Linux only, required for WebKit and some browsers) Install system dependencies for Playwright browsers:
npm install
sudo npx playwright install-deps
- Run all Playwright tests in UI
npx playwright test --ui - View Playwright HTML report
npx playwright show-report
- Run a specific test file
npx playwright test tests/user-registration-form.spec.ts
-
Page Object Model (POM): The test suite uses the Page Object Model pattern for maintainability and readability. All page interactions are encapsulated in the
RegistrationFormclass, making locators and actions reusable and easy to update. -
Selector Strategy: The tests use robust selectors such as
data-cyattributes and uniqueidornameattributes to ensure stability and reduce flakiness. -
Test Coverage: The suite covers a wide range of scenarios, including:
- Field validation for email, confirm email and password
- UI feedback (error messages, input classes)
- API integration and validation of backend responses
- Password strength indicator and toggle functionality
