refactor(tests): update viewport page object usage to async and update all effected tests (#5927)

This commit is contained in:
Ghadeer Albattarni authored and GitHub committed 2026-03-27 16:37:42 -04:00
1 parent 485f0d75d9
commit 2a728b244c
46 files changed
+240 -181

No files matched your search

+7 -5
View File
@@ -2,17 +2,19 @@ import { Page } from '@playwright/test';
export class DataOverlayPageObject {
readonly page: Page;
readonly viewportId: string;
constructor(page: Page) {
constructor(page: Page, viewportId: string) {
this.page = page;
this.viewportId = viewportId;
}
async toggle(viewportId: string = 'default') {
await this.page.getByTestId(`dataOverlayMenu-${viewportId}-btn`).click();
async toggle() {
await this.page.getByTestId(`dataOverlayMenu-${this.viewportId}-btn`).click();
}
async addSegmentation(segmentation: string, viewportId: string = 'default') {
await this.page.getByTestId(`AddSegmentationDataOverlay-${viewportId}`).click();
async addSegmentation(segmentation: string) {
await this.page.getByTestId(`AddSegmentationDataOverlay-${this.viewportId}`).click();
await this.page.getByText('SELECT A SEGMENTATION').click();
await this.page.getByTestId(segmentation).click();
}