mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
restore content directive e2e tests (#4915)
* e2e tests for restore content directive * e2e tests for restore content directive * e2e tests for restore content directive * changed the method for restore icon to check for display rather than enabled. * test enhancements * removed empty folder test as irrelevant. * added test for restore of Site or Library * test enhancements * test enhancements
This commit is contained in:
committed by
Eugenio Romano
parent
4185bf8083
commit
ffd4413335
@@ -318,8 +318,14 @@ export class DataTableComponentPage {
|
||||
return this;
|
||||
}
|
||||
|
||||
checkRowByContentIsNotSelected(folderName) {
|
||||
const selectedRow = this.getCellByContent(folderName).element(by.xpath(`ancestor::div[contains(@class, 'is-selected')]`));
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(selectedRow);
|
||||
return this;
|
||||
}
|
||||
|
||||
getCellByContent(content) {
|
||||
const cell = this.rootElement.element(by.cssContainingText(`div[class*='adf-datatable-row'] div[class*='adf-datatable-cell']`, content));
|
||||
const cell = this.rootElement.all(by.cssContainingText(`div[class*='adf-datatable-row'] div[class*='adf-datatable-cell']`, content)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(cell);
|
||||
return cell;
|
||||
}
|
||||
@@ -335,12 +341,23 @@ export class DataTableComponentPage {
|
||||
BrowserActions.click(resultElement);
|
||||
}
|
||||
|
||||
clickRowByContentCheckbox(name) {
|
||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${name}']`)).first().element(by.xpath(`ancestor::div/div/mat-checkbox`));
|
||||
BrowserActions.click(resultElement);
|
||||
}
|
||||
|
||||
checkRowContentIsDisplayed(content) {
|
||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${content}']`)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(resultElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkRowContentIsNotDisplayed(content) {
|
||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${content}']`)).first();
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(resultElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkRowContentIsDisabled(content) {
|
||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${content}'] div.adf-cell-value img[aria-label='disable']`)).first();
|
||||
BrowserVisibility.waitUntilElementIsVisible(resultElement);
|
||||
|
@@ -76,4 +76,11 @@ export class BrowserActions {
|
||||
BrowserActions.click(optionElement);
|
||||
return this;
|
||||
}
|
||||
|
||||
static clickOnSelectDropdownOption(option: string, dropDownElement: ElementFinder) {
|
||||
this.click(dropDownElement);
|
||||
const optionElement = element(by.cssContainingText('mat-option span.mat-option-text', option));
|
||||
BrowserActions.click(optionElement);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user