# 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 4. **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
5. **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
6. **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
7. **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
8. **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 9. **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
10. **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
11. **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 12. **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
13. **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
14. **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
15. **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 "@Alert" ## 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.