Fix test to correct bailout scenario
This commit is contained in:
parent
8c2bf8e8a7
commit
cb1d606044
3 changed files with 13 additions and 12 deletions
|
|
@ -7,5 +7,6 @@ export default interface IBailoutFlags {
|
|||
isSafeliteNotTheProviderBailout: boolean,
|
||||
isVehicleLookupBailout: boolean,
|
||||
isPriceServiceErrorBailout: boolean,
|
||||
isCoverageCancelledByUser: boolean
|
||||
isCoverageCancelledByUser: boolean,
|
||||
isAPIErrorBailout: boolean
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ import advancedScenario0025TestCases from "./advanced/0025a_VehicleByVINUnverifi
|
|||
import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBailout5";
|
||||
import advancedScenario0028aTestCases from "./advanced/0028a_ItacCancelMyClaim";
|
||||
import advancedScenario0029aTestCases from "./advanced/0029a_HeavyVehicleBailout";
|
||||
import advancedScenario0030aTestCases from "./advanced/0030a_PartsServiceBailout";
|
||||
import advancedScenario0030aTestCases from "./advanced/0030a_APIErrorBailout";
|
||||
import advancedScenario0031aTestCases from "./advanced/0031a_ReplaceServiceableBigTruck";
|
||||
import advancedScenario0032aTestCases from "./advanced/0032a_DeclineNonServiceableBigTruck";
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
|
||||
// Destructure bailout flags
|
||||
const { isVehicleSelectBailout, isTpaNotEnabledBailout,
|
||||
isPartsServiceErrorBailout, isVehicleLookupBailout, isPriceServiceErrorBailout,
|
||||
isAPIErrorBailout, isVehicleLookupBailout, isPriceServiceErrorBailout,
|
||||
isRequestCallbackBailout, isHeavyTruckVehicleBailout, isCoverageCancelledByUser } = testCase.testData.bailoutFlags || {};
|
||||
|
||||
const repairTypes: VehicleDamage[] = [
|
||||
|
|
@ -538,7 +538,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
await vehicleDamagePage.nextPage();
|
||||
});
|
||||
|
||||
if (isPartsServiceErrorBailout) {
|
||||
if (isAPIErrorBailout) {
|
||||
await test.step('VehicleLookupPage >> Select Lookup Type', async () => {
|
||||
await vehicleLookupPage.validateURL(vehicleLookupPage.issPageValue);
|
||||
await vehicleLookupPage.vehicleLookup(vehicleDetails!);
|
||||
|
|
@ -549,9 +549,9 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
forceAPIError(page, '/parts/api/v1/parts')
|
||||
await vinLookupPage.nextPage();
|
||||
});
|
||||
await test.step('BailoutPage >> Parts Service Error Bailout', async () => {
|
||||
await test.step('BailoutPage >> API error occurred bailout', async () => {
|
||||
await bailoutPage.validateURL(bailoutPage.issPageValue);
|
||||
await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.PartsServiceError);
|
||||
await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.ApiError);
|
||||
return;
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import { IAddress } from "@business-logic/types/IAddress";
|
|||
|
||||
const nextWeekday = getNextWeekday();
|
||||
const customerAddress: IAddress = {
|
||||
street: faker.location.streetAddress(),
|
||||
city: 'Birmingham',
|
||||
state: 'AL',
|
||||
postalCode: '35118',
|
||||
street: '474 1st St',
|
||||
city: 'Lindsay',
|
||||
state: 'CA',
|
||||
postalCode: '93247',
|
||||
country: 'United States'
|
||||
}
|
||||
const customerDetails: ICustomerDetails = {
|
||||
|
|
@ -36,7 +36,7 @@ const advancedScenario0030aData: Partial<ITestData> = {
|
|||
isItac: false,
|
||||
hasStateLawPopup: false,
|
||||
bailoutFlags: {
|
||||
isPartsServiceErrorBailout: true,
|
||||
isAPIErrorBailout: true,
|
||||
},
|
||||
|
||||
vehiclePartQuestions: [
|
||||
|
|
@ -79,7 +79,7 @@ for (const client of advancedClients) {
|
|||
const data = { ...advancedScenario0030aData };
|
||||
data.clientTag = client.clientTag;
|
||||
const tc = new TestCase({
|
||||
name: `0030a Advanced ITAC Cancel My Claim: "${client.accountName}"`,
|
||||
name: `0030a Advanced API Error Bailout: "${client.accountName}"`,
|
||||
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'],
|
||||
testData: data
|
||||
}, undefined, '0030a');
|
||||
Loading…
Reference in a new issue