[Infra] Fix hosts view tests#257997
Conversation
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11108[✅] x-pack/performance/journeys_e2e/infra_hosts_view.ts: 25/25 tests passed. |
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
sbelastic
left a comment
There was a problem hiding this comment.
LGTM :)
Just run the flaky tester again please to make sure it passes.
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11126[✅] x-pack/performance/journeys_e2e/infra_hosts_view.ts: 25/25 tests passed. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
|
|
Starting backport for target branches: 8.19, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/23203496427 |
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)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: 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
# Backport This will backport the following commits from `main` to `9.3`: - [[Infra] Fix hosts view tests (#257997)](#257997) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2026-03-17T15:57:30Z","message":"[Infra] Fix hosts view tests (#257997)\n\nCloses #257428 \nCloses #257429 \n\n## Summary\n\nThis PR tries to fix the flaky behaviour in the hosts view flyout tests.\n\nThe fix includes: \n- Use Escape key press instead of clicking on the close button to close\nthe flyout and account for the overlay mask\n- Wait for the date picker to be visible before selecting the range\n- Use a JavaScript click for the three main tabs: For visitMetricsTab,\nvisitLogsTab, and visitAlertTab we now:\n - Keep scrollIntoViewIfNecessary() so the tab is in view.\n- Replace moveMouseTo() + click() with\nbrowser.execute('arguments[0].click();', tab).\nSo the click is triggered via the DOM element instead of a physical\nclick at coordinates. That avoids the “element click intercepted” check\nand works even when another element is drawn on top of the tab (e.g. KPI\nflex item, icon, or text).\n- The existing browser.scrollTop() in each tab’s before() hook is\nunchanged, so the page is still scrolled to the top before opening each\ntab.\n\n### Checklist\n\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"122d887fe14b572849714ecbd9a9974d5cab7629","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.4.0","Team:obs-presentation"],"title":"[Infra] Fix hosts view tests","number":257997,"url":"https://github.com/elastic/kibana/pull/257997","mergeCommit":{"message":"[Infra] Fix hosts view tests (#257997)\n\nCloses #257428 \nCloses #257429 \n\n## Summary\n\nThis PR tries to fix the flaky behaviour in the hosts view flyout tests.\n\nThe fix includes: \n- Use Escape key press instead of clicking on the close button to close\nthe flyout and account for the overlay mask\n- Wait for the date picker to be visible before selecting the range\n- Use a JavaScript click for the three main tabs: For visitMetricsTab,\nvisitLogsTab, and visitAlertTab we now:\n - Keep scrollIntoViewIfNecessary() so the tab is in view.\n- Replace moveMouseTo() + click() with\nbrowser.execute('arguments[0].click();', tab).\nSo the click is triggered via the DOM element instead of a physical\nclick at coordinates. That avoids the “element click intercepted” check\nand works even when another element is drawn on top of the tab (e.g. KPI\nflex item, icon, or text).\n- The existing browser.scrollTop() in each tab’s before() hook is\nunchanged, so the page is still scrolled to the top before opening each\ntab.\n\n### Checklist\n\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"122d887fe14b572849714ecbd9a9974d5cab7629"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/257997","number":257997,"mergeCommit":{"message":"[Infra] Fix hosts view tests (#257997)\n\nCloses #257428 \nCloses #257429 \n\n## Summary\n\nThis PR tries to fix the flaky behaviour in the hosts view flyout tests.\n\nThe fix includes: \n- Use Escape key press instead of clicking on the close button to close\nthe flyout and account for the overlay mask\n- Wait for the date picker to be visible before selecting the range\n- Use a JavaScript click for the three main tabs: For visitMetricsTab,\nvisitLogsTab, and visitAlertTab we now:\n - Keep scrollIntoViewIfNecessary() so the tab is in view.\n- Replace moveMouseTo() + click() with\nbrowser.execute('arguments[0].click();', tab).\nSo the click is triggered via the DOM element instead of a physical\nclick at coordinates. That avoids the “element click intercepted” check\nand works even when another element is drawn on top of the tab (e.g. KPI\nflex item, icon, or text).\n- The existing browser.scrollTop() in each tab’s before() hook is\nunchanged, so the page is still scrolled to the top before opening each\ntab.\n\n### Checklist\n\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"122d887fe14b572849714ecbd9a9974d5cab7629"}}]}] BACKPORT--> Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>
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
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
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.
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
13 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Closes #258194 ## Summary An attempt to fix flaky Infrastructure test by verifying if Host view flyout is opened before proceeding further with other steps. There wasn't reliable way to replicate the flakiness on the local. Follow up on #257997 ### How to test locally ``` node scripts/functional_tests_server --config x-pack/solutions/observability/test/functional/apps/infra/config.ts ``` ``` for i in $(seq 1 10); do echo "=== Run $i ===" node scripts/functional_test_runner \ --config x-pack/solutions/observability/test/functional/apps/infra/config.ts \ --grep "Dashboards Tab" \ || echo "FAILED on run $i" done ```
Closes elastic#258194 ## Summary An attempt to fix flaky Infrastructure test by verifying if Host view flyout is opened before proceeding further with other steps. There wasn't reliable way to replicate the flakiness on the local. Follow up on elastic#257997 ### How to test locally ``` node scripts/functional_tests_server --config x-pack/solutions/observability/test/functional/apps/infra/config.ts ``` ``` for i in $(seq 1 10); do echo "=== Run $i ===" node scripts/functional_test_runner \ --config x-pack/solutions/observability/test/functional/apps/infra/config.ts \ --grep "Dashboards Tab" \ || echo "FAILED on run $i" done ``` (cherry picked from commit fb8461f)
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
3 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `9.3`: - [Attempt to fix flaky Infra test (#261465)](#261465) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Miłosz Marcinkowski","email":"38698566+miloszmarcinkowski@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-08T14:14:15Z","message":"Attempt to fix flaky Infra test (#261465)\n\nCloses #258194\n\n## Summary\n\nAn attempt to fix flaky Infrastructure test by verifying if Host view\nflyout is opened before proceeding further with other steps. There\nwasn't reliable way to replicate the flakiness on the local. Follow up\non #257997\n\n### How to test locally\n```\nnode scripts/functional_tests_server --config x-pack/solutions/observability/test/functional/apps/infra/config.ts\n```\n\n```\nfor i in $(seq 1 10); do\n echo \"=== Run $i ===\"\n node scripts/functional_test_runner \\\n --config x-pack/solutions/observability/test/functional/apps/infra/config.ts \\\n --grep \"Dashboards Tab\" \\\n || echo \"FAILED on run $i\"\ndone\n```","sha":"fb8461fdcbf6f9bfdb63eb8d4e9c814a65c62b5e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.4.0","Team:obs-presentation"],"title":"Attempt to fix flaky Infra test","number":261465,"url":"https://github.com/elastic/kibana/pull/261465","mergeCommit":{"message":"Attempt to fix flaky Infra test (#261465)\n\nCloses #258194\n\n## Summary\n\nAn attempt to fix flaky Infrastructure test by verifying if Host view\nflyout is opened before proceeding further with other steps. There\nwasn't reliable way to replicate the flakiness on the local. Follow up\non #257997\n\n### How to test locally\n```\nnode scripts/functional_tests_server --config x-pack/solutions/observability/test/functional/apps/infra/config.ts\n```\n\n```\nfor i in $(seq 1 10); do\n echo \"=== Run $i ===\"\n node scripts/functional_test_runner \\\n --config x-pack/solutions/observability/test/functional/apps/infra/config.ts \\\n --grep \"Dashboards Tab\" \\\n || echo \"FAILED on run $i\"\ndone\n```","sha":"fb8461fdcbf6f9bfdb63eb8d4e9c814a65c62b5e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/261465","number":261465,"mergeCommit":{"message":"Attempt to fix flaky Infra test (#261465)\n\nCloses #258194\n\n## Summary\n\nAn attempt to fix flaky Infrastructure test by verifying if Host view\nflyout is opened before proceeding further with other steps. There\nwasn't reliable way to replicate the flakiness on the local. Follow up\non #257997\n\n### How to test locally\n```\nnode scripts/functional_tests_server --config x-pack/solutions/observability/test/functional/apps/infra/config.ts\n```\n\n```\nfor i in $(seq 1 10); do\n echo \"=== Run $i ===\"\n node scripts/functional_test_runner \\\n --config x-pack/solutions/observability/test/functional/apps/infra/config.ts \\\n --grep \"Dashboards Tab\" \\\n || echo \"FAILED on run $i\"\ndone\n```","sha":"fb8461fdcbf6f9bfdb63eb8d4e9c814a65c62b5e"}}]}] BACKPORT--> Co-authored-by: Miłosz Marcinkowski <38698566+miloszmarcinkowski@users.noreply.github.com>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
4 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Closes #257428
Closes #257429
Summary
This PR tries to fix the flaky behaviour in the hosts view flyout tests.
The fix includes:
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).
Checklist
backport:*labels.