[ACS-5743] Cleanup Content tests (Demo Shell) (#8799)

* remove unused demo shell api

* remove recent files and cleanup unused api

* cleanup upload dialog page

* [ci:force] dummy commit

* [ci:force] cleanup the toolbar and tooltips

* [ci:force] remove dead code

* [ci:force] remove logger and custom action

* [ci:force] remove custom permission e2e test as already tested by unit

* [ci:force] remove "Start process" from the Content demo as not related to document list

* [ci:force] remove useless divs for selection

* [ci:force] dummy change to trigger CI/CD

* Revert "[ci:force] remove useless divs for selection"

This reverts commit fb3ae0b439.

* [ci:force] remove e2e for artificial scenario

* [ci:force] cleanup unused navigation bar protractor api

* [ci:force] cleanup unused datatable protractor api

* [ci:force] cleanup unused login protractor api

* [ci:force] fix process cloud demo page selector
This commit is contained in:
Denys Vuika
2023-08-01 18:48:19 +01:00
committed by GitHub
parent 3f3e83057d
commit 9497abcb43
18 changed files with 42 additions and 814 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by, browser, ElementFinder, $, $$ } from 'protractor';
import { by, browser, ElementFinder, $, $$ } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class UploadDialogPage {
@@ -31,12 +31,6 @@ export class UploadDialogPage {
title = $('span[class*="upload-dialog__title"]');
minimizeButton = $('mat-icon[title="Minimize"]');
maximizeButton = $('mat-icon[title="Maximize"]');
canUploadConfirmationTitle = $('.upload-dialog__confirmation--title');
canUploadConfirmationDescription = $('.upload-dialog__confirmation--text');
confirmationDialogNoButton = element(by.partialButtonText('No'));
confirmationDialogYesButton = element(by.partialButtonText('Yes'));
cancelUploadsElement = $('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]');
cancelUploadInProgressButton = $('div[data-automation-id="cancel-upload-progress"]');
async clickOnCloseButton(): Promise<void> {
await this.checkCloseButtonIsDisplayed();
@@ -76,8 +70,8 @@ export class UploadDialogPage {
}
async filesAreUploaded(content: string[]): Promise<void> {
for (let i = 0; i < content.length; i++) {
await this.fileIsUploaded(content[i]);
for (const item of content) {
await this.fileIsUploaded(item);
}
}
@@ -85,18 +79,6 @@ export class UploadDialogPage {
await BrowserVisibility.waitUntilElementIsNotVisible($(`div[class*='uploading-row'] span[title="${content}"]`));
}
async cancelUploads(): Promise<void> {
await BrowserActions.click(this.cancelUploadsElement);
}
async cancelProgress(): Promise<void> {
await BrowserActions.click(this.cancelUploadInProgressButton);
}
async checkCancelProgressIsVisible(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.cancelUploadInProgressButton);
}
async fileIsCancelled(content: string): Promise<void> {
const row: ElementFinder = await this.getRowByRowName(content);
await BrowserVisibility.waitUntilElementIsVisible(row);
@@ -115,24 +97,6 @@ export class UploadDialogPage {
return this.title.getText();
}
async getConfirmationDialogTitleText(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.canUploadConfirmationTitle);
return this.canUploadConfirmationTitle.getText();
}
async getConfirmationDialogDescriptionText(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.canUploadConfirmationDescription);
return this.canUploadConfirmationDescription.getText();
}
async clickOnConfirmationDialogYesButton(): Promise<void> {
await BrowserActions.click(this.confirmationDialogYesButton);
}
async clickOnConfirmationDialogNoButton(): Promise<void> {
await BrowserActions.click(this.confirmationDialogNoButton);
}
async numberOfCurrentFilesUploaded(): Promise<string> {
const text = await this.getTitleText();
return text.split('Uploaded ')[1].split(' / ')[0];