Adds a new environment variable to skip content site checks, improving test environment flexibility. Improves the "nextPage" function in BasePage to handle loader elements and button states more reliably. Adds support for selecting loss location in CCPolicyInfoPage to reflect claim details accurately. Updates assertion methods to use Soft assertions for smoother test execution. Adds a new test case "InsuranceMeemicNearSchoolVerified" to expand test coverage. |
||
|---|---|---|
| .. | ||
| framework | ||
| pages | ||
| tests | ||
| .dockerignore | ||
| .env | ||
| .env.dev | ||
| .env.example | ||
| .npmrc | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.json | ||
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
-
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
- Repair or Replace: Repair
-
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
- Repair or Replace: Repair
-
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
- Repair or Replace: Repair
Cash Payment - Single Glass Replacement Scenarios
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
Cash Payment - Multiple Glass Replacement Scenarios
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
Cash Payment - Promo Scenarios
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
-
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
- Repair or Replace: Replace
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
- Follow the established page object pattern
- Add proper test documentation
- Include appropriate test tags
- 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.