Skip to content

Commit

Permalink
Improve isFieldSelected function to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Aug 17, 2021
1 parent 612b76d commit 1cba673
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ export class DiscoverPageObject extends FtrService {
}

public async isFieldSelected(field: string) {
if (!(await this.testSubjects.exists('fieldList-selected'))) {
return false;
}
const selectedList = await this.testSubjects.find('fieldList-selected');
return await this.testSubjects.descendantExists(`field-${field}`, selectedList);
}
Expand Down

0 comments on commit 1cba673

Please sign in to comment.