DigitalConsumer.FixMyGlass/playwright-tests
maguire-arman 888c235b27 Updates Dockerfile path in pipeline config
Updates the Azure pipeline configuration to reference the relocated Dockerfile.

This ensures the pipeline correctly identifies and builds the Docker image, preventing build failures.
2025-04-08 13:04:26 -04:00
..
.sauce Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
business-logic Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
devops/scripts Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
impl Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
pages Handles modal popup on content page 2025-04-08 11:18:14 -04:00
tests Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
.dockerignore Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
.env Normalizes environment variable files 2025-04-08 09:49:31 -04:00
.env.dev Adds script to run Playwright tests 2025-04-08 10:56:03 -04:00
.env.example Normalizes environment variable files 2025-04-08 09:49:31 -04:00
.sauceignore Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
azure-pipelines-automated-testing.yml Updates Dockerfile path in pipeline config 2025-04-08 13:04:26 -04:00
eslint.config.js Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00
playwright.config.ts Updates artifacts folder path 2025-04-08 11:29:47 -04:00
README.md Adds script to run Playwright tests 2025-04-08 10:56:03 -04:00
tsconfig.json Adds Playwright test framework for FMG 2025-04-07 15:40:31 -04:00

QA Automation Framework

An automated testing framework for FMG using Playwright with TypeScript.

Technology Stack

• Playwright - Core testing framework
• TypeScript - Programming language
• Node.js - Runtime environment
• SauceLabs/Dockers - Cross-browser testing platform

Key Features

• Page Object Model implementation
• Data-driven test approach
• Cross-browser testing support
• Parallel test execution
• HTML report generation
• Environment-specific configurations
• SauceLabs integration

Test Scenarios

The framework includes various test scenarios covering essential flows like:

Cash Payment - Repair Scenarios

  1. CashRepairMobileCreditCard

    • Repair or Replace: Repair
    • Damage Type: Windshield Chip (1)
    • Vehicle Lookup Type: ZIP
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: Mobile
    • Schedule Appointment Type: Range of Hours
    • Payment Type: PIA - Credit Card
  2. CashRepairInShopAfterPay

    • Repair or Replace: Repair
    • Damage Type: Windshield Chip (2)
    • Vehicle Lookup Type: ZIP
    • CASH or Insurance: CASH
    • Service Type: Standard
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: PIA - AfterPay
  3. CashRepairInShopPayPal

    • Repair or Replace: Repair
    • Damage Type: Windshield Chip (3)
    • Vehicle Lookup Type: ZIP
    • CASH or Insurance: CASH
    • Service Type: Premium
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: PIA - PayPal

Cash Payment - Single Glass Replacement Scenarios

  1. CashReplaceDynamicRecalMobile

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: Mobile
    • Schedule Appointment Type: Range of Hours
    • Payment Type: Pay At Service
    • Vehicle Info: Dynamic Recalibration Vehicle
  2. CashReplaceGlassAddressLookupInshopAfterPay

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: Address Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: PIA - Afterpay
  3. CashReplaceGlassLicensePlateLookupInshopPaypal

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: License Plate Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: PIA - PayPal
  4. CashReplaceVinMobile

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: Mobile
    • Schedule Appointment Type: Range of Hours
    • Payment Type: Pay At Service
  5. CashReplaceSafeliteCanNotRecalMobile

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: ZIP Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: Mobile
    • Schedule Appointment Type: Range of Hours
    • Payment Type: Pay At Service
    • Additional Info: Safelite Cannot Recalibrate Vehicle

Cash Payment - Multiple Glass Replacement Scenarios

  1. CashReplaceMultiGlassPromoInshop

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack, Driver Front Door, Driver Rear Door, Driver Vent Glass, Passenger Vent Glass, Rear Window
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: Pay At Service
    • Additional Info: Glass Promo
  2. CashReplaceMultiSlidingGlassDropoff

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack, Passenger Front Door, Passenger Rear Door, Rear Glass With Slider
    • Vehicle Lookup Type: ZIP Lookup
    • CASH or Insurance: CASH
    • Service Type: Standard
    • Service Location Type: Dropoff
    • Schedule Appointment Type: Dropoff
    • Payment Type: Pay At Service
    • Vehicle Info: Sliding glass vehicle, capability questions
  3. CashReplaceMultiGlassMobile

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack, Driver Quarter Panel, Passenger Quarter Panel
    • Vehicle Lookup Type: ZIP Lookup
    • CASH or Insurance: CASH
    • Service Type: Premium
    • Service Location Type: Mobile
    • Schedule Appointment Type: Range Of Hours
    • Payment Type: Pay At Service

Cash Payment - Promo Scenarios

  1. CashReplaceGlassPromoInshop

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Glass Service Only
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: Pay At Service
    • Additional Info: Glass Promo
  2. CashReplaceRainDefensePromoInshop

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Premium
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: Pay At Service
    • Additional Info: Rain Defense Promo
  3. CashReplaceWiperPromoInshop

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: VIN Lookup
    • CASH or Insurance: CASH
    • Service Type: Standard
    • Service Location Type: In-Shop
    • Schedule Appointment Type: Hourly
    • Payment Type: Pay At Service
    • Vehicle Info: Wiper Promo
  4. CashReplaceWiperDropoff

    • Repair or Replace: Replace
    • Damage Type: Windshield Crack
    • Vehicle Lookup Type: ZIP Lookup
    • CASH or Insurance: CASH
    • Service Type: Standard
    • Service Location Type: Drop Off
    • Schedule Appointment Type: Drop Off
    • Payment Type: Pay At Service

Installation

Install dependencies

npm install

npx playwright install

Run Tests with script

npm run test:playwright

Install SauceLabs CLI

npm install saucectl

Configuration

• Environment configurations in .env files
• SauceLabs configuration in config.yml
• Playwright configuration in playwright.config.ts

Project Structure

├── tests/ # Test scenarios and cases
├── pages/ # Page Object Models
├── business-logic/ # Business logic and data models
├── impl/ # Implementation utilities
└── artifacts/ # Test artifacts and results

Running Tests

Run all tests

npx playwright test

Run a specific test file

npx playwright test tests/0000__M.test.ts

Run tests with specific tag (cognitive approach)

npx playwright test --grep "@smoke"

Test Reports

Test results are available in:

• ortoni report (summarized HTML)
• HTML format (playwright-report)
• JUnit format
• SauceLabs dashboard

Reccomended Visual Studio Code Extensions

• JavaScript and TypeScript Nightly
• Playwright Test for VSCode

Key Features

Page Object Model implementation
Data-driven test approach
Cross-browser testing support
Integration with SauceLabs
Parallel test execution
HTML report generation
Environment-specific configurations

Common Test Flows

• Vehicle lookup validation
• Shop selection
• Damage assessment
• Appointment scheduling
• Coverage verification
• Payment processing

Contributing

  1. Follow the established page object pattern
  2. Add proper test documentation
  3. Include appropriate test tags
  4. Ensure tests are isolated and repeatable

Environment Variables

BASE_URL=https://www-dev2.safelite.com
CCIS_API_URL=
ADMIN_SERVICE_API_URL=
SAUCE_USERNAME=
SAUCE_ACCESS_KEY=

CI/CD Integration

The project uses Azure Pipelines for continuous integration with configurations defined in azure-pipelines.yml.