mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-7766] [E2E] protractor to playwright e2e test suites actions version (#3839)
* [ACS-7766] [E2E] Actions-version tests migrated from Protractor to Playwright * [ACS-7766] [E2E] Test ids updated * [ACS-7766] review comments fixes * 'only' deleted
This commit is contained in:
@@ -31,4 +31,5 @@ export * from './create-from-template-dialog-component';
|
||||
export * from './adf-confirm-dialog.component';
|
||||
export * from './share-dialog.component';
|
||||
export * from './upload-new-version-dialog.component';
|
||||
export * from './manage-versions-dialog.component';
|
||||
export * from './upload-dialog.component';
|
||||
|
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
|
||||
export class ManageVersionsDialog extends BaseComponent {
|
||||
private static rootElement = '.adf-new-version-uploader-dialog';
|
||||
|
||||
async viewFileVersion(version: string): Promise<void> {
|
||||
const versionActionsButton = this.page.locator(`[id="adf-version-list-action-menu-button-${version}"]`);
|
||||
await versionActionsButton.click();
|
||||
}
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, ManageVersionsDialog.rootElement);
|
||||
}
|
||||
}
|
@@ -35,6 +35,7 @@ export class ViewerComponent extends BaseComponent {
|
||||
public fileTitleButtonLocator = this.getChild('.adf-viewer__file-title');
|
||||
public pdfViewerContentPages = this.getChild('.adf-pdf-viewer__content .page');
|
||||
public shareButton = this.getChild('button[id="share-action-button"]');
|
||||
public downloadButton = this.getChild('button[id="app.viewer.download"]');
|
||||
public allButtons = this.getChild('button');
|
||||
|
||||
toolbar = new AcaHeader(this.page);
|
||||
@@ -48,8 +49,11 @@ export class ViewerComponent extends BaseComponent {
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
async waitForViewerToOpen(): Promise<void> {
|
||||
async waitForViewerToOpen(waitForViewerContent?: 'wait for viewer content'): Promise<void> {
|
||||
await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.medium });
|
||||
if(waitForViewerContent) {
|
||||
await this.spinnerWaitForReload();
|
||||
}
|
||||
}
|
||||
|
||||
async isViewerOpened(): Promise<boolean> {
|
||||
@@ -67,6 +71,11 @@ export class ViewerComponent extends BaseComponent {
|
||||
return await this.fileTitleButtonLocator.isVisible();
|
||||
}
|
||||
|
||||
async getFileTitle(): Promise<string> {
|
||||
await this.fileTitleButtonLocator.waitFor({ state: 'visible', timeout: timeouts.normal });
|
||||
return this.fileTitleButtonLocator.textContent();
|
||||
}
|
||||
|
||||
async getCloseButtonTooltip(): Promise<string> {
|
||||
await this.closeButtonLocator.waitFor({ state: 'visible', timeout: timeouts.normal });
|
||||
return await this.closeButtonLocator.getAttribute('title');
|
||||
|
Reference in New Issue
Block a user