[ACA-1928] e2e improvements - part2 (#884)

* 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

* small improvements / refactoring
This commit is contained in:
Adina Parpalita
2018-12-21 17:04:13 +02:00
committed by Cilibiu Bogdan
parent b8ce533759
commit 24f5f01900
29 changed files with 511 additions and 493 deletions

View File

@@ -27,9 +27,9 @@ import { by, ElementFinder } from 'protractor';
import { Component } from '../component';
export class LoginComponent extends Component {
static selector = 'adf-login';
private static selectors = {
root: 'adf-login',
private locators = {
usernameInput: by.css('input#username'),
passwordInput: by.css('input#password'),
passwordVisibility: by.css('.adf-login-password-icon'),
@@ -38,15 +38,15 @@ export class LoginComponent extends Component {
copyright: by.css('.adf-copyright')
};
usernameInput: ElementFinder = this.component.element(this.locators.usernameInput);
passwordInput: ElementFinder = this.component.element(this.locators.passwordInput);
submitButton: ElementFinder = this.component.element(this.locators.submitButton);
errorMessage: ElementFinder = this.component.element(this.locators.errorMessage);
copyright: ElementFinder = this.component.element(this.locators.copyright);
passwordVisibility: ElementFinder = this.component.element(this.locators.passwordVisibility);
usernameInput: ElementFinder = this.component.element(LoginComponent.selectors.usernameInput);
passwordInput: ElementFinder = this.component.element(LoginComponent.selectors.passwordInput);
submitButton: ElementFinder = this.component.element(LoginComponent.selectors.submitButton);
errorMessage: ElementFinder = this.component.element(LoginComponent.selectors.errorMessage);
copyright: ElementFinder = this.component.element(LoginComponent.selectors.copyright);
passwordVisibility: ElementFinder = this.component.element(LoginComponent.selectors.passwordVisibility);
constructor(ancestor?: ElementFinder) {
super(LoginComponent.selector, ancestor);
super(LoginComponent.selectors.root, ancestor);
}
async enterUsername(username: string) {