Scenario-28a is added.
This commit is contained in:
parent
34b7897e03
commit
8c0f5844a1
5 changed files with 119 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
||||||
import { AddressLookupPage } from "../../pages/addresslookuppage";
|
import { AddressLookupPage } from "../../pages/Addresslookuppage";
|
||||||
import { BailoutPage } from "../../pages/BailoutPage";
|
import { BailoutPage } from "../../pages/BailoutPage";
|
||||||
import CapabilityQuestionsPage from "../../pages/CapabilityQuestionsPage";
|
import CapabilityQuestionsPage from "../../pages/CapabilityQuestionsPage";
|
||||||
import { ContactConfirmationPage } from "../../pages/ContactConfirmationPage";
|
import { ContactConfirmationPage } from "../../pages/ContactConfirmationPage";
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ export class CoverageStatementPage extends BasePage {
|
||||||
readonly page: Page;
|
readonly page: Page;
|
||||||
readonly scheduleOnlineButton: Locator;
|
readonly scheduleOnlineButton: Locator;
|
||||||
readonly cancelMyClaimButton: Locator;
|
readonly cancelMyClaimButton: Locator;
|
||||||
|
readonly cancelMyClaimConfirm: Locator;
|
||||||
readonly deductibleAmount: Locator;
|
readonly deductibleAmount: Locator;
|
||||||
readonly verfiyingCoverageText: Locator;
|
readonly verfiyingCoverageText: Locator;
|
||||||
readonly continueToScheduleButton: Locator; // For ITAC/NoComp
|
readonly continueToScheduleButton: Locator; // For ITAC/NoComp
|
||||||
|
|
@ -15,10 +16,11 @@ export class CoverageStatementPage extends BasePage {
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.scheduleOnlineButton = this.page.getByText('Continue to schedule online');
|
this.scheduleOnlineButton = this.page.getByText('Continue to schedule online');
|
||||||
this.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
this.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
||||||
|
this.cancelMyClaimConfirm = this.page.getByText('No, I want to cancel');
|
||||||
|
|
||||||
this.deductibleAmount = this.page.getByText('$');
|
this.deductibleAmount = this.page.getByText('$');
|
||||||
this.verfiyingCoverageText = this.page.getByRole('heading', { name: 'We’re verifying your coverage' });
|
this.verfiyingCoverageText = this.page.getByRole('heading', { name: 'We’re verifying your coverage' });
|
||||||
this.continueToScheduleButton = page.locator('div[class*="button-content"]', {hasText:'Continue to schedule online'});
|
this.continueToScheduleButton = page.locator('div[class*="button-content"]', {hasText:'Continue to schedule online'});
|
||||||
// this.validateURL(this.url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async scheduleOnline(){
|
async scheduleOnline(){
|
||||||
|
|
@ -27,6 +29,7 @@ export class CoverageStatementPage extends BasePage {
|
||||||
|
|
||||||
async cancelMyClaim(){
|
async cancelMyClaim(){
|
||||||
await this.cancelMyClaimButton.click();
|
await this.cancelMyClaimButton.click();
|
||||||
|
await this.cancelMyClaimConfirm.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async validateDeductibleAmount(customer){
|
async validateDeductibleAmount(customer){
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ import { createAccessibilityHtmlReport } from "@impl/utils/ReportUtils";
|
||||||
import advancedScenario0024TestCases from "./advanced/0024a_VehicleByVINUnverifiedBailout";
|
import advancedScenario0024TestCases from "./advanced/0024a_VehicleByVINUnverifiedBailout";
|
||||||
import advancedScenario0025TestCases from "./advanced/0025a_VehicleByVINUnverifiedBailout";
|
import advancedScenario0025TestCases from "./advanced/0025a_VehicleByVINUnverifiedBailout";
|
||||||
import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBailout5";
|
import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBailout5";
|
||||||
|
import advancedScenario0028aTestCases from "./advanced/0028a_ItacCancelMyClaim";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -295,6 +296,11 @@ test.describe.parallel('ISS QA Automation Regression', () => {
|
||||||
for (const testCase of advancedScenario0026aTestCases) {
|
for (const testCase of advancedScenario0026aTestCases) {
|
||||||
test(...prepareTest(testCase, run, options, ruleEngine));
|
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scenario 0028a
|
||||||
|
for (const testCase of advancedScenario0028aTestCases) {
|
||||||
|
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -357,7 +363,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
// Destructure bailout flags
|
// Destructure bailout flags
|
||||||
const { isVehicleSelectBailout, isDoNotSeeMyShopBailout, isTpaNotEnabledBailout,
|
const { isVehicleSelectBailout, isDoNotSeeMyShopBailout, isTpaNotEnabledBailout,
|
||||||
isHeavyTruckVehicleBailout, isPartsServiceErrorBailout,
|
isHeavyTruckVehicleBailout, isPartsServiceErrorBailout,
|
||||||
isVehicleLookupBailout, isPriceServiceErrorBailout } = testCase.testData.bailoutFlags || {};
|
isVehicleLookupBailout, isPriceServiceErrorBailout, isRequestCallbackBailout } = testCase.testData.bailoutFlags || {};
|
||||||
|
|
||||||
const repairTypes: VehicleDamage[] = [
|
const repairTypes: VehicleDamage[] = [
|
||||||
VehicleDamage.WindshieldOneChip,
|
VehicleDamage.WindshieldOneChip,
|
||||||
|
|
@ -604,7 +610,18 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
await vehiclePartQuestionsPage.selectPartQuestionResponses(vehiclePartQuestions);
|
await vehiclePartQuestionsPage.selectPartQuestionResponses(vehiclePartQuestions);
|
||||||
await vehiclePartQuestionsPage.nextPage();
|
await vehiclePartQuestionsPage.nextPage();
|
||||||
}
|
}
|
||||||
|
if (isRequestCallbackBailout) {
|
||||||
|
await test.step('CoverageStatementPage >> Cancel My claim', async () => {
|
||||||
|
await coverageStatementPage.validateURL(coverageStatementPage.issPageValue);
|
||||||
|
await coverageStatementPage.cancelMyClaim();
|
||||||
|
});
|
||||||
|
|
||||||
|
await test.step('BailoutPage >> Request Callback Bailout', async () => {
|
||||||
|
await bailoutPage.validateURL(bailoutPage.issPageValue);
|
||||||
|
await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.RequestCallback);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
await test.step('CoverageStatementPage >> Next page', async () => {
|
await test.step('CoverageStatementPage >> Next page', async () => {
|
||||||
await coverageStatementPage.validateURL(coverageStatementPage.issPageValue);
|
await coverageStatementPage.validateURL(coverageStatementPage.issPageValue);
|
||||||
// Confirm no coverage
|
// Confirm no coverage
|
||||||
|
|
|
||||||
94
playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts
Normal file
94
playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
import ClientData from "@business-logic/data/ClientData";
|
||||||
|
import TestCase from "@business-logic/types/TestCase";
|
||||||
|
import { DamageType, EndorsementType, ServiceLocation, ServicePackage, VehicleDamage } 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";
|
||||||
|
import { IAddress } from "@business-logic/types/IAddress";
|
||||||
|
|
||||||
|
const nextWeekday = getNextWeekday();
|
||||||
|
const customerAddress: IAddress = {
|
||||||
|
street: faker.location.streetAddress(),
|
||||||
|
city: 'Birmingham',
|
||||||
|
state: 'AL',
|
||||||
|
postalCode: '35118',
|
||||||
|
country: 'United States'
|
||||||
|
}
|
||||||
|
const customerDetails: ICustomerDetails = {
|
||||||
|
firstName: faker.person.firstName(),
|
||||||
|
lastName: faker.person.lastName(),
|
||||||
|
email: 'itqatest@safelite.com',
|
||||||
|
phoneNumber: '614-531-0031',
|
||||||
|
notes: 'Automated Test',
|
||||||
|
address: customerAddress
|
||||||
|
}
|
||||||
|
|
||||||
|
const policyNumber = `~AutomatedScenario0028a${faker.string.uuid().substring(0, 6)}`;
|
||||||
|
const policySoap = MockPolicyData.getPolicySoapByScenario('0028a', customerDetails, policyNumber);
|
||||||
|
|
||||||
|
const advancedScenario0013Data: Partial<ITestData> = {
|
||||||
|
clientTag: '',
|
||||||
|
isDuplicateClaim: false,
|
||||||
|
isPolicyFound: true,
|
||||||
|
isNoComp: false,
|
||||||
|
isItac: true,
|
||||||
|
hasStateLawPopup: false,
|
||||||
|
bailoutFlags: {
|
||||||
|
isRequestCallbackBailout: true,
|
||||||
|
},
|
||||||
|
isVehicleSelectBailout: false,
|
||||||
|
endorsements: [
|
||||||
|
{
|
||||||
|
endorsementType: EndorsementType.Educator,
|
||||||
|
isOnPolicy: true,
|
||||||
|
isClickYes: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
vehiclePartQuestions: [
|
||||||
|
],
|
||||||
|
isSafelite: true,
|
||||||
|
servicePackage: faker.helpers.enumValue(ServicePackage),
|
||||||
|
customerDetails: customerDetails,
|
||||||
|
claimDetails: {
|
||||||
|
policyNumber: policyNumber,
|
||||||
|
policyDeductible: 9999,
|
||||||
|
damageDate: '2023-08-01',
|
||||||
|
damageCause: faker.helpers.enumValue(DamageType)
|
||||||
|
},
|
||||||
|
policySoap: policySoap,
|
||||||
|
vehicleDetails: {
|
||||||
|
year: '2013',
|
||||||
|
make: 'Ford',
|
||||||
|
model: 'Econoline',
|
||||||
|
style: ''
|
||||||
|
},
|
||||||
|
vehicleDamage: [
|
||||||
|
VehicleDamage.WindshieldCrack
|
||||||
|
],
|
||||||
|
appointmentDetails: {
|
||||||
|
serviceLocation: ServiceLocation.Mobile,
|
||||||
|
serviceAddress: customerAddress,
|
||||||
|
appointmentDate: nextWeekday
|
||||||
|
},
|
||||||
|
paymentDetails: ClientData.getDefaultCreditCardDetails()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Add validation for deductible/covered amount
|
||||||
|
|
||||||
|
const advancedClients = ClientData.getAdvancedClients();
|
||||||
|
const advancedScenario0013TestCases: TestCase[] = [];
|
||||||
|
for (const client of advancedClients) {
|
||||||
|
const data = { ...advancedScenario0013Data };
|
||||||
|
data.clientTag = client.clientTag;
|
||||||
|
const tc = new TestCase({
|
||||||
|
name: `0028a Advanced ITAC Cancel My Claim: "${client.accountName}"`,
|
||||||
|
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'],
|
||||||
|
testData: data
|
||||||
|
}, undefined, '0028a');
|
||||||
|
advancedScenario0013TestCases.push(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default advancedScenario0013TestCases;
|
||||||
Loading…
Reference in a new issue