Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Functional Tests] Add timeout for comboBox list loading #73498

Merged
merged 1 commit into from
Jul 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/functional/services/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
* under the License.
*/

export function ComboBoxProvider({ getService }) {
export function ComboBoxProvider({ getService, getPageObjects }) {
const testSubjects = getService('testSubjects');
const find = getService('find');
const log = getService('log');
const retry = getService('retry');
const PageObjects = getPageObjects(['common']);

// wrapper around EuiComboBox interactions
class ComboBox {
Expand Down Expand Up @@ -55,6 +56,7 @@ export function ComboBoxProvider({ getService }) {

async _waitForOptionsListLoading(comboBoxElement) {
await comboBoxElement.waitForDeletedByClassName('euiLoadingSpinner');
await PageObjects.common.sleep(1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any element we could wait for once this is done loading, so we wouldn't need to wait with an arbitrary amount of time here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not, the problem here is that right before rendering filtered list, there's a flicker of unfiltered list with the same structure. We could try to refactor a comboBox or think about refactoring the whole test service, but as it's just 6.8, I feel like it's not worth the effort, especially because the solution above works well.

}

async getOptionsList(comboBoxSelector) {
Expand Down