Skip to content

Coolb0x/playwright-login-form

Repository files navigation

playwright-login-form

Test automation suite for a demo login form

Documentation

Setup Instructions

  1. Clone the repository
    git clone https://github.com/Coolb0x/playwright-login-form.git
    cd playwright-login-form
  2. Install dependencies
    npm install
    2.1. (Linux only, required for WebKit and some browsers) Install system dependencies for Playwright browsers:
    sudo npx playwright install-deps
  3. Run all Playwright tests in UI
    npx playwright test --ui
  4. View Playwright HTML report
    npx playwright show-report
  5. Run a specific test file
    npx playwright test tests/user-registration-form.spec.ts

Generated Playwright-report

playwright-report

Brief Explanation of Approach and Choices

  • Page Object Model (POM): The test suite uses the Page Object Model pattern for maintainability and readability. All page interactions are encapsulated in the RegistrationForm class, making locators and actions reusable and easy to update.

  • Selector Strategy: The tests use robust selectors such as data-cy attributes and unique id or name attributes 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

About

Test automation suite for a demo login form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published