Playwright POM (#8109)

Related to #6641
This commit is contained in:
BOHEUS
2024-11-07 14:38:28 +00:00
committed by GitHub
parent c3343d3600
commit c571c9bdca
25 changed files with 2197 additions and 3 deletions

View File

@ -0,0 +1,23 @@
import { Locator, Page } from '@playwright/test';
export class IconSelect {
private readonly iconSelectButton: Locator;
private readonly iconSearchInput: Locator;
constructor(public readonly page: Page) {
this.iconSelectButton = page.getByLabel('Click to select icon (');
this.iconSearchInput = page.getByPlaceholder('Search icon');
}
async selectIcon(name: string) {
await this.iconSelectButton.click();
await this.iconSearchInput.fill(name);
await this.page.getByTitle(name).click();
}
async selectRelationIcon(name: string) {
await this.iconSelectButton.nth(1).click();
await this.iconSearchInput.fill(name);
await this.page.getByTitle(name).click();
}
}