Small Update for Validation
This commit is contained in:
parent
778ed41d89
commit
ab4735b017
2 changed files with 17 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue