[ACS-6437] viewer e2e test migrate to playwright (#3704)

* rebase

* [ACS-6437] view protractor migrate to playwright

* [ACS-6437] review changes

* [ACS-6437] review changes
This commit is contained in:
Akash Rathod
2024-03-15 14:17:20 +01:00
committed by GitHub
parent f2d78f165c
commit 227f3fb996
10 changed files with 141 additions and 293 deletions

View File

@@ -39,6 +39,8 @@ export class MatMenuComponent extends BaseComponent {
public createFileFromTemplate = this.getChild('[id="app.create.fileFromTemplate"]');
public createLibrary = this.getChild('[id="app.create.library"]');
public getButtonByText = (text: string) => this.getChild('button', { hasText: text });
public cancelEditingAction = this.getChild(`.mat-menu-item[title='Cancel Editing']`);
public editOfflineAction = this.getChild(`.mat-menu-item[title='Edit Offline']`);
async clickMenuItem(menuItem: string): Promise<void> {
const menuElement = this.getButtonByText(menuItem);

View File

@@ -30,3 +30,4 @@ export * from './content-node-selector-dialog';
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';

View File

@@ -0,0 +1,39 @@
/*!
* Copyright © 2005-2023 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 UploadNewVersionDialog extends BaseComponent {
private static rootElement = 'adf-new-version-uploader-dialog';
public cancelButton = this.getChild('#adf-new-version-cancel');
public uploadButton = this.getChild('[data-automation-id="adf-new-version-file-upload"]');
public majorOption = this.getChild('#adf-new-version-major');
public description = this.getChild('#adf-new-version-text-area');
constructor(page: Page) {
super(page, UploadNewVersionDialog.rootElement);
}
}