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

[Discover] Fix time zone switch functional test in cloud env #76396

Conversation

kertal
Copy link
Member

@kertal kertal commented Sep 1, 2020

Summary

The overlapping of the query bar with the index pattern selector caused a test fail in cloud. Setting the query bar to '' triggered displaying suggestions, overlapping the index pattern selector. So this PR adds a new function to clear the query, which is followed by a TAB to move focus to the next tabbable element.

image

Here's the test run to prove that it no longer fails:
https://internal-ci.elastic.co/job/elastic+estf-cloud-kibana-flaky-test-runner/105/

Fixes #76166

Checklist

@kertal kertal self-assigned this Sep 1, 2020
@kertal kertal added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 1, 2020
@kertal kertal marked this pull request as ready for review September 1, 2020 17:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

async pressTabKey() {
await browser.pressKeys(browser.keys.TAB);
}

// Pause the browser at a certain place for debugging
// Not meant for usage in CI, only for dev-usage
async pause() {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is now completely off topic, but I was just excited to find a pause function for the functional tests 🥳

@@ -54,6 +54,11 @@ export function QueryBarProvider({ getService, getPageObjects }: FtrProviderCont
});
}

public async clearQuery(): Promise<void> {
await this.setQuery('');
await PageObjects.common.pressTabKey();
Copy link
Member Author

Choose a reason for hiding this comment

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

moving focus by tab closes the query bar suggestions, also the time picker is then displayed again, which simplifies the code of the failing Discover test

@kertal kertal changed the title [Discover] Improve query reset to prevent cloud flakiness [Discover] Fix time zone switch functional test in cloud env Sep 2, 2020
@kertal
Copy link
Member Author

kertal commented Sep 3, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0
Projects
None yet
4 participants