Update test with new test name and scenario
This commit is contained in:
parent
7af77cae21
commit
f83eb5728c
1 changed files with 0 additions and 88 deletions
|
|
@ -1,88 +0,0 @@
|
||||||
import ClientData from "@business-logic/data/ClientData";
|
|
||||||
import TestCase from "@business-logic/types/TestCase";
|
|
||||||
import { DamageType, PartQuestionType, PaymentType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums";
|
|
||||||
import { ITestData } from "@business-logic/types/ITestData"
|
|
||||||
import { faker } from "@faker-js/faker";
|
|
||||||
import { getNextWeekday } from "@impl/utils/DateUtils";
|
|
||||||
import MockPolicyData from "@business-logic/data/MockPolicyData";
|
|
||||||
import { ICustomerDetails } from "@business-logic/types/CustomerDetails";
|
|
||||||
|
|
||||||
const nextWeekday = getNextWeekday();
|
|
||||||
const customerDetails: ICustomerDetails = {
|
|
||||||
firstName: faker.person.firstName(),
|
|
||||||
lastName: faker.person.lastName(),
|
|
||||||
email: 'itqatest@safelite.com',
|
|
||||||
phoneNumber: '614-531-0031',
|
|
||||||
notes: 'Automated Test',
|
|
||||||
address: {
|
|
||||||
street: faker.location.streetAddress(),
|
|
||||||
city: 'Columbus',
|
|
||||||
state: 'OH',
|
|
||||||
postalCode: '43220',
|
|
||||||
country: 'United States'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const policyNumber = `~AutomatedScenario0024a${crypto.randomUUID().replace(/-/g, '').slice(0, 16).toUpperCase()}`; // Ensure unique policy number for each test run since same key in request can cause 500 error
|
|
||||||
const policySoap = MockPolicyData.getPolicySoapByScenario('0024a', customerDetails, policyNumber);
|
|
||||||
|
|
||||||
const advancedScenario0024Data: Partial<ITestData> = {
|
|
||||||
clientTag: '',
|
|
||||||
isDuplicateClaim: false,
|
|
||||||
isPolicyFound: false,
|
|
||||||
isNoComp: false,
|
|
||||||
hasStateLawPopup: false,
|
|
||||||
endorsements: undefined,
|
|
||||||
isUseVehicleOnPolicy: false,
|
|
||||||
isVehicleLookupValidations: false,
|
|
||||||
isVehicleSelectBailout: false,
|
|
||||||
isAddressLookupValidations: true,
|
|
||||||
isMoldingQuestion: false,
|
|
||||||
isSafelite: true,
|
|
||||||
servicePackage: faker.helpers.enumValue(ServicePackage),
|
|
||||||
customerDetails: customerDetails,
|
|
||||||
claimDetails: {
|
|
||||||
policyNumber: policyNumber,
|
|
||||||
policyDeductible: 0.00,
|
|
||||||
damageDate: '2017-06-02',
|
|
||||||
damageCause: DamageType.Vandalism
|
|
||||||
},
|
|
||||||
policySoap: policySoap,
|
|
||||||
vehicleDetails: {
|
|
||||||
year: '2015',
|
|
||||||
make: 'Audi',
|
|
||||||
model: 'A7',
|
|
||||||
style: '4 door hatchback',
|
|
||||||
vehicleLookupType: VehicleLookupType.Address,
|
|
||||||
address: [
|
|
||||||
{ street: '9 Test Street', city: 'Columbus', state: 'OH', postalCode: '43220', lastName: 'Test' },
|
|
||||||
{ street: '8621 GREENLEAF AVE', city: 'Whittier', state: 'California', postalCode: '90602', lastName: 'Johnson' },
|
|
||||||
{ street: '6531 CANYON RANCH', city: 'Frisco', state: 'Texas', postalCode: '75036', lastName: 'TRAINOR' }
|
|
||||||
],
|
|
||||||
},
|
|
||||||
vehicleDamage: [
|
|
||||||
VehicleDamage.WindshieldCrack,
|
|
||||||
],
|
|
||||||
appointmentDetails: {
|
|
||||||
serviceLocation: ServiceLocation.InShop,
|
|
||||||
shopAddress: undefined,
|
|
||||||
appointmentDate: nextWeekday
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Add validation for deductible/covered amount
|
|
||||||
const advancedClients = ClientData.getAdvancedClients();
|
|
||||||
const advancedScenario0024TestCases: TestCase[] = [];
|
|
||||||
for (const client of advancedClients) {
|
|
||||||
const data = { ...advancedScenario0024Data };
|
|
||||||
data.clientTag = client.clientTag;
|
|
||||||
const tc = new TestCase({
|
|
||||||
name: `0024a Advanced client Unlisted Vehicle Bailout: "${client.accountName}"`,
|
|
||||||
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'],
|
|
||||||
testData: data
|
|
||||||
}, undefined, '0024a');
|
|
||||||
advancedScenario0024TestCases.push(tc);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default advancedScenario0024TestCases;
|
|
||||||
Loading…
Reference in a new issue