Scenario-29a is added.
This commit is contained in:
parent
e02e821708
commit
9214a62361
3 changed files with 93 additions and 5 deletions
|
|
@ -55,6 +55,7 @@ import advancedScenario0024TestCases from "./advanced/0024a_VehicleByVINUnverifi
|
|||
import advancedScenario0025TestCases from "./advanced/0025a_VehicleByVINUnverifiedBailout";
|
||||
import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBailout5";
|
||||
import advancedScenario0028aTestCases from "./advanced/0028a_ItacCancelMyClaim";
|
||||
import advancedScenario0029aTestCases from "./advanced/0029a_HeavyVehicleBailout";
|
||||
|
||||
|
||||
|
||||
|
|
@ -301,6 +302,11 @@ test.describe.parallel('ISS QA Automation Regression', () => {
|
|||
for (const testCase of advancedScenario0028aTestCases) {
|
||||
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||
}
|
||||
|
||||
// Scenario 0029a
|
||||
for (const testCase of advancedScenario0029aTestCases) {
|
||||
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const customerDetails: ICustomerDetails = {
|
|||
const policyNumber = `~AutomatedScenario0028a${faker.string.uuid().substring(0, 6)}`;
|
||||
const policySoap = MockPolicyData.getPolicySoapByScenario('0028a', customerDetails, policyNumber);
|
||||
|
||||
const advancedScenario0013Data: Partial<ITestData> = {
|
||||
const advancedScenario0028aData: Partial<ITestData> = {
|
||||
clientTag: '',
|
||||
isDuplicateClaim: false,
|
||||
isPolicyFound: true,
|
||||
|
|
@ -79,16 +79,16 @@ const advancedScenario0013Data: Partial<ITestData> = {
|
|||
// TODO: Add validation for deductible/covered amount
|
||||
|
||||
const advancedClients = ClientData.getAdvancedClients();
|
||||
const advancedScenario0013TestCases: TestCase[] = [];
|
||||
const advancedScenario0028aTestCases: TestCase[] = [];
|
||||
for (const client of advancedClients) {
|
||||
const data = { ...advancedScenario0013Data };
|
||||
const data = { ...advancedScenario0028aData };
|
||||
data.clientTag = client.clientTag;
|
||||
const tc = new TestCase({
|
||||
name: `0028a Advanced ITAC Cancel My Claim: "${client.accountName}"`,
|
||||
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'],
|
||||
testData: data
|
||||
}, undefined, '0028a');
|
||||
advancedScenario0013TestCases.push(tc);
|
||||
advancedScenario0028aTestCases.push(tc);
|
||||
}
|
||||
|
||||
export default advancedScenario0013TestCases;
|
||||
export default advancedScenario0028aTestCases;
|
||||
82
playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts
Normal file
82
playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
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: 'San Jose',
|
||||
state: 'CA',
|
||||
postalCode: '97230-6373',
|
||||
country: 'United States'
|
||||
}
|
||||
}
|
||||
|
||||
const policyNumber = `~AutomatedScenario0029a${faker.string.uuid().substring(0, 6)}`;
|
||||
const policySoap = MockPolicyData.getPolicySoapByScenario('0029a', customerDetails, policyNumber);
|
||||
|
||||
const advancedScenario0029Data: Partial<ITestData> = {
|
||||
clientTag: '',
|
||||
isDuplicateClaim: false,
|
||||
isPolicyFound: true,
|
||||
isNoComp: false,
|
||||
endorsements: undefined,
|
||||
isUseVehicleOnPolicy: false,
|
||||
servicePackage: faker.helpers.enumValue(ServicePackage),
|
||||
customerDetails: customerDetails,
|
||||
bailoutFlags: {
|
||||
isHeavyTruckVehicleBailout: true,
|
||||
},
|
||||
claimDetails: {
|
||||
policyNumber: policyNumber,
|
||||
policyDeductible: 500,
|
||||
damageDate: '2017-06-02',
|
||||
damageCause: DamageType.Vandalism
|
||||
},
|
||||
policySoap: policySoap,
|
||||
vehicleDetails: {
|
||||
year: '2017',
|
||||
make: 'Freightliner',
|
||||
model: '114sd',
|
||||
vehicleLookupType: VehicleLookupType.Vin,
|
||||
vin: '1FUJG3DV5HHJH2985',
|
||||
},
|
||||
vehicleDamage: [
|
||||
VehicleDamage.WindshieldCrack,
|
||||
],
|
||||
appointmentDetails: {
|
||||
serviceLocation: ServiceLocation.InShop,
|
||||
shopAddress: undefined,
|
||||
appointmentDate: nextWeekday
|
||||
},
|
||||
paymentDetails: {
|
||||
paymentType: PaymentType.PayAtService
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Add validation for deductible/covered amount
|
||||
const advancedClients = ClientData.getAdvancedClients();
|
||||
const advancedScenario0029TestCases: TestCase[] = [];
|
||||
for (const client of advancedClients) {
|
||||
const data = { ...advancedScenario0029Data };
|
||||
data.clientTag = client.clientTag;
|
||||
const tc = new TestCase({
|
||||
name: `0029a Advanced client Unlisted Vehicle: "${client.accountName}"`,
|
||||
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'],
|
||||
testData: data
|
||||
}, undefined, '0029a');
|
||||
advancedScenario0029TestCases.push(tc);
|
||||
}
|
||||
|
||||
export default advancedScenario0029TestCases;
|
||||
Loading…
Reference in a new issue