Skip to content

[9.3] [Infra] Fix hosts view tests (#257997)#258167

Merged
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-257997
Mar 17, 2026
Merged

[9.3] [Infra] Fix hosts view tests (#257997)#258167
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-257997

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

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)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Mar 17, 2026
@kibanamachine kibanamachine enabled auto-merge (squash) March 17, 2026 16:06
@kibanamachine kibanamachine merged commit a6bfd3c into elastic:9.3 Mar 17, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants