[e2e] Added document list actions [E2E] (#3676)

* [e2e] Added document list actions e2e 1

* [e2e - actions] added another test
This commit is contained in:
Vito
2018-08-10 09:58:10 +01:00
committed by Eugenio Romano
parent 5e57b7f9d4
commit fdde0257d8
6 changed files with 254 additions and 4 deletions

View File

@@ -316,5 +316,29 @@ var ContentList = function () {
Util.waitUntilElementIsVisible(row.element(by.css("div[class*='--image'] img[alt*='" + extension + "']")));
};
this.rightClickOnRowNamed = function(rowName) {
let row = this.getRowByRowName(rowName);
browser.actions().click(row, protractor.Button.RIGHT).perform();
Util.waitUntilElementIsVisible(element(by.css('div.context-menu')));
}
this.checkContextActionIsVisible = function(actionName) {
let actionButton = element(by.css(`div.context-menu button[data-automation-id="context-${actionName}"`));
Util.waitUntilElementIsVisible(actionButton);
Util.waitUntilElementIsClickable(actionButton);
return actionButton;
}
this.pressContextMenuActionNamed = function(actionName) {
let actionButton = this.checkContextActionIsVisible(actionName);
actionButton.click();
}
this.clickRowToSelect = function(rowName) {
let row = this.getRowByRowName(rowName);
browser.actions().keyDown(protractor.Key.COMMAND).click(row).perform();
this.checkRowIsSelected(rowName);
}
};
module.exports = ContentList;