DigitalConsumer.ISS/playwright-tests/pages/TpaSearchPage.ts
Siraj Shaik 6d5a0524e3 latest updates from QA repo
21 and 22 scenarios were added
Mock responses refactored.
2025-02-18 14:41:05 -05:00

26 lines
No EOL
878 B
TypeScript

import { expect, type Locator, type Page } from '@playwright/test';
import { BasePage } from './BasePage';
export class TpaSearchPage extends BasePage {
readonly page: Page;
readonly firstLocationButton: Locator;
readonly doNotSeeMyShopButton: Locator;
url = process.env['BASE_URL']! + '/?issPage=tpa-search';
constructor(page: Page) {
super(page);
this.page = page;
// this.firstLocationButton = page.locator("fieldset[aria-labelledby='chooseShop']/span").first();
this.firstLocationButton = page.locator("#buttonLabelSpan").first();
this.doNotSeeMyShopButton = page.getByRole('link', { name: 'I don\'t see my shop' });
}
async selectDoNotSeeMyShop() {
await this.doNotSeeMyShopButton.click()
}
async selectFirstLocation() {
await this.firstLocationButton.click();
}
}