mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3951] Added automated tests for failed uploading tooltips (#4206)
* [ADF-3951] Added automated tests for failed uploading tooltips * [ADF-3951] Updated and refactored tests.
This commit is contained in:
committed by
Eugenio Romano
parent
1b81f687a3
commit
3401b508be
@@ -22,6 +22,7 @@ import { CreateFolderDialog } from './dialog/createFolderDialog';
|
||||
import { CreateLibraryDialog } from './dialog/createLibraryDialog';
|
||||
import { NavigationBarPage } from './navigationBarPage';
|
||||
import { NodeActions } from '../../actions/ACS/node.actions';
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
import { by, element, protractor, $$, browser } from 'protractor';
|
||||
|
||||
import path = require('path');
|
||||
@@ -32,6 +33,7 @@ export class ContentServicesPage {
|
||||
createFolderDialog = new CreateFolderDialog();
|
||||
nodeActions = new NodeActions();
|
||||
createLibraryDialog = new CreateLibraryDialog();
|
||||
dragAndDropAction = new DropActions();
|
||||
uploadBorder = element(by.id('document-list-container'));
|
||||
tableBody = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
|
||||
contentServices = element(by.css('a[data-automation-id="Content Services"]'));
|
||||
@@ -538,6 +540,16 @@ export class ContentServicesPage {
|
||||
Util.waitUntilElementIsVisible(this.dragAndDrop);
|
||||
}
|
||||
|
||||
dragAndDropFile(file) {
|
||||
this.checkDragAndDropDIsDisplayed();
|
||||
this.dragAndDropAction.dropFile(this.dragAndDrop, file);
|
||||
}
|
||||
|
||||
dragAndDropFolder(folder) {
|
||||
this.checkDragAndDropDIsDisplayed();
|
||||
this.dragAndDropAction.dropFolder(this.dragAndDrop, folder);
|
||||
}
|
||||
|
||||
checkLockIsDisplayedForElement(name) {
|
||||
let lockButton = element(by.css(`div.adf-data-table-cell[filename="${name}"] button`));
|
||||
Util.waitUntilElementIsVisible(lockButton);
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Util } from '../../../util/util';
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
|
||||
export class UploadDialog {
|
||||
|
||||
@@ -24,7 +25,8 @@ export class UploadDialog {
|
||||
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"]');
|
||||
errorStatusIcon = by.css('div[class*="status--error"] mat-icon');
|
||||
errorTooltip = element(by.css('div.mat-tooltip'));
|
||||
cancelWhileUploadingIcon = by.css('mat-icon[class*="adf-file-uploading-row__action adf-file-uploading-row__action--cancel"]');
|
||||
rowByRowName = by.xpath('ancestor::adf-file-uploading-list-row');
|
||||
title = element(by.css('span[class*="upload-dialog__title"]'));
|
||||
@@ -185,4 +187,14 @@ export class UploadDialog {
|
||||
return this;
|
||||
}
|
||||
|
||||
displayTooltip() {
|
||||
Util.waitUntilElementIsVisible(element(this.errorStatusIcon));
|
||||
browser.actions().mouseMove(element(this.errorStatusIcon)).perform();
|
||||
}
|
||||
|
||||
getTooltip() {
|
||||
Util.waitUntilElementIsVisible(this.errorTooltip);
|
||||
return this.errorTooltip.getText();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user