ACS-6796 Search results files&folders tests migration to Playwright (#3691)

* Migrated tests for Search - files & folders
This commit is contained in:
Katarzyna Kita
2024-03-11 11:16:44 +01:00
committed by GitHub
parent 789d07d59f
commit b5d2193416
2 changed files with 91 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ import { timeouts } from '../../utils';
export abstract class BaseComponent extends PlaywrightBase {
private readonly rootElement: string;
private overlayElement = this.page.locator('.cdk-overlay-backdrop-showing');
private progressBar = this.page.locator('mat-progress-bar');
protected constructor(page: Page, rootElement: string) {
super(page);
@@ -62,4 +63,13 @@ export abstract class BaseComponent extends PlaywrightBase {
this.logger.info('Spinner was not present');
}
}
async progressBarWaitForReload(): Promise<void> {
try {
await this.progressBar.waitFor({ state: 'visible', timeout: timeouts.medium });
await this.progressBar.waitFor({ state: 'hidden', timeout: timeouts.normal });
} catch (e) {
this.logger.info('Progress bar was not present');
}
}
}