Improve css prebuilt creation and minimize (#5553)

* improve CSS creation strategy and minimize

* remove multiple select slow down test
This commit is contained in:
Eugenio Romano
2020-03-17 18:59:52 +00:00
committed by GitHub
parent ec689cad3f
commit 7c90c9b372
9 changed files with 1262 additions and 138 deletions

View File

@@ -32,7 +32,7 @@ export class DropdownPage {
}
async selectOption(option: string): Promise<void> {
const optionElement = element(by.cssContainingText('mat-option span.mat-option-text', option));
const optionElement = element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first();
await BrowserActions.click(optionElement);
}
@@ -73,11 +73,11 @@ export class DropdownPage {
}
async checkOptionIsDisplayed(option: string): Promise <void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('mat-option span.mat-option-text', option)));
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
}
async checkOptionIsNotDisplayed(option: string): Promise <void> {
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('mat-option span.mat-option-text', option)));
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
}
async selectDropdownOption(option: string): Promise<void> {

View File

@@ -53,7 +53,7 @@ export class PeopleCloudComponentPage {
}
async selectAssigneeFromList(name: string): Promise<void> {
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
const assigneeRow = element.all(by.cssContainingText('mat-option span.adf-people-label-name', name)).first();
await BrowserActions.click(assigneeRow);
await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
}