in common-utils/common-UI/common-UI.js [89:114]
addFilterRetrySelection(field, operator, value = null, maxRetries = 3) {
const selectComboBoxInput = (selector, keyword, retry = 0) => {
this.testRunner.get(`[data-test-subj="${selector}"]`).find('[data-test-subj="comboBoxInput"]').trigger('focus').type(`{selectall}{backspace}${keyword}`)
this.testRunner.get(`[data-test-subj="comboBoxOptionsList ${selector}-optionsList"]`).find(`[title="${keyword}"]`).trigger('click', { force: true })
this.testRunner.get(`[data-test-subj="${selector}"]`).then(($box) => {
const cls = $box.attr('class')
if (cls.includes('euiComboBox-isInvalid') && retry < maxRetries) {
this.testRunner.wrap($box).find('[data-test-subj="comboBoxInput"]').type('{selectall}{backspace}')
this.testRunner.wrap($box).find('[data-test-subj="comboBoxToggleListButton"]').click()
selectComboBoxInput(selector, keyword, retry + 1)
}
})
}
this.testRunner.get('[data-test-subj="addFilter"]').click().then(() => {
selectComboBoxInput('filterFieldSuggestionList', field)
selectComboBoxInput('filterOperatorList', operator)
})
if (value != null) {
this.testRunner.get('[data-test-subj="filterParams"]').find('input').type(value)
}
this.testRunner.get('[data-test-subj="saveFilter"]').click()
this.testRunner.get(this._generateFilterSearchString(field)).last().should('be.visible')
}