mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-8845] viewer file types fixes pr (#4159)
* [ACS-8845] [E2E] Added e2e tests for verifying file types in viewer * [ACS-8845] [E2E] Viewer tests fixes * [ACS-8845] eslint fix
This commit is contained in:
@@ -45,6 +45,7 @@ export class ViewerComponent extends BaseComponent {
|
||||
public thumbnailsCloseButton = this.getChild('[data-automation-id="adf-thumbnails-close"]');
|
||||
public viewerPage = this.getChild('[data-automation-id="adf-page-selector"]');
|
||||
public viewerMedia = this.getChild('adf-media-player');
|
||||
public viewerSpinner = this.getChild('.adf-viewer-render__loading-screen');
|
||||
|
||||
toolbar = new AcaHeader(this.page);
|
||||
|
||||
@@ -69,6 +70,18 @@ export class ViewerComponent extends BaseComponent {
|
||||
return this.viewerLocator.isVisible();
|
||||
}
|
||||
|
||||
async waitForViewerLoaderToFinish(): Promise<void> {
|
||||
await this.viewerSpinner.waitFor({ state: 'hidden', timeout: timeouts.extraLarge });
|
||||
}
|
||||
|
||||
async checkViewerActivePage(pageNumber: number): Promise<void> {
|
||||
await expect(this.viewerPage).toHaveValue(pageNumber.toString());
|
||||
}
|
||||
|
||||
async clickViewerThumbnailPage(pageNumber: number): Promise<void> {
|
||||
await this.thumbnailsPages.nth(pageNumber - 1).click();
|
||||
}
|
||||
|
||||
async isCloseButtonDisplayed(): Promise<boolean> {
|
||||
await this.closeButtonLocator.waitFor({ state: 'visible', timeout: timeouts.normal });
|
||||
return this.closeButtonLocator.isEnabled({ timeout: timeouts.normal });
|
||||
|
Reference in New Issue
Block a user