Add unverified big truck with labor2 fee test
This commit is contained in:
parent
9f57a956f8
commit
73dd248f0c
2 changed files with 78 additions and 4 deletions
|
|
@ -261,11 +261,11 @@ export class SchedulePage extends BasePage {
|
|||
await this.waitForPageOrComponentload();
|
||||
await this.validateProgressBar(ProgressBarPercentages.SchedulePage);
|
||||
|
||||
//Looks like an issue with the insurance flow - remove comments once fixed
|
||||
/*if (testData.isHeavyTruck) {
|
||||
//Labor2 fee will show for cash orders and some insurance orders but USAA will not show it
|
||||
if (testData.isHeavyTruck && testData.claimDetails?.client !== 'USAA') {
|
||||
const vuexState = JSON.parse(await this.page.evaluate('localStorage.getItem(\'vuex\')'));
|
||||
expect(vuexState.order.lineItems.supportingItems.find((item: any) => item && item.partNumber == "labor2")).toBeTruthy();
|
||||
}*/
|
||||
expect(vuexState.order.lineItems.supportingItems[0].partNumber).toBe("LABOR2");
|
||||
}
|
||||
|
||||
if (handleMobileFirstModal) {
|
||||
return await this.handleMobileFirstPopUp(testData);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
import { ITestData, getDefaultExperimentsData } from 'framework/TestData'
|
||||
import { ServiceLocation, DamageType } from 'safelite-playwright-core';
|
||||
import { ITestCase } from '../framework/Typedefs'
|
||||
import { PaymentMethod } from "framework/localTypes/Enums";
|
||||
import { VehicleLookupType } from 'safelite-playwright-core';
|
||||
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
|
||||
|
||||
setFakerSeedFromTestName("InsuranceAllstateBigTruckUnverified");
|
||||
|
||||
const insuranceAllstateBigTruckUnverifiedData: Partial<ITestData> = {
|
||||
...getDefaultTestData(),
|
||||
|
||||
paymentMethod: PaymentMethod.Insurance,
|
||||
|
||||
isPolicyFound: false,
|
||||
isPolicyUnverified: true,
|
||||
isHeavyTruck: true,
|
||||
isCanNotRecal: true,
|
||||
|
||||
customerDetails: {
|
||||
...getDefaultTestData().customerDetails!,
|
||||
firstName: 'Big',
|
||||
lastName: 'Truck',
|
||||
address: {
|
||||
...getDefaultTestData().customerDetails!.address,
|
||||
city: 'Dayton',
|
||||
state: 'Ohio',
|
||||
postalCode: '45424'
|
||||
}
|
||||
},
|
||||
|
||||
claimDetails: {
|
||||
client: 'Allstate',
|
||||
policyNumber: 'MockUnverifiedBigTruck',
|
||||
policyDeductible: "Unverified",
|
||||
policyZip: '45424',
|
||||
damageDate: new Date(new Date().setDate(new Date().getDate() - 1))
|
||||
.toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }),
|
||||
damageCause: DamageType.Rock
|
||||
},
|
||||
|
||||
vehicleDetails: {
|
||||
...getDefaultTestData().vehicleDetails!,
|
||||
year: '2025',
|
||||
make: 'Peterbilt',
|
||||
model: '579',
|
||||
style: 'conventional cab',
|
||||
vin: '1XPBDP9X6SD693446',
|
||||
vehicleLookupType: VehicleLookupType.Zip,
|
||||
},
|
||||
|
||||
appointmentDetails: {
|
||||
serviceLocation: ServiceLocation.InShop,
|
||||
shopAddress: '5719 Brandt Pike, Dayton, OH 45424',
|
||||
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate
|
||||
},
|
||||
|
||||
paymentDetails: {},
|
||||
|
||||
experiments: {
|
||||
...getDefaultExperimentsData()
|
||||
}
|
||||
}
|
||||
|
||||
const insuranceAllstateBigTruckUnverifiedTests: ITestCase[] = [];
|
||||
|
||||
const tc = {
|
||||
name: `InsuranceAllstateBigTruckUnverified`,
|
||||
tags: ['@E2E', '@InsuranceAllstateBigTruckUnverified', '@test_report', '@Insurance'],
|
||||
testData: insuranceAllstateBigTruckUnverifiedData
|
||||
};
|
||||
insuranceAllstateBigTruckUnverifiedTests.push(tc);
|
||||
|
||||
export default insuranceAllstateBigTruckUnverifiedTests;
|
||||
Loading…
Reference in a new issue