From 7a8c57eb7e77cabe696ed145a581571bd574f068 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Mon, 8 Jun 2026 22:37:46 -0400 Subject: [PATCH 01/13] Card 8668 Work-1 --- playwright-tests/.npmrc | 12 +++++- .../business-logic/data/ClientData.ts | 39 ++++++++++++++++++- .../business-logic/data/MockPolicyData.ts | 15 ++++++- .../business-logic/types/Client.ts | 6 ++- .../business-logic/types/ITestData.ts | 1 + .../business-logic/types/TestCase.ts | 7 +++- playwright-tests/pages/ContactDetailsPage.ts | 7 ++++ playwright-tests/pages/WelcomePage.ts | 11 +++++- playwright-tests/tests/0000__M.test.ts | 14 +++++-- .../tests/0001_EssentialReplaceStaticAdas.ts | 7 ++-- .../tests/0014_EssentialRepairMobile.ts | 4 +- .../0022_EssentialServiceableBigTruck.ts | 4 +- .../advanced/0001a_ReplaceInShopCredit.ts | 1 + .../tests/advanced/0003a_MobileAfterpay.ts | 2 +- 14 files changed, 109 insertions(+), 21 deletions(-) diff --git a/playwright-tests/.npmrc b/playwright-tests/.npmrc index dd6db73f..b13d775a 100644 --- a/playwright-tests/.npmrc +++ b/playwright-tests/.npmrc @@ -1,3 +1,11 @@ registry=https://pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/ - -always-auth=true \ No newline at end of file + + ; begin auth token +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:username=Safelite +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:_password=MlBWQzBWcHBCN3NyQnR3SWxxRFNiU1dRR0dsbDNEcUVXQmRsbDJtSkhxb0J4aUsyTlpzRUpRUUo5OUJLQUNBQUFBQTlKc0tDQUFBU0FaRE9NQ2Ru +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:email=npm requires email to be set but doesn't use the value +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:username=Safelite +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:_password=MlBWQzBWcHBCN3NyQnR3SWxxRFNiU1dRR0dsbDNEcUVXQmRsbDJtSkhxb0J4aUsyTlpzRUpRUUo5OUJLQUNBQUFBQTlKc0tDQUFBU0FaRE9NQ2Ru +//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:email=npm requires email to be set but doesn't use the value +; end auth token +always-auth=true diff --git a/playwright-tests/business-logic/data/ClientData.ts b/playwright-tests/business-logic/data/ClientData.ts index a6948d69..44d566e4 100644 --- a/playwright-tests/business-logic/data/ClientData.ts +++ b/playwright-tests/business-logic/data/ClientData.ts @@ -101,8 +101,19 @@ const essentialClients: IClient[] = [ { clientTag: '6D13AEF6-CE16-400F-9A29-A1AED5C47D48', accountName: 'Liberty Mutual', - clientFlags: { isTpaEnabled: true } + clientFlags: { isTpaEnabled: true }, + bgColor: "rgb(255, 209, 0)" }, + + { + clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314', + accountName: 'Safeco Insurance', + accountNumber: '408810', + clientFlags: { isTpaEnabled: true }, + bgColor: "rgb(255, 209, 0)", + + }, + { clientTag: 'F680CCE4-6D88-4845-9FA4-746CF54B4AC', accountName: 'M Plate', @@ -197,15 +208,41 @@ const essentialClients: IClient[] = [ clientTag: '1065734B-2292-4392-8CAF-205F07752BBE', accountName: 'Wayne Insurance', clientFlags: {} + }, + + { + clientTag: '156CDB2D-D49C-49D6-BC63-12B5BEF6D922', + accountName: 'State Farm', + accountNumber: '711310', + clientFlags: {}, } + ] const advancedClients: IClient[] = [ { clientTag: '1216EA5F-64D1-462A-A03F-34C0A652430E', accountName: 'Liberty Mutual', + accountNumber: '550036', + clientFlags: {}, + bgColor: "rgb(255, 209, 0)" + + }, + { + clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314', + accountName: 'Safeco Insurance', + accountNumber: '408810', + clientFlags: { isTpaEnabled: true }, + bgColor: "rgb(255, 209, 0)" + + }, + { + clientTag: '156CDB2D-D49C-49D6-BC63-12B5BEF6D922', + accountName: 'State Farm', + accountNumber: '711310', clientFlags: {} } + ] const defaultCreditCardDetails: IPaymentDetails = { diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 4748cfc9..15ae5dd0 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -39,7 +39,8 @@ const claimRegistrationValue = "{\"claimNumber\":\"058913992\",\"reportedDate\": export default class MockPolicyData { - static interpolatePolicyDetails(policySoap: string, customerDetails: ICustomerDetails, policyNumber: string) { + static interpolatePolicyDetails(policySoap: string, customerDetails: ICustomerDetails, policyNumber: string) + { return policySoap.replaceAll('${firstName}', customerDetails.firstName) .replaceAll('${lastName}', customerDetails.lastName) .replaceAll('${streetAddress}', customerDetails.address.street) @@ -49,6 +50,18 @@ export default class MockPolicyData { .replaceAll('${policyNumber}', policyNumber) .replaceAll('${phoneNumber}', customerDetails.phoneNumber); } + + static applyClientToPolicySoap(policySoap: string, accountNumber: string) { + let orgName = 'Liberty Mutual'; + let companyProductCd = 'liberty'; + if (accountNumber === '408810') { //this is safeco account number + orgName = 'Safeco'; + companyProductCd = 'safeco'; + } + return policySoap + .replaceAll('<_xml:Org>Liberty Mutual', `<_xml:Org>${orgName}`) + .replaceAll('<_xml:CompanyProductCd>liberty', `<_xml:CompanyProductCd>${companyProductCd}`); + } static generateCreateMockPolicyRequest(policyNumber: string, soapValue: string) { const request: IPostSaveFakeResponseRequestBody = { diff --git a/playwright-tests/business-logic/types/Client.ts b/playwright-tests/business-logic/types/Client.ts index 37ffcd0a..a65ed2e0 100644 --- a/playwright-tests/business-logic/types/Client.ts +++ b/playwright-tests/business-logic/types/Client.ts @@ -1,7 +1,9 @@ export interface IClient { clientTag: string, - accountName: string - clientFlags: Partial + accountName: string, + accountNumber?: string, + clientFlags: Partial, + bgColor?: string } export interface IClientFlags { diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index a457644c..adaa1d6c 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -5,6 +5,7 @@ import IBailoutFlags from "./IBailoutFlags" export interface ITestData { isMockTesting: boolean, clientTag: string, + accountNumber: string, isDuplicateClaim: boolean, isPolicyFound: boolean, // Effective difference between advanced and essential isUnverifiedPolicyAfterVehicleLookup: boolean, // Changing license plate can cause flow to change to unverified from verified diff --git a/playwright-tests/business-logic/types/TestCase.ts b/playwright-tests/business-logic/types/TestCase.ts index 2cd1bb5a..ce54843a 100644 --- a/playwright-tests/business-logic/types/TestCase.ts +++ b/playwright-tests/business-logic/types/TestCase.ts @@ -162,9 +162,12 @@ export default class TestCase extends DisposableBase implements ITestCase { public async setup(): Promise { if (this.testData.policySoap && this.testData.claimDetails) { const apiUtil = new CcisApiUtil(); + const accountNumber = this.testData.accountNumber ?? '550036'; + const policySoap = MockPolicyData.applyClientToPolicySoap(this.testData.policySoap, accountNumber); + + // Create Policy + const req = MockPolicyData.generateCreateMockPolicyRequest(this.testData.claimDetails.policyNumber, policySoap); - // Create Policy - const req = MockPolicyData.generateCreateMockPolicyRequest(this.testData.claimDetails.policyNumber, this.testData.policySoap); console.log('Policy Number: ' + this.testData.claimDetails.policyNumber + ' Damage Date: ' + this.testData.claimDetails.damageDate + ' Postal code: ' + this.testData.customerDetails?.address.postalCode!); const res = await apiUtil.createFakeResponse(req); console.log("Fake Policy creation status" + res.status); // For debug use console.dir(res); diff --git a/playwright-tests/pages/ContactDetailsPage.ts b/playwright-tests/pages/ContactDetailsPage.ts index 991cdff7..b40152c1 100644 --- a/playwright-tests/pages/ContactDetailsPage.ts +++ b/playwright-tests/pages/ContactDetailsPage.ts @@ -1,6 +1,7 @@ import { expect, type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; import { ICustomerDetails } from '@business-logic/types/CustomerDetails'; +import { IAddress } from '@business-logic/types/IAddress'; export class ContactDetailsPage extends BasePage { readonly page: Page; @@ -59,6 +60,12 @@ export class ContactDetailsPage extends BasePage { await this.cityTextBox.fill(alternateMobileCity); } + async fillMobileServiceAddress(serviceAddress: IAddress) { + await this.streetAddressTextBox.fill(serviceAddress.street); + await this.cityTextBox.fill(serviceAddress.city); + await expect.soft(this.zipCodeTextBox).toHaveValue(serviceAddress.postalCode); + } + async fillNotes(notes?: string) { if (notes) { await this.notesTextBox.fill(notes); diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index fe3e0e76..cba7d0e3 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -38,9 +38,18 @@ export class WelcomePage extends BasePage { async goto(clientTag: string) { await this.page.goto(process.env['BASE_URL']! + `/?issPage=entry-page&ClientTag=${clientTag}`); await this.waitForURL(this.url); - await this.cookieCloseButton.click(); + await this.dismissCookiePopupIfPresent(); } + async dismissCookiePopupIfPresent() { + try { + await this.cookieCloseButton.waitFor({ state: 'visible', timeout: 3000 }); + await this.cookieCloseButton.click(); + } catch { + } + } + + async gotoWithAuthentication(clientTag: string) { const clientAuth = await getClientAuthByClientTag(clientTag); const certificate = clientAuth.certificateInfo[0] as ICertificateInfo; diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index efb3ccaa..d1e36de6 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -858,9 +858,17 @@ async function runWorkflow(page: Page, testCase: TestCase) { await contactDetailsPage.validateURL(contactDetailsPage.issPageValue); - await contactDetailsPage.fillContactDetails(customerDetails!); - if (appointmentDetails?.alternateMobileCity) { - await contactDetailsPage.fillAlternateMobileStreetAndCity(appointmentDetails?.alternateMobileStreetAddress!, appointmentDetails?.alternateMobileCity!); + // await contactDetailsPage.fillContactDetails(customerDetails!); + // if (appointmentDetails?.alternateMobileCity) { + // await contactDetailsPage.fillAlternateMobileStreetAndCity(appointmentDetails?.alternateMobileStreetAddress!, appointmentDetails?.alternateMobileCity!); + //} + if (appointmentDetails?.serviceAddress) { + await contactDetailsPage.fillMobileServiceAddress(appointmentDetails.serviceAddress); + } else { + await contactDetailsPage.fillContactDetails(customerDetails!); + if (appointmentDetails?.alternateMobileCity) { + await contactDetailsPage.fillAlternateMobileStreetAndCity(appointmentDetails?.alternateMobileStreetAddress!, appointmentDetails?.alternateMobileCity!); + } } await contactDetailsPage.nextPage(); diff --git a/playwright-tests/tests/0001_EssentialReplaceStaticAdas.ts b/playwright-tests/tests/0001_EssentialReplaceStaticAdas.ts index 2000604a..2720f1a2 100644 --- a/playwright-tests/tests/0001_EssentialReplaceStaticAdas.ts +++ b/playwright-tests/tests/0001_EssentialReplaceStaticAdas.ts @@ -21,11 +21,10 @@ const essentialReplaceStaticAdasData: Partial = { phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]/), notes: 'Automated Test', address: { - street: "123 Test Road", - city: 'Columbus', + street: "123 Test St", + city: 'Galena', state: 'OHIO', - postalCode: '43085', - country: 'United States' + postalCode: '43021', } }, claimDetails: { diff --git a/playwright-tests/tests/0014_EssentialRepairMobile.ts b/playwright-tests/tests/0014_EssentialRepairMobile.ts index 820e1951..2488c51f 100644 --- a/playwright-tests/tests/0014_EssentialRepairMobile.ts +++ b/playwright-tests/tests/0014_EssentialRepairMobile.ts @@ -23,10 +23,10 @@ const essentialRepairMobileData: Partial = { phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]/), notes: 'Automated Test', address: { - street: '123 Test Road', + street: '7400 Safelite Way', city: 'Columbus', state: 'OHIO', - postalCode: '43016', + postalCode: '43235', country: 'United States' } }, diff --git a/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts index 3d4da669..0e3c1799 100644 --- a/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts +++ b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts @@ -31,9 +31,9 @@ const essentialServiceableBigTruckData: Partial = { notes: 'Automated Test', address: { street: '9799 Heartland Court', - city: 'Dublin', + city: 'Columbus', state: 'OHIO', - postalCode: '43016', + postalCode: '43217', country: 'United States' } }, diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index baa6a433..3a954133 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -68,6 +68,7 @@ const advancedScenario0001TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0001Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], diff --git a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts index 9ea2e07b..11ccc760 100644 --- a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts +++ b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts @@ -40,7 +40,7 @@ const advancedScenario0003Data: Partial = { { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, - optionToSelect: 'Green Tint' + optionToSelect: '05-10 Chrysler 300c' }, { partQuestionType: PartQuestionType.PassengerRearColor, From 7e87e5968347ef076a27256d5edc6ed0bd3f0798 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Mon, 15 Jun 2026 21:31:15 -0400 Subject: [PATCH 02/13] Welcome Page changes and account number details in all advanced test cases --- .../business-logic/data/ClientData.ts | 25 +++++-------- .../business-logic/types/Client.ts | 1 + playwright-tests/pages/WelcomePage.ts | 37 ++++++++++++++++++- .../advanced/0002a_ReplaceOemEndorsement.ts | 1 + .../tests/advanced/0003a_MobileAfterpay.ts | 1 + .../tests/advanced/0004a_NoDeductibleAdas.ts | 1 + .../advanced/0005a_CapabilityQuestions.ts | 1 + .../0006a_RepairNoDeductibleMobile.ts | 1 + .../advanced/0007a_RepairStateLanguage.ts | 1 + .../tests/advanced/0008a_RepairTpa.ts | 1 + .../advanced/0009a_NoDeductibleFlorida.ts | 1 + .../tests/advanced/0010a_RearGlass.ts | 1 + .../tests/advanced/0011a_ItacNoAdas.ts | 1 + .../tests/advanced/0012a_ItacDropOff.ts | 1 + .../tests/advanced/0013a_ItacMobile.ts | 1 + .../tests/advanced/0014a_NoCompAdas.ts | 1 + .../advanced/0015a_NoCompPartQuestions.ts | 1 + .../tests/advanced/0016a_NoCompAllGlass.ts | 1 + .../tests/advanced/0017a_NoCompPremium.ts | 1 + .../tests/advanced/0018a_NoCompGlassOnly.ts | 1 + .../tests/advanced/0019a_NoCompEditVehicle.ts | 1 + .../tests/advanced/0020a_NoCompChangeLoc.ts | 1 + .../tests/advanced/0021a_VehicleByPlate.ts | 1 + .../tests/advanced/0022a_VehicleByVIN.ts | 1 + .../advanced/0023a_VehicleByVINPartsQns.ts | 1 + .../tests/advanced/0024a_AddressVehicle.ts | 1 + .../0025a_VehicleByVINUnverifiedBailout.ts | 1 + .../0026a_NoDeductibleAdasBailout5.ts | 1 + .../tests/advanced/0028a_ItacCancelMyClaim.ts | 1 + .../advanced/0029a_HeavyVehicleBailout.ts | 1 + .../tests/advanced/0030a_APIErrorBailout.ts | 1 + .../0031a_ReplaceServiceableBigTruck.ts | 1 + .../0032a_DeclineNonServiceableBigTruck.ts | 1 + 33 files changed, 77 insertions(+), 16 deletions(-) diff --git a/playwright-tests/business-logic/data/ClientData.ts b/playwright-tests/business-logic/data/ClientData.ts index 44d566e4..c52a01a0 100644 --- a/playwright-tests/business-logic/data/ClientData.ts +++ b/playwright-tests/business-logic/data/ClientData.ts @@ -101,7 +101,7 @@ const essentialClients: IClient[] = [ { clientTag: '6D13AEF6-CE16-400F-9A29-A1AED5C47D48', accountName: 'Liberty Mutual', - clientFlags: { isTpaEnabled: true }, + clientFlags: { isTpaEnabled: true, isWelcomeDamageLocationRequired: true }, bgColor: "rgb(255, 209, 0)" }, @@ -109,7 +109,7 @@ const essentialClients: IClient[] = [ clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314', accountName: 'Safeco Insurance', accountNumber: '408810', - clientFlags: { isTpaEnabled: true }, + clientFlags: { isTpaEnabled: true, isWelcomeDamageLocationRequired: true}, bgColor: "rgb(255, 209, 0)", }, @@ -184,11 +184,6 @@ const essentialClients: IClient[] = [ accountName: 'QBE', clientFlags: {} }, - { - clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314', - accountName: 'Safeco Insurance', - clientFlags: { isTpaEnabled: true } - }, { clientTag: '32978a45-dd2e-4fc6-b2ca-7178efb40373', accountName: 'Secura', @@ -224,7 +219,7 @@ const advancedClients: IClient[] = [ clientTag: '1216EA5F-64D1-462A-A03F-34C0A652430E', accountName: 'Liberty Mutual', accountNumber: '550036', - clientFlags: {}, + clientFlags: {isWelcomeDamageLocationRequired: true}, bgColor: "rgb(255, 209, 0)" }, @@ -232,16 +227,10 @@ const advancedClients: IClient[] = [ clientTag: 'A5F7D473-29C4-4E2C-AD08-A3AB13FE0314', accountName: 'Safeco Insurance', accountNumber: '408810', - clientFlags: { isTpaEnabled: true }, + clientFlags: { isTpaEnabled: true, isWelcomeDamageLocationRequired: true }, bgColor: "rgb(255, 209, 0)" }, - { - clientTag: '156CDB2D-D49C-49D6-BC63-12B5BEF6D922', - accountName: 'State Farm', - accountNumber: '711310', - clientFlags: {} - } ] @@ -345,4 +334,10 @@ export default class ClientData { static getDefaultPaypalDetails() { return defaultPaypalDetails; } + + static getClientByTag(clientTag: string) { + return [...essentialClients, ...advancedClients].find( + client => client.clientTag === clientTag + ); + } } \ No newline at end of file diff --git a/playwright-tests/business-logic/types/Client.ts b/playwright-tests/business-logic/types/Client.ts index a65ed2e0..27db22be 100644 --- a/playwright-tests/business-logic/types/Client.ts +++ b/playwright-tests/business-logic/types/Client.ts @@ -9,4 +9,5 @@ export interface IClient { export interface IClientFlags { isTpaEnabled: boolean; isAuthenticationEnabled: boolean; + isWelcomeDamageLocationRequired?: boolean; } \ No newline at end of file diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index cba7d0e3..d5d0a669 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -4,6 +4,7 @@ import { IClaimDetails, ICustomerDetails } from '@business-logic/types/CustomerD import { getClientAuthByClientTag, getClientSignature } from '@impl/api/AdminServiceApiUtil'; import { ICertificateInfo, IClientSignatureRequest } from '@business-logic/types/Authentication'; import { buildToken, getTimestamp } from '@impl/utils/TokenUtils'; +import ClientData from "@business-logic/data/ClientData"; export class WelcomePage extends BasePage { readonly page: Page; @@ -15,8 +16,11 @@ export class WelcomePage extends BasePage { readonly emailAddress: Locator; readonly city: Locator; readonly state: Locator; + readonly lossCity: Locator; readonly cookieCloseButton: Locator; readonly GetStartedButton: Locator; + readonly applicationPageHeader: Locator; + url = process.env['BASE_URL']! + '/?issPage=welcome-page'; issPageValue = 'welcome-page'; @@ -33,6 +37,8 @@ export class WelcomePage extends BasePage { this.state = page.locator('select[name="\\38 fdf9dc2e13e430eb57529499dceb3eb"]'); this.cookieCloseButton = page.getByRole('button', { name: 'Close' }); this.GetStartedButton = page.getByRole('button', { name: 'Get Started' }); + this.lossCity = page.getByRole('textbox', { name: 'Loss city' }); + this.applicationPageHeader = page.locator('.site-header-container'); } async goto(clientTag: string) { @@ -70,11 +76,40 @@ export class WelcomePage extends BasePage { await this.cookieCloseButton.click(); } - async hasCityInfo() { + async hasCityInfo() { await expect.soft(this.damageCause).toBeVisible(); return this.city.isVisible(); } + async hasLossLocationInfo() { + return this.lossCity.isVisible(); + } + + async hasApplicationPageHeader(currentClientTag: string) { + const client = ClientData.getClientByTag(currentClientTag); + + if (client?.bgColor) { + const actualBgColor = await this.applicationPageHeader.evaluate((el) => { + return window.getComputedStyle(el).getPropertyValue('background-color'); + }); + + const normalize = (color: string) => color.replace(/\s+/g, ''); + expect(normalize(actualBgColor)).toBe(normalize(client.bgColor)); + } + } + + async validateDamageLocationFieldsIfRequired(clientTag: string) { + const client = ClientData.getClientByTag(clientTag); + if (!client?.clientFlags.isWelcomeDamageLocationRequired) { + return; + } + + await expect(this.page.getByText(/which city did the damage occur/i)).toBeVisible(); + await expect(this.page.getByText(/which state did the damage occur/i)).toBeVisible(); + await expect(this.city).toBeVisible(); + await expect(this.state).toBeVisible(); + } + async populatePage(customerDetails: ICustomerDetails, claimDetails: IClaimDetails, isFillCityInfo: boolean) { await this.policyNumber.fill(claimDetails.policyNumber); await this.phoneNumber.fill(customerDetails.phoneNumber); diff --git a/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts b/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts index c124598f..2a9dc346 100644 --- a/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts +++ b/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts @@ -117,6 +117,7 @@ const advancedScenario0002TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0002Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0002a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts index 11ccc760..908ceff8 100644 --- a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts +++ b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts @@ -85,6 +85,7 @@ const advancedScenario0003TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0003Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0003a Advanced Replace Deductible Mobile Afterpay Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0004a_NoDeductibleAdas.ts b/playwright-tests/tests/advanced/0004a_NoDeductibleAdas.ts index 21015d9d..845a8907 100644 --- a/playwright-tests/tests/advanced/0004a_NoDeductibleAdas.ts +++ b/playwright-tests/tests/advanced/0004a_NoDeductibleAdas.ts @@ -71,6 +71,7 @@ const advancedScenario0004aTestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0004aData }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0004a Advanced Replace Deductible Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0005a_CapabilityQuestions.ts b/playwright-tests/tests/advanced/0005a_CapabilityQuestions.ts index 0d0bc31f..afdbfc4f 100644 --- a/playwright-tests/tests/advanced/0005a_CapabilityQuestions.ts +++ b/playwright-tests/tests/advanced/0005a_CapabilityQuestions.ts @@ -80,6 +80,7 @@ const advancedScenario0005TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0005Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0005a Advanced Replace Capability Questions Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0006a_RepairNoDeductibleMobile.ts b/playwright-tests/tests/advanced/0006a_RepairNoDeductibleMobile.ts index 279f141c..3a14441a 100644 --- a/playwright-tests/tests/advanced/0006a_RepairNoDeductibleMobile.ts +++ b/playwright-tests/tests/advanced/0006a_RepairNoDeductibleMobile.ts @@ -84,6 +84,7 @@ const advancedScenario0006TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0006Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0006a Advanced Repair No Deductible Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0007a_RepairStateLanguage.ts b/playwright-tests/tests/advanced/0007a_RepairStateLanguage.ts index 0ece73cd..341097ca 100644 --- a/playwright-tests/tests/advanced/0007a_RepairStateLanguage.ts +++ b/playwright-tests/tests/advanced/0007a_RepairStateLanguage.ts @@ -84,6 +84,7 @@ const advancedScenario0007TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0007Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0007a Advanced Repair SC State Language Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0008a_RepairTpa.ts b/playwright-tests/tests/advanced/0008a_RepairTpa.ts index 621ea38d..e239cd54 100644 --- a/playwright-tests/tests/advanced/0008a_RepairTpa.ts +++ b/playwright-tests/tests/advanced/0008a_RepairTpa.ts @@ -70,6 +70,7 @@ const advancedScenario0008TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0008Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0008a Advanced Repair TPA Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0009a_NoDeductibleFlorida.ts b/playwright-tests/tests/advanced/0009a_NoDeductibleFlorida.ts index 7b0dae5b..de838044 100644 --- a/playwright-tests/tests/advanced/0009a_NoDeductibleFlorida.ts +++ b/playwright-tests/tests/advanced/0009a_NoDeductibleFlorida.ts @@ -90,6 +90,7 @@ const advancedScenario0009TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0009Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0009a Advanced Replace No Deductible FL Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0010a_RearGlass.ts b/playwright-tests/tests/advanced/0010a_RearGlass.ts index bc4e0c8f..d1b71b63 100644 --- a/playwright-tests/tests/advanced/0010a_RearGlass.ts +++ b/playwright-tests/tests/advanced/0010a_RearGlass.ts @@ -91,6 +91,7 @@ const advancedScenario0010TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0010Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0010a Advanced Replace No Deductible FL Rear Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0011a_ItacNoAdas.ts b/playwright-tests/tests/advanced/0011a_ItacNoAdas.ts index 7d3a1b04..3a146f53 100644 --- a/playwright-tests/tests/advanced/0011a_ItacNoAdas.ts +++ b/playwright-tests/tests/advanced/0011a_ItacNoAdas.ts @@ -104,6 +104,7 @@ const advancedScenario0011TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0011Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0011a Advanced ITAC No Adas Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0012a_ItacDropOff.ts b/playwright-tests/tests/advanced/0012a_ItacDropOff.ts index 9f393b66..0128076b 100644 --- a/playwright-tests/tests/advanced/0012a_ItacDropOff.ts +++ b/playwright-tests/tests/advanced/0012a_ItacDropOff.ts @@ -79,6 +79,7 @@ const advancedScenario0012TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0012Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0012a Advanced ITAC Drop-Off Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0013a_ItacMobile.ts b/playwright-tests/tests/advanced/0013a_ItacMobile.ts index 288f631e..656732eb 100644 --- a/playwright-tests/tests/advanced/0013a_ItacMobile.ts +++ b/playwright-tests/tests/advanced/0013a_ItacMobile.ts @@ -81,6 +81,7 @@ const advancedScenario0013TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0013Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0013a Advanced $0 Deductible with Vaps Mobile Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0014a_NoCompAdas.ts b/playwright-tests/tests/advanced/0014a_NoCompAdas.ts index a88d2ba9..c29a5714 100644 --- a/playwright-tests/tests/advanced/0014a_NoCompAdas.ts +++ b/playwright-tests/tests/advanced/0014a_NoCompAdas.ts @@ -79,6 +79,7 @@ const advancedScenario0014TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0014Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0014a Advanced Replace NoComp Adas Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts b/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts index e4aca6e3..407c83e6 100644 --- a/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts +++ b/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts @@ -92,6 +92,7 @@ const advancedScenario0015TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0015Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0015a Advanced Replace NoComp Parts Questions Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts b/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts index 23796265..65fb30db 100644 --- a/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts +++ b/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts @@ -114,6 +114,7 @@ const advancedScenario0016TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0016Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0016a Advanced Replace NoComp All Glass Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@Defect-INSR-2138'], diff --git a/playwright-tests/tests/advanced/0017a_NoCompPremium.ts b/playwright-tests/tests/advanced/0017a_NoCompPremium.ts index 5c70f919..c2f7c607 100644 --- a/playwright-tests/tests/advanced/0017a_NoCompPremium.ts +++ b/playwright-tests/tests/advanced/0017a_NoCompPremium.ts @@ -85,6 +85,7 @@ const advancedScenario0017TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0017Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0017a Advanced Repair NoComp Premium Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0018a_NoCompGlassOnly.ts b/playwright-tests/tests/advanced/0018a_NoCompGlassOnly.ts index 9cb32f2a..8b63aafa 100644 --- a/playwright-tests/tests/advanced/0018a_NoCompGlassOnly.ts +++ b/playwright-tests/tests/advanced/0018a_NoCompGlassOnly.ts @@ -82,6 +82,7 @@ const advancedScenario0018TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0018Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0018a Advanced Repair No Deductible Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0019a_NoCompEditVehicle.ts b/playwright-tests/tests/advanced/0019a_NoCompEditVehicle.ts index 48ce03b8..033c4e3c 100644 --- a/playwright-tests/tests/advanced/0019a_NoCompEditVehicle.ts +++ b/playwright-tests/tests/advanced/0019a_NoCompEditVehicle.ts @@ -84,6 +84,7 @@ const advancedScenario0019TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0019Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0019a Advanced Repair No Deductible Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0020a_NoCompChangeLoc.ts b/playwright-tests/tests/advanced/0020a_NoCompChangeLoc.ts index a565be44..c55f5310 100644 --- a/playwright-tests/tests/advanced/0020a_NoCompChangeLoc.ts +++ b/playwright-tests/tests/advanced/0020a_NoCompChangeLoc.ts @@ -83,6 +83,7 @@ const advancedScenario0020TestCases: TestCase[] = []; for (const client of advancedClients) { const data = {...advancedScenario0020Data}; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0020a Advanced Repair Change Location Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced','@Defect-INSR-2149'], diff --git a/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts b/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts index 711ab691..a7c43f72 100644 --- a/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts +++ b/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts @@ -77,6 +77,7 @@ const advancedScenario0021TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0021Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0021a Advanced client Vehicle By License Plate: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts index 671c69de..5bf11027 100644 --- a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts +++ b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts @@ -74,6 +74,7 @@ const advancedScenario0022TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0022Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0022a Advanced Client Vehicle By Vin: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts b/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts index 5a33473c..6e034a0d 100644 --- a/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts +++ b/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts @@ -74,6 +74,7 @@ const advancedScenario0023TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0023Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0023a Advanced client Unlisted Vehicle: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0024a_AddressVehicle.ts b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts index dbfcb8ae..7aa61dc3 100644 --- a/playwright-tests/tests/advanced/0024a_AddressVehicle.ts +++ b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts @@ -81,6 +81,7 @@ const advancedScenario0024TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0024Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0024a Advanced Client Address Vehicle Lookup: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0025a_VehicleByVINUnverifiedBailout.ts b/playwright-tests/tests/advanced/0025a_VehicleByVINUnverifiedBailout.ts index 435d5a51..a31c610b 100644 --- a/playwright-tests/tests/advanced/0025a_VehicleByVINUnverifiedBailout.ts +++ b/playwright-tests/tests/advanced/0025a_VehicleByVINUnverifiedBailout.ts @@ -74,6 +74,7 @@ const advancedScenario0025TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0025Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0025a Advanced client Unlisted Vehicle Bailout: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts b/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts index 63902ced..4bd6d659 100644 --- a/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts +++ b/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts @@ -76,6 +76,7 @@ const advancedScenario0026aTestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0026aData }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0026a Advanced Replace Deductible Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts b/playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts index 56e5888b..5ea84868 100644 --- a/playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts +++ b/playwright-tests/tests/advanced/0028a_ItacCancelMyClaim.ts @@ -83,6 +83,7 @@ const advancedScenario0028aTestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0028aData }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0028a Advanced ITAC Cancel My Claim: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts b/playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts index 308ac97a..be5d128c 100644 --- a/playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts +++ b/playwright-tests/tests/advanced/0029a_HeavyVehicleBailout.ts @@ -77,6 +77,7 @@ const advancedScenario0029TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0029Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0029a Advanced client Unlisted Vehicle: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0030a_APIErrorBailout.ts b/playwright-tests/tests/advanced/0030a_APIErrorBailout.ts index 295c3aed..5ff0cef1 100644 --- a/playwright-tests/tests/advanced/0030a_APIErrorBailout.ts +++ b/playwright-tests/tests/advanced/0030a_APIErrorBailout.ts @@ -78,6 +78,7 @@ const advancedScenario0030aTestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0030aData }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0030a Advanced API Error Bailout: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], diff --git a/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts b/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts index bf4218e5..5699def3 100644 --- a/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts +++ b/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts @@ -75,6 +75,7 @@ const advancedScenario0031TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0031Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0031a Advanced Replace Serviceable Big Truck: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], diff --git a/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts b/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts index 20185f72..f9653fa7 100644 --- a/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts +++ b/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts @@ -73,6 +73,7 @@ const advancedScenario0032TestCases: TestCase[] = []; for (const client of advancedClients) { const data = { ...advancedScenario0032Data }; data.clientTag = client.clientTag; + data.accountNumber = client.accountNumber; const tc = new TestCase({ name: `0032a Advanced Decline Non-Serviceable Big Truck: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], From 26406053db54f4f866cf4f9dd0f1ed55d0f70312 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Mon, 15 Jun 2026 21:53:47 -0400 Subject: [PATCH 03/13] Advanced Client work for Safeco --- .../business-logic/data/ClientData.ts | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/playwright-tests/business-logic/data/ClientData.ts b/playwright-tests/business-logic/data/ClientData.ts index c52a01a0..e2854959 100644 --- a/playwright-tests/business-logic/data/ClientData.ts +++ b/playwright-tests/business-logic/data/ClientData.ts @@ -336,8 +336,38 @@ export default class ClientData { } static getClientByTag(clientTag: string) { - return [...essentialClients, ...advancedClients].find( - client => client.clientTag === clientTag + return this.resolveClientForTest(clientTag); + } + + static getClientByAccountNumber(accountNumber: string) { + const advancedMatch = advancedClients.find(client => client.accountNumber === accountNumber); + if (advancedMatch) { + return advancedMatch; + } + return essentialClients.find(client => client.accountNumber === accountNumber); + } + + static resolveClientForTest(clientTag: string, accountNumber?: string): IClient | undefined { + const normalizedTag = clientTag.toLowerCase(); + + if (accountNumber) { + const clientByAccount = this.getClientByAccountNumber(accountNumber); + if (clientByAccount?.clientTag.toLowerCase() === normalizedTag) { + return clientByAccount; + } + } + + const essentialMatch = essentialClients.find( + client => client.clientTag.toLowerCase() === normalizedTag ); + const advancedMatch = advancedClients.find( + client => client.clientTag.toLowerCase() === normalizedTag + ); + + if (essentialMatch && advancedMatch) { + return essentialMatch; + } + + return advancedMatch ?? essentialMatch; } } \ No newline at end of file From 778ed41d8995e24b891fa5d8c6622d9dff5f1c77 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Tue, 16 Jun 2026 21:21:08 -0400 Subject: [PATCH 04/13] Code Work --- .../business-logic/data/ClientData.ts | 10 ++++- .../business-logic/data/MockPolicyData.ts | 25 ++++++------ .../business-logic/types/Client.ts | 5 ++- .../business-logic/types/ClientMockProfile.ts | 8 ++++ .../business-logic/types/TestCase.ts | 39 ++++++++++++------- 5 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 playwright-tests/business-logic/types/ClientMockProfile.ts diff --git a/playwright-tests/business-logic/data/ClientData.ts b/playwright-tests/business-logic/data/ClientData.ts index e2854959..73c837ab 100644 --- a/playwright-tests/business-logic/data/ClientData.ts +++ b/playwright-tests/business-logic/data/ClientData.ts @@ -220,7 +220,10 @@ const advancedClients: IClient[] = [ accountName: 'Liberty Mutual', accountNumber: '550036', clientFlags: {isWelcomeDamageLocationRequired: true}, - bgColor: "rgb(255, 209, 0)" + bgColor: "rgb(255, 209, 0)", + mockProfile: { + acordSoap: { orgName: 'Liberty Mutual', companyProductCd: 'liberty' }, + }, }, { @@ -228,7 +231,10 @@ const advancedClients: IClient[] = [ accountName: 'Safeco Insurance', accountNumber: '408810', clientFlags: { isTpaEnabled: true, isWelcomeDamageLocationRequired: true }, - bgColor: "rgb(255, 209, 0)" + bgColor: "rgb(255, 209, 0)", + mockProfile: { + acordSoap: { orgName: 'Safeco', companyProductCd: 'safeco' }, + }, }, diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 15ae5dd0..7f6192c4 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -1,5 +1,6 @@ import { IPostSaveFakeResponseRequestBody } from "@business-logic/types/CcisApi"; import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; +import ClientData from "./ClientData"; const policySoapByScenario: { [x: string]: string } = { '0001a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2023-10-19T20:26:10Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2023-10-19T20:26:10Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>d30c40e1-3a1e-4351-85b9-40abdc061fad <_xml:PolicyInqRs> <_xml:RqUID>d30c40e1-3a1e-4351-85b9-40abdc061fad <_xml:TransactionResponseDt>2023-10-19T20:26:10Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-10-01 <_xml:Requestor id= \"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= \"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= \"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>+${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>F <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>OR <_xml:ContractTerm> <_xml:EffectiveDt>2023-03-21 <_xml:ExpirationDt>2099-03-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3102863830064 <_xml:Location> <_xml:ItemIdInfo id= \"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>BMW <_xml:Model>740 <_xml:ModelYear>2020 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>OR <_xml:VehIdentificationNumber>WBA7T2C01LGL17632 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>250.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= \"endorsementId_1\" IdRef= \"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', @@ -50,22 +51,18 @@ export default class MockPolicyData { .replaceAll('${policyNumber}', policyNumber) .replaceAll('${phoneNumber}', customerDetails.phoneNumber); } - + static applyClientToPolicySoap(policySoap: string, accountNumber: string) { - let orgName = 'Liberty Mutual'; - let companyProductCd = 'liberty'; - if (accountNumber === '408810') { //this is safeco account number - orgName = 'Safeco'; - companyProductCd = 'safeco'; - } + const client = ClientData.getClientByAccountNumber(accountNumber); + const acordSoap = client?.mockProfile?.acordSoap ?? { orgName: '', companyProductCd: '' }; return policySoap - .replaceAll('<_xml:Org>Liberty Mutual', `<_xml:Org>${orgName}`) - .replaceAll('<_xml:CompanyProductCd>liberty', `<_xml:CompanyProductCd>${companyProductCd}`); + .replaceAll('<_xml:Org>Liberty Mutual', `<_xml:Org>${acordSoap.orgName}`) + .replaceAll('<_xml:CompanyProductCd>liberty', `<_xml:CompanyProductCd>${acordSoap.companyProductCd}`); } - static generateCreateMockPolicyRequest(policyNumber: string, soapValue: string) { + static generateCreateMockPolicyRequest(accountNumber: string, policyNumber: string, soapValue: string) { const request: IPostSaveFakeResponseRequestBody = { - accountNumber: '550036', // TODO: Update when we have more than just liberty mutual + accountNumber: accountNumber, responseType: 'Policy', key: policyNumber, value: soapValue @@ -73,12 +70,12 @@ export default class MockPolicyData { return request; } - static generateCreateClaimRegistrationRequest(policyNumber: string) { + static generateCreateClaimRegistrationRequest(accountNumber: string, policyNumber: string, claimValue?: string) { const request: IPostSaveFakeResponseRequestBody = { - accountNumber: '550036', // TODO: Update when we have more than just liberty mutual + accountNumber: accountNumber, responseType: 'ClaimRegistration', key: policyNumber, - value: claimRegistrationValue + value: claimValue ?? claimRegistrationValue } return request; diff --git a/playwright-tests/business-logic/types/Client.ts b/playwright-tests/business-logic/types/Client.ts index 27db22be..0b2d456c 100644 --- a/playwright-tests/business-logic/types/Client.ts +++ b/playwright-tests/business-logic/types/Client.ts @@ -1,9 +1,12 @@ +import { IClientMockProfile } from "./ClientMockProfile"; + export interface IClient { clientTag: string, accountName: string, accountNumber?: string, clientFlags: Partial, - bgColor?: string + bgColor?: string, + mockProfile?: IClientMockProfile } export interface IClientFlags { diff --git a/playwright-tests/business-logic/types/ClientMockProfile.ts b/playwright-tests/business-logic/types/ClientMockProfile.ts new file mode 100644 index 00000000..7b3a1c56 --- /dev/null +++ b/playwright-tests/business-logic/types/ClientMockProfile.ts @@ -0,0 +1,8 @@ +export interface IAcordSoapConfig { + orgName: string; + companyProductCd: string; +} + +export interface IClientMockProfile { + acordSoap?: IAcordSoapConfig; +} \ No newline at end of file diff --git a/playwright-tests/business-logic/types/TestCase.ts b/playwright-tests/business-logic/types/TestCase.ts index ce54843a..f3cd0111 100644 --- a/playwright-tests/business-logic/types/TestCase.ts +++ b/playwright-tests/business-logic/types/TestCase.ts @@ -162,18 +162,18 @@ export default class TestCase extends DisposableBase implements ITestCase { public async setup(): Promise { if (this.testData.policySoap && this.testData.claimDetails) { const apiUtil = new CcisApiUtil(); - const accountNumber = this.testData.accountNumber ?? '550036'; + const accountNumber = this.testData.accountNumber ?? ''; const policySoap = MockPolicyData.applyClientToPolicySoap(this.testData.policySoap, accountNumber); // Create Policy - const req = MockPolicyData.generateCreateMockPolicyRequest(this.testData.claimDetails.policyNumber, policySoap); + const req = MockPolicyData.generateCreateMockPolicyRequest(accountNumber,this.testData.claimDetails.policyNumber, policySoap); console.log('Policy Number: ' + this.testData.claimDetails.policyNumber + ' Damage Date: ' + this.testData.claimDetails.damageDate + ' Postal code: ' + this.testData.customerDetails?.address.postalCode!); const res = await apiUtil.createFakeResponse(req); console.log("Fake Policy creation status" + res.status); // For debug use console.dir(res); // Create Claim Registration - const claimRegReq = MockPolicyData.generateCreateClaimRegistrationRequest(this.testData.claimDetails.policyNumber); + const claimRegReq = MockPolicyData.generateCreateClaimRegistrationRequest(accountNumber,this.testData.claimDetails.policyNumber); const claimRegRes = await apiUtil.createFakeResponse(claimRegReq); console.log("Fake claim registration creation status: " + claimRegRes.status); //For debug use console.dir(claimRegRes); } @@ -216,25 +216,36 @@ export default class TestCase extends DisposableBase implements ITestCase { }; } - protected async dispose(): Promise { - if (this.testData.policySoap && this.testData.claimDetails) { - const apiUtil = new CcisApiUtil(); + protected async dispose(): Promise { + if (!this.testData.claimDetails) { + return; + } - // Delete policy + const accountNumber = this.testData.accountNumber ?? ''; + + const apiUtil = new CcisApiUtil(); + const policyNumber = this.testData.claimDetails.policyNumber; + + try { const policyDeleteRes = await apiUtil.deleteFakeResponse({ - accountNumber: '550036', // TODO: Change when we have more clients - key: this.testData.claimDetails.policyNumber, + accountNumber: accountNumber, + key: policyNumber, responseType: 'Policy' }); - console.log("Delete 'Fake policy' status: " + policyDeleteRes.status); //For debug use console.dir(policyDeleteRes); + console.log("Delete 'Fake policy' status: " + policyDeleteRes.status); + } catch (error) { + console.warn("Delete 'Fake policy' skipped or failed (mock may not exist): " + error); + } - // Delete Claim Registration + try { const crDeleteRes = await apiUtil.deleteFakeResponse({ - accountNumber: '550036', // TODO: Change when we have more clients - key: this.testData.claimDetails.policyNumber, + accountNumber: accountNumber, + key: policyNumber, responseType: 'ClaimRegistration' }); - console.log("Delete 'Fake Claim Registration policy' status: " + crDeleteRes.status); //For debug use console.dir(crDeleteRes); + console.log("Delete 'Fake Claim Registration policy' status: " + crDeleteRes.status); + } catch (error) { + console.warn("Delete 'Fake Claim Registration' skipped or failed (mock may not exist): " + error); } } } From ab4735b01783b38a2c579c0b371a973897615284 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 17 Jun 2026 16:10:40 -0400 Subject: [PATCH 05/13] Small Update for Validation --- playwright-tests/pages/WelcomePage.ts | 6 +++--- playwright-tests/tests/0000__M.test.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index d5d0a669..04ccd300 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -85,8 +85,8 @@ export class WelcomePage extends BasePage { return this.lossCity.isVisible(); } - async hasApplicationPageHeader(currentClientTag: string) { - const client = ClientData.getClientByTag(currentClientTag); + async hasApplicationPageHeader(currentClientTag: string, accountNumber?: string) { + const client = ClientData.resolveClientForTest(currentClientTag, accountNumber); if (client?.bgColor) { const actualBgColor = await this.applicationPageHeader.evaluate((el) => { @@ -98,7 +98,7 @@ export class WelcomePage extends BasePage { } } - async validateDamageLocationFieldsIfRequired(clientTag: string) { + async validateDamageLocationFieldsIfRequired(clientTag: string, accountNumber?: string) { const client = ClientData.getClientByTag(clientTag); if (!client?.clientFlags.isWelcomeDamageLocationRequired) { return; diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index d1e36de6..d2c1e1fa 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -411,6 +411,20 @@ async function runWorkflow(page: Page, testCase: TestCase) { const hasEndorsements = endorsements && endorsements.length > 0; + await test.step('WelcomePage >> Check Page Header Background Color', async () => { + await welcomePage.hasApplicationPageHeader( + testCase.testData.clientTag!, + testCase.testData.accountNumber + ); + }); + + await test.step('WelcomePage >> Validate damage location fields', async () => { + await welcomePage.validateDamageLocationFieldsIfRequired( + testCase.testData.clientTag!, + testCase.testData.accountNumber + ); + }); + await test.step('WelcomePage >> Populate Customer Details', async () => { await welcomePage.populatePage(customerDetails!, claimDetails!, await welcomePage.hasCityInfo()); await welcomePage.GetStartedButton.click(); From c85a6eba9eec6e5ea6cd5c16c2e43feed7fe93fa Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 17 Jun 2026 21:20:37 -0400 Subject: [PATCH 06/13] Damage location fields changes --- playwright-tests/pages/WelcomePage.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index 04ccd300..db3657fe 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -103,11 +103,10 @@ export class WelcomePage extends BasePage { if (!client?.clientFlags.isWelcomeDamageLocationRequired) { return; } - - await expect(this.page.getByText(/which city did the damage occur/i)).toBeVisible(); await expect(this.page.getByText(/which state did the damage occur/i)).toBeVisible(); - await expect(this.city).toBeVisible(); await expect(this.state).toBeVisible(); + await expect(this.page.getByText(/which city did the damage occur/i)).toBeVisible(); + await expect(this.city).toBeVisible(); } async populatePage(customerDetails: ICustomerDetails, claimDetails: IClaimDetails, isFillCityInfo: boolean) { From 86c698cac97f92ccd07752cdad695d3b028b796a Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 17 Jun 2026 22:20:38 -0400 Subject: [PATCH 07/13] Final Work of INSR-8668 --- playwright-tests/tests/0012_EssentialUniqueGlass.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright-tests/tests/0012_EssentialUniqueGlass.ts b/playwright-tests/tests/0012_EssentialUniqueGlass.ts index 0ad3253f..bfab7c59 100644 --- a/playwright-tests/tests/0012_EssentialUniqueGlass.ts +++ b/playwright-tests/tests/0012_EssentialUniqueGlass.ts @@ -51,12 +51,12 @@ const essentialUnqiqueGlassData: Partial = { { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, - optionToSelect: '3rd Visor Frit' + optionToSelect: 'Third Visor Frit' }, { partQuestionType: PartQuestionType.DriverSideColor, isOnPage: true, - optionToSelect: 'Solar~left~rear~movable~exc. 118" Wb~aftermarket' + optionToSelect: 'Solar, Driver side, Rear, Movable, Exc. 118" Wb, Aftermarket' }, ], appointmentDetails: { From 6d354280cd6fe56237bbc8027be7b008e4fcbd6e Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 17 Jun 2026 22:25:24 -0400 Subject: [PATCH 08/13] Final Work for INSR 8668 --- playwright-tests/.npmrc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/playwright-tests/.npmrc b/playwright-tests/.npmrc index b13d775a..dd6db73f 100644 --- a/playwright-tests/.npmrc +++ b/playwright-tests/.npmrc @@ -1,11 +1,3 @@ registry=https://pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/ - - ; begin auth token -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:username=Safelite -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:_password=MlBWQzBWcHBCN3NyQnR3SWxxRFNiU1dRR0dsbDNEcUVXQmRsbDJtSkhxb0J4aUsyTlpzRUpRUUo5OUJLQUNBQUFBQTlKc0tDQUFBU0FaRE9NQ2Ru -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/registry/:email=npm requires email to be set but doesn't use the value -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:username=Safelite -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:_password=MlBWQzBWcHBCN3NyQnR3SWxxRFNiU1dRR0dsbDNEcUVXQmRsbDJtSkhxb0J4aUsyTlpzRUpRUUo5OUJLQUNBQUFBQTlKc0tDQUFBU0FaRE9NQ2Ru -//pkgs.dev.azure.com/Safelite/Digital/_packaging/DigitalQA/npm/:email=npm requires email to be set but doesn't use the value -; end auth token -always-auth=true + +always-auth=true \ No newline at end of file From bc23169ebf5be0ed8fee1b8cc124ba30686c7673 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Thu, 18 Jun 2026 10:53:28 -0400 Subject: [PATCH 09/13] INSR 8668 work --- playwright-tests/pages/WelcomePage.ts | 6 ------ playwright-tests/tests/0000__M.test.ts | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index db3657fe..caad74a2 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -16,7 +16,6 @@ export class WelcomePage extends BasePage { readonly emailAddress: Locator; readonly city: Locator; readonly state: Locator; - readonly lossCity: Locator; readonly cookieCloseButton: Locator; readonly GetStartedButton: Locator; readonly applicationPageHeader: Locator; @@ -37,7 +36,6 @@ export class WelcomePage extends BasePage { this.state = page.locator('select[name="\\38 fdf9dc2e13e430eb57529499dceb3eb"]'); this.cookieCloseButton = page.getByRole('button', { name: 'Close' }); this.GetStartedButton = page.getByRole('button', { name: 'Get Started' }); - this.lossCity = page.getByRole('textbox', { name: 'Loss city' }); this.applicationPageHeader = page.locator('.site-header-container'); } @@ -81,10 +79,6 @@ export class WelcomePage extends BasePage { return this.city.isVisible(); } - async hasLossLocationInfo() { - return this.lossCity.isVisible(); - } - async hasApplicationPageHeader(currentClientTag: string, accountNumber?: string) { const client = ClientData.resolveClientForTest(currentClientTag, accountNumber); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index d2c1e1fa..175dbcb7 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -870,13 +870,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (appointmentDetails?.serviceLocation === ServiceLocation.Mobile) { await test.step('ContactDetailsPage >> Validate contact details', async () => { await contactDetailsPage.validateURL(contactDetailsPage.issPageValue); - - - // await contactDetailsPage.fillContactDetails(customerDetails!); - // if (appointmentDetails?.alternateMobileCity) { - // await contactDetailsPage.fillAlternateMobileStreetAndCity(appointmentDetails?.alternateMobileStreetAddress!, appointmentDetails?.alternateMobileCity!); - //} - if (appointmentDetails?.serviceAddress) { + if (appointmentDetails?.serviceAddress) { await contactDetailsPage.fillMobileServiceAddress(appointmentDetails.serviceAddress); } else { await contactDetailsPage.fillContactDetails(customerDetails!); From af2cffd2dcfcf2ba206b91881a84c4a64314fcd2 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Thu, 18 Jun 2026 10:55:11 -0400 Subject: [PATCH 10/13] INSR 8668 work --- playwright-tests/tests/0000__M.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 175dbcb7..8cc755c6 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -870,7 +870,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (appointmentDetails?.serviceLocation === ServiceLocation.Mobile) { await test.step('ContactDetailsPage >> Validate contact details', async () => { await contactDetailsPage.validateURL(contactDetailsPage.issPageValue); - if (appointmentDetails?.serviceAddress) { + + if (appointmentDetails?.serviceAddress) { await contactDetailsPage.fillMobileServiceAddress(appointmentDetails.serviceAddress); } else { await contactDetailsPage.fillContactDetails(customerDetails!); From 17e82439ee1b428e193815b130871151687f2a27 Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 24 Jun 2026 13:05:55 -0400 Subject: [PATCH 11/13] INSR 8668 - Code review changes --- playwright-tests/business-logic/data/MockPolicyData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 7f6192c4..d062c721 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -1,6 +1,6 @@ import { IPostSaveFakeResponseRequestBody } from "@business-logic/types/CcisApi"; import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; -import ClientData from "./ClientData"; +import ClientData from "@business-logic/data/ClientData"; const policySoapByScenario: { [x: string]: string } = { '0001a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2023-10-19T20:26:10Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2023-10-19T20:26:10Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>d30c40e1-3a1e-4351-85b9-40abdc061fad <_xml:PolicyInqRs> <_xml:RqUID>d30c40e1-3a1e-4351-85b9-40abdc061fad <_xml:TransactionResponseDt>2023-10-19T20:26:10Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-10-01 <_xml:Requestor id= \"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= \"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= \"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>+${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>F <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>OR <_xml:ContractTerm> <_xml:EffectiveDt>2023-03-21 <_xml:ExpirationDt>2099-03-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3102863830064 <_xml:Location> <_xml:ItemIdInfo id= \"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>BMW <_xml:Model>740 <_xml:ModelYear>2020 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>OR <_xml:VehIdentificationNumber>WBA7T2C01LGL17632 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>250.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= \"endorsementId_1\" IdRef= \"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', From 4f7f99251710a835d37a9c6713f741d7865edd2f Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Wed, 24 Jun 2026 16:05:44 -0400 Subject: [PATCH 12/13] INSR 8668 - Final changes after suggestions in PR --- playwright-tests/business-logic/data/ClientData.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/playwright-tests/business-logic/data/ClientData.ts b/playwright-tests/business-logic/data/ClientData.ts index 73c837ab..e6bf31ab 100644 --- a/playwright-tests/business-logic/data/ClientData.ts +++ b/playwright-tests/business-logic/data/ClientData.ts @@ -203,13 +203,6 @@ const essentialClients: IClient[] = [ clientTag: '1065734B-2292-4392-8CAF-205F07752BBE', accountName: 'Wayne Insurance', clientFlags: {} - }, - - { - clientTag: '156CDB2D-D49C-49D6-BC63-12B5BEF6D922', - accountName: 'State Farm', - accountNumber: '711310', - clientFlags: {}, } ] From 61ebccea558dd8d2d39221c34c1661c107608c4b Mon Sep 17 00:00:00 2001 From: Udayboppasafelite Date: Thu, 25 Jun 2026 12:04:00 -0400 Subject: [PATCH 13/13] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- playwright-tests/pages/WelcomePage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index caad74a2..42c8644e 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -93,7 +93,7 @@ export class WelcomePage extends BasePage { } async validateDamageLocationFieldsIfRequired(clientTag: string, accountNumber?: string) { - const client = ClientData.getClientByTag(clientTag); + const client = ClientData.resolveClientForTest(clientTag, accountNumber); if (!client?.clientFlags.isWelcomeDamageLocationRequired) { return; }