mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix e2e (#6087)
* fix protractor conf * remove update env * fix cli error script cs * change screenshot plugin * remove unused param * fix * fix * fix * moment comment nvm * fix * fix * fix * fix * remove adf redirect * fix * fix * save remote report * report fix * improve save result * fix folder save * fix folder save * fix placeholder pointer , they needs refactor later * fix * fix lint * fix * remove test already covered by unit fix the test in core needed exclude the one impossible to make it works without APS basic support * lint * fix some logout missing * fix * Fix the custom-tasks-filters.e2e * fix lint * fix * fix * fix * Fix wait on start process and on process definition options * Fix logout before login again * fix uplaod test * fix * Fix infodrawer with check detail and sleep * lint * increase list of excluded test * fix * fix lint * change wait method datatable * fix * fix * revert check value * fix * fix * change tag test Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, browser, ElementFinder, Locator } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class UploadDialogPage {
|
||||
@@ -23,9 +23,9 @@ export class UploadDialogPage {
|
||||
closeButton = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
||||
dialog = element(by.css('div[id="upload-dialog"]'));
|
||||
minimizedDialog = element(by.css('div[class*="upload-dialog--minimized"]'));
|
||||
uploadedStatusIcon = by.css('mat-icon[class*="status--done"]');
|
||||
cancelledStatusIcon = by.css('div[class*="status--cancelled"]');
|
||||
errorStatusIcon = by.css('div[class*="status--error"] mat-icon');
|
||||
uploadedStatusIcon: Locator = by.css('mat-icon[class*="status--done"]');
|
||||
cancelledStatusIcon: Locator = by.css('div[class*="status--cancelled"]');
|
||||
errorStatusIcon: Locator = by.css('div[class*="status--error"] mat-icon');
|
||||
errorTooltip = element(by.css('div.mat-tooltip'));
|
||||
rowByRowName = by.xpath('ancestor::adf-file-uploading-list-row');
|
||||
title = element(by.css('span[class*="upload-dialog__title"]'));
|
||||
@@ -63,14 +63,15 @@ export class UploadDialogPage {
|
||||
return element.all(by.css(`div[class*='uploading-row'] span[title="${content}"]`)).first();
|
||||
}
|
||||
|
||||
getRowByRowName(content: string) {
|
||||
async getRowByRowName(content: string): Promise<ElementFinder> {
|
||||
const rows = this.getRowsByName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(rows);
|
||||
return rows.element(this.rowByRowName);
|
||||
}
|
||||
|
||||
async fileIsUploaded(content: string): Promise<void> {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon), 60000);
|
||||
}
|
||||
|
||||
async fileIsError(content: string) {
|
||||
@@ -102,6 +103,7 @@ export class UploadDialogPage {
|
||||
|
||||
async fileIsCancelled(content: string): Promise<void> {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.cancelledStatusIcon), 10000);
|
||||
}
|
||||
|
||||
@@ -110,7 +112,6 @@ export class UploadDialogPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||
const elementRow = await this.getRowByRowName(content);
|
||||
await BrowserActions.click(elementRow.element(this.uploadedStatusIcon));
|
||||
|
||||
}
|
||||
|
||||
async getTitleText(): Promise<string> {
|
||||
|
Reference in New Issue
Block a user