[ACA-1928] e2e improvements - part1 (#883)

* refactor Mark as favourite tests
rename method to be more clear
create separate methods for some checks and actions

* forgot some changes

* refactor delete-undo tests

* some more refactoring

* fix
This commit is contained in:
Adina Parpalita
2018-12-20 11:27:54 +02:00
committed by Suzana Dirla
parent 0882686172
commit b8ce533759
54 changed files with 2310 additions and 2069 deletions

View File

@@ -81,4 +81,47 @@ export class ConfirmDialog extends Component {
const button = this.getButtonByName(name);
return await button.isEnabled();
}
async isOkEnabled() {
return await this.isButtonEnabled('OK');
}
async isCancelEnabled() {
return await this.isButtonEnabled('Cancel');
}
async isKeepEnabled() {
return await this.isButtonEnabled('Keep');
}
async isDeleteEnabled() {
return await this.isButtonEnabled('Delete');
}
async isRemoveEnabled() {
return await this.isButtonEnabled('Remove');
}
async clickOk() {
return await this.clickButton('OK');
}
async clickCancel() {
return await this.clickButton('Cancel');
}
async clickKeep() {
return await this.clickButton('Keep');
}
async clickDelete() {
return await this.clickButton('Delete');
}
async clickRemove() {
return await this.clickButton('Remove');
}
}

View File

@@ -115,7 +115,7 @@ export class CopyMoveDialog extends Component {
await this.waitForDropDownToClose();
}
async chooseDestination(folderName: string) {
async selectDestination(folderName: string) {
const row = this.getRow(folderName);
await Utils.waitUntilElementClickable(row);
await row.click();

View File

@@ -72,11 +72,39 @@ export class CreateOrEditFolderDialog extends Component {
return await this.validationMessage.isDisplayed();
}
async isUpdateButtonEnabled() {
return this.updateButton.isEnabled();
}
async isCreateButtonEnabled() {
return this.createButton.isEnabled();
}
async isCancelButtonEnabled() {
return this.cancelButton.isEnabled();
}
async isNameDisplayed() {
return await this.nameInput.isDisplayed();
}
async isDescriptionDisplayed() {
return await this.descriptionTextArea.isDisplayed();
}
async getValidationMessage() {
await this.isValidationMessageDisplayed();
return await this.validationMessage.getText();
}
async getName() {
return await this.nameInput.getAttribute('value');
}
async getDescription() {
return await this.descriptionTextArea.getAttribute('value');
}
async enterName(name: string) {
await this.nameInput.clear();
await Utils.typeInField(this.nameInput, name);
@@ -104,4 +132,5 @@ export class CreateOrEditFolderDialog extends Component {
async clickUpdate() {
await this.updateButton.click();
}
}

View File

@@ -94,6 +94,10 @@ export class ShareDialog extends Component {
return await this.url.getAttribute('readonly');
}
async isCloseEnabled() {
return await this.closeButton.isEnabled();
}
async clickClose() {
await this.closeButton.click();
await this.waitForDialogToClose();