DigitalConsumer.FixMyGlass/playwright-tests/pages/ProblemGlassQuestionsPage.ts
2025-11-11 14:20:44 -05:00

43 lines
No EOL
1.8 KiB
TypeScript

import { expect, type Locator, type Page } from '@playwright/test';
import { IClaimDetails, ICustomerDetails } from 'safelite-playwright-core';
import { InsuranceBasePage } from './InsuranceBasePage';
import { ITestData } from 'framework/TestData';
import { step } from 'framework/localTypes/Step';
export class ProblemGlassQuestionsPage extends InsuranceBasePage {
readonly provideVinManuallyButton: Locator;
readonly provideLicensePlateButton: Locator;
readonly provideHomeAddressButton: Locator;
readonly continueOnVinPopUpButton: Locator;
readonly dontShareVinButton: Locator;
readonly yestoGlassQuestionButton: Locator;
readonly notoGlassQuestionButton: Locator;
readonly continueButton: Locator;
constructor(page: Page) {
super(page);
this.provideVinManuallyButton = page.locator('label[for="VINManually"]');
this.provideLicensePlateButton = page.locator('label[for="licensePlate"]');
this.provideHomeAddressButton = page.locator('label[for="HomeAddress"]');
this.continueOnVinPopUpButton = page.locator('button:has-text("Continue")');
this.dontShareVinButton = page.getByRole('button', { name: "I would rather not share my VIN" });
this.yestoGlassQuestionButton = page.locator('label:has-text("Yes")');
this.notoGlassQuestionButton = page.locator('label:has-text("No")');
this.continueButton = page.locator('button[type="submit"].btn-success.nav-continue');
}
@step("ProblemGlassQuestionsPage >> Click continue button and select yes or no for problem glass question")
async handleproblemGlassQuestionsPage(testData: Partial<ITestData>){
await this.dontShareVinButton.click();
await this.yestoGlassQuestionButton.click();
await this.continueButton.click();
}
}