Add flag for unlisted vehicle scenarios
This commit is contained in:
parent
580969a399
commit
c8971ef97d
3 changed files with 10 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ export interface ITestData {
|
||||||
clientTag: string,
|
clientTag: string,
|
||||||
isDuplicateClaim: boolean,
|
isDuplicateClaim: boolean,
|
||||||
isPolicyFound: boolean, // Effective difference between advanced and essential
|
isPolicyFound: boolean, // Effective difference between advanced and essential
|
||||||
|
isUnverifiedPolicyAfterVehicleLookup: boolean, // Changing license plate can cause flow to change to unverified from verified
|
||||||
isUseVehicleOnPolicy: boolean, // Should we use the vehicle on the policy?
|
isUseVehicleOnPolicy: boolean, // Should we use the vehicle on the policy?
|
||||||
isVehicleLookupValidations: boolean, // Should we validate vehicle lookup?
|
isVehicleLookupValidations: boolean, // Should we validate vehicle lookup?
|
||||||
isAddressLookupValidations: boolean, // Should we validate address lookup errors?
|
isAddressLookupValidations: boolean, // Should we validate address lookup errors?
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ export class CoverageStatementPage extends BasePage {
|
||||||
super(page);
|
super(page);
|
||||||
this.page = page;
|
this.page = page;
|
||||||
|
|
||||||
this.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
this.cancelMyClaimButton = this.page.getByRole('link', { name: "No, I want to cancel" }); // seen for ITAC/NoComp flows
|
||||||
this.cancelMyClaimConfirm = this.page.getByRole('link', { name: "No, I want to cancel" }); // seen for ITAC/NoComp flows
|
this.cancelMyClaimConfirm = this.page.locator('div.text-center', { hasText: "No, I want to cancel" }); // on modal for cancel claim
|
||||||
|
|
||||||
this.deductibleAmount = this.page.locator('.cost-underline');
|
this.deductibleAmount = this.page.locator('.cost-underline');
|
||||||
this.noDeductibleRepairText = this.page.getByText('According to your policy, there is no deductible for a repair.'); // no deductible for repair text
|
this.noDeductibleRepairText = this.page.getByText('According to your policy, there is no deductible for a repair.'); // no deductible for repair text
|
||||||
|
|
@ -87,13 +87,17 @@ export class CoverageStatementPage extends BasePage {
|
||||||
const unVerifiedCustomer = claimDetails.policyDeductible === -1; // if deductible is -1, we treat it as unverified flow
|
const unVerifiedCustomer = claimDetails.policyDeductible === -1; // if deductible is -1, we treat it as unverified flow
|
||||||
|
|
||||||
if (unVerifiedCustomer) {
|
if (unVerifiedCustomer) {
|
||||||
|
|
||||||
await expect(this.unverifiedCoverageHeader).toBeVisible();
|
await expect(this.unverifiedCoverageHeader).toBeVisible();
|
||||||
|
|
||||||
await this.continueButton.click();
|
await this.continueButton.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async handleUnverifiedPolicyAfterVehicleLookupFlow(){
|
||||||
|
await expect(this.unverifiedCoverageHeader).toBeVisible();
|
||||||
|
await this.continueButton.click();
|
||||||
|
}
|
||||||
|
|
||||||
async handleITACFlow(){
|
async handleITACFlow(){
|
||||||
await expect(this.headerForITAC).toBeVisible(); // verify ITAC header is visible
|
await expect(this.headerForITAC).toBeVisible(); // verify ITAC header is visible
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,14 @@ const customerDetails: ICustomerDetails = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const policyNumber = `~AutomatedScenario0023a${faker.string.uuid().substring(0, 6)}`;
|
const policyNumber = `~AutomatedScenario0023a${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('0023a', customerDetails, policyNumber);
|
const policySoap = MockPolicyData.getPolicySoapByScenario('0023a', customerDetails, policyNumber);
|
||||||
|
|
||||||
const advancedScenario0023Data: Partial<ITestData> = {
|
const advancedScenario0023Data: Partial<ITestData> = {
|
||||||
clientTag: '',
|
clientTag: '',
|
||||||
isDuplicateClaim: false,
|
isDuplicateClaim: false,
|
||||||
isPolicyFound: true,
|
isPolicyFound: true,
|
||||||
|
isUnverifiedPolicyAfterVehicleLookup: true,
|
||||||
isNoComp: false,
|
isNoComp: false,
|
||||||
hasStateLawPopup: true,
|
hasStateLawPopup: true,
|
||||||
endorsements: undefined,
|
endorsements: undefined,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue