Skip to content

[8.19] [Infra] Fix hosts view tests (#257997)#258195

Open
jennypavlova wants to merge 2 commits intoelastic:8.19from
jennypavlova:backport/8.19/pr-257997
Open

[8.19] [Infra] Fix hosts view tests (#257997)#258195
jennypavlova wants to merge 2 commits intoelastic:8.19from
jennypavlova:backport/8.19/pr-257997

Conversation

@jennypavlova
Copy link
Copy Markdown
Member

Backport

This will backport the following commits from main to 8.19:

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)

# Conflicts:
#	x-pack/solutions/observability/test/functional/apps/infra/hosts_view.ts
@jennypavlova jennypavlova added the backport This PR is a backport of another PR label Mar 17, 2026
@jennypavlova jennypavlova enabled auto-merge (squash) March 17, 2026 17:19
@jennypavlova jennypavlova mentioned this pull request Mar 17, 2026
2 tasks
@jennypavlova jennypavlova self-assigned this Mar 17, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #22 / InfraOps App Metrics UI Hosts View #With data #Single Host Flyout Tabs Dashboards Tab "before all" hook for "should render dashboards tab splash screen with option to add dashboard"
  • [job] [logs] FTR Configs #22 / InfraOps App Metrics UI Hosts View #With data #Single Host Flyout Tabs Dashboards Tab "before all" hook for "should render dashboards tab splash screen with option to add dashboard"

History

cc @jennypavlova

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.

3 participants