Scenario-26a is added
This commit is contained in:
parent
394180cfc7
commit
138ab89be8
5 changed files with 95 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -29,7 +29,6 @@ export class OrderConfirmationPage extends BasePage {
|
||||||
this.subtotalText = this.page.locator("#subtotal-value");
|
this.subtotalText = this.page.locator("#subtotal-value");
|
||||||
this.finalAmountDue = this.page.locator('#bottom-amount-due-value');
|
this.finalAmountDue = this.page.locator('#bottom-amount-due-value');
|
||||||
this.cartServicePackageText = this.page.locator('#cart-service-package');
|
this.cartServicePackageText = this.page.locator('#cart-service-package');
|
||||||
// this.validateURL(this.url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
|
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ export class WelcomePage extends BasePage {
|
||||||
this.city = page.getByRole('textbox', { name: 'In which city did the damage' });
|
this.city = page.getByRole('textbox', { name: 'In which city did the damage' });
|
||||||
this.state = page.locator('select[name="\\38 fdf9dc2e13e430eb57529499dceb3eb"]');
|
this.state = page.locator('select[name="\\38 fdf9dc2e13e430eb57529499dceb3eb"]');
|
||||||
this.cookieCloseButton = page.getByRole('button', { name: 'Close' });
|
this.cookieCloseButton = page.getByRole('button', { name: 'Close' });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async goto(clientTag: string) {
|
async goto(clientTag: string) {
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import advancedScenario0023TestCases from "./advanced/0023a_VehicleByVINPartsQns
|
||||||
import { createAccessibilityHtmlReport } from "@impl/utils/ReportUtils";
|
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";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -289,6 +290,11 @@ test.describe.parallel('ISS QA Automation Regression', () => {
|
||||||
for (const testCase of advancedScenario0025TestCases) {
|
for (const testCase of advancedScenario0025TestCases) {
|
||||||
test(...prepareTest(testCase, run, options, ruleEngine));
|
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scenario 0026a
|
||||||
|
for (const testCase of advancedScenario0026aTestCases) {
|
||||||
|
test(...prepareTest(testCase, run, options, ruleEngine));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
import ClientData from "@business-logic/data/ClientData";
|
||||||
|
import TestCase from "@business-logic/types/TestCase";
|
||||||
|
import { DamageType, PartQuestionType, PaymentType, 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";
|
||||||
|
|
||||||
|
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: 'PALM COAST',
|
||||||
|
state: 'FL',
|
||||||
|
postalCode: '32137-8523',
|
||||||
|
country: 'United States'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const policyNumber = `~AutomatedScenario0026a${faker.string.uuid().substring(0, 6)}`;
|
||||||
|
const policySoap = MockPolicyData.getPolicySoapByScenario('0026a', customerDetails, policyNumber);
|
||||||
|
|
||||||
|
const advancedScenario0026aData: Partial<ITestData> = {
|
||||||
|
clientTag: '',
|
||||||
|
isDuplicateClaim: false,
|
||||||
|
isPolicyFound: true,
|
||||||
|
isNoComp: false,
|
||||||
|
hasStateLawPopup: false,
|
||||||
|
isRecalNotification: true,
|
||||||
|
endorsements: undefined,
|
||||||
|
bailoutFlags: {
|
||||||
|
isDoNotSeeMyShopBailout: true
|
||||||
|
},
|
||||||
|
vehiclePartQuestions: [
|
||||||
|
],
|
||||||
|
isSafelite: false,
|
||||||
|
servicePackage: faker.helpers.enumValue(ServicePackage),
|
||||||
|
customerDetails: customerDetails,
|
||||||
|
claimDetails: {
|
||||||
|
policyNumber: policyNumber,
|
||||||
|
policyDeductible: 0,
|
||||||
|
damageDate: '2022-07-26',
|
||||||
|
damageCause: faker.helpers.enumValue(DamageType),
|
||||||
|
},
|
||||||
|
policySoap: policySoap,
|
||||||
|
vehicleDetails: {
|
||||||
|
year: '2021',
|
||||||
|
make: 'Subaru',
|
||||||
|
model: 'Outback',
|
||||||
|
style: ''
|
||||||
|
},
|
||||||
|
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 advancedScenario0026aTestCases: TestCase[] = [];
|
||||||
|
for (const client of advancedClients) {
|
||||||
|
const data = { ...advancedScenario0026aData };
|
||||||
|
data.clientTag = client.clientTag;
|
||||||
|
const tc = new TestCase({
|
||||||
|
name: `0026a Advanced Replace Deductible Client: "${client.accountName}"`,
|
||||||
|
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'],
|
||||||
|
testData: data
|
||||||
|
}, undefined, '0026a');
|
||||||
|
advancedScenario0026aTestCases.push(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default advancedScenario0026aTestCases;
|
||||||
Loading…
Reference in a new issue