Skip to content

Commit

Permalink
Enhance combo-box interception in functional tests
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Jul 21, 2023
1 parent 2097f43 commit 22e4ff0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/functional/services/combo_box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
log.debug(`comboBox.getOptionsList, comboBoxSelector: ${comboBoxSelector}`);
const comboBox = await testSubjects.find(comboBoxSelector);
const menu = await retry.try(async () => {
await testSubjects.click(comboBoxSelector);
let isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (!isOptionsListOpen) {
await testSubjects.click(comboBoxSelector);
}
await this.waitForOptionsListLoading(comboBox);
const isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (!isOptionsListOpen) {
throw new Error('Combo box options list did not open on click');
}
Expand Down

0 comments on commit 22e4ff0

Please sign in to comment.