[9.2] [Infra] Fix hosts view tests (#257997)#258185
Open
jennypavlova wants to merge 2 commits intoelastic:9.2from
Open
[9.2] [Infra] Fix hosts view tests (#257997)#258185jennypavlova wants to merge 2 commits intoelastic:9.2from
jennypavlova wants to merge 2 commits intoelastic:9.2from
Conversation
Closes elastic#257428 Closes elastic#257429 ## Summary This PR tries to fix the flaky behaviour in the hosts view flyout tests. The fix includes: - Use Escape key press instead of clicking on the close button to close the flyout and account for the overlay mask - Wait for the date picker to be visible before selecting the range - Use a JavaScript click for the three main tabs: For visitMetricsTab, visitLogsTab, and visitAlertTab we now: - Keep scrollIntoViewIfNecessary() so the tab is in view. - Replace moveMouseTo() + click() with browser.execute('arguments[0].click();', tab). So the click is triggered via the DOM element instead of a physical click at coordinates. That avoids the “element click intercepted” check and works even when another element is drawn on top of the tab (e.g. KPI flex item, icon, or text). - The existing browser.scrollTop() in each tab’s before() hook is unchanged, so the page is still scrolled to the top before opening each tab. ### Checklist - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 122d887) # Conflicts: # x-pack/solutions/observability/test/functional/apps/infra/hosts_view.ts
2 tasks
sbelastic
approved these changes
Mar 17, 2026
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.2:Questions ?
Please refer to the Backport tool documentation