[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

@@ -72,6 +72,10 @@ export class LoginComponent extends Component {
return this.submitButton.click();
}
async clickPasswordVisibility() {
return await this.passwordVisibility.click();
}
async getPasswordVisibility() {
const text = await this.passwordVisibility.getText();
if (text.endsWith('visibility_off')) {
@@ -84,7 +88,7 @@ export class LoginComponent extends Component {
}
}
async isPasswordShown() {
async isPasswordDisplayed() {
const type = await this.passwordInput.getAttribute('type');
if (type === 'text') {
return true;
@@ -95,4 +99,21 @@ export class LoginComponent extends Component {
}
}
}
async isUsernameEnabled() {
return await this.usernameInput.isEnabled();
}
async isPasswordEnabled() {
return await this.passwordInput.isEnabled();
}
async isSubmitEnabled() {
return await this.submitButton.isEnabled();
}
async isPasswordHidden() {
return !(await this.getPasswordVisibility());
}
}