mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1920] automate tests for Create file from template (#1303)
* change component ancestor from ElementFinder to string for better usability better naming for some methods small code cleanup * add test components and automate tests for Create File from Template action * ignore e2e-downloads folder * add return types * enable check * enable check after issue got fixed
This commit is contained in:
committed by
Cilibiu Bogdan
parent
0bc4a3453b
commit
569ee98e8d
@@ -47,7 +47,7 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
updateButton: ElementFinder = this.component.element(by.cssContainingText(CreateOrEditFolderDialog.selectors.button, 'Update'));
|
||||
validationMessage: ElementFinder = this.component.element(by.css(CreateOrEditFolderDialog.selectors.validationMessage));
|
||||
|
||||
constructor(ancestor?: ElementFinder) {
|
||||
constructor(ancestor?: string) {
|
||||
super(CreateOrEditFolderDialog.selectors.root, ancestor);
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
return this.title.getText();
|
||||
}
|
||||
|
||||
async isValidationMessageDisplayed() {
|
||||
return this.validationMessage.isDisplayed();
|
||||
async isValidationMessageDisplayed(): Promise<boolean> {
|
||||
return (await this.validationMessage.isPresent()) && (await this.validationMessage.isDisplayed());
|
||||
}
|
||||
|
||||
async isUpdateButtonEnabled() {
|
||||
@@ -92,9 +92,12 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
return this.descriptionTextArea.isDisplayed();
|
||||
}
|
||||
|
||||
async getValidationMessage() {
|
||||
await this.isValidationMessageDisplayed();
|
||||
return this.validationMessage.getText();
|
||||
async getValidationMessage(): Promise<string> {
|
||||
if (await this.isValidationMessageDisplayed()) {
|
||||
return this.validationMessage.getText();
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
async getName() {
|
||||
|
Reference in New Issue
Block a user