DigitalConsumer.FixMyGlass/playwright-tests
maguire-arman 4047af0e96 Removes the data history SQLite file.
Deletes the ortoni-data-history.sqlite file. This file is no longer needed, potentially due to changes in how test results are handled or stored.
2025-05-08 16:10:10 -04:00
..
business-logic Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
impl Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
pages Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
tests Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
.dockerignore Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
.env Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
.env.dev Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
.env.example Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
azure-pipelines-automated-testing.yml Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
playwright.config.ts Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
README.md Initializes Playwright test framework 2025-05-08 15:45:05 -04:00
tsconfig.json Initializes Playwright test framework 2025-05-08 15:45:05 -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 or RUN npx playwright install chromium --with-deps

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.