[Obs UX] Fix hosts view flaky test (#173243)

fixes https://github.com/elastic/kibana/issues/172773

## Summary

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4528

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Carlos Crespo 2023-12-13 17:25:33 +01:00 committed by GitHub
parent c580213c00
commit 2f69f1b597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -424,7 +424,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});
it('should have an option to open the chart in lens', async () => {
await pageObjects.infraHostsView.clickAndValidateMetriChartActionOptions();
await retry.try(async () => {
await pageObjects.infraHostsView.clickAndValidateMetricChartActionOptions();
});
});
});

View file

@ -108,7 +108,7 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
return container.findAllByCssSelector('[data-test-subj*="hostsView-metricChart-"]');
},
async clickAndValidateMetriChartActionOptions() {
async clickAndValidateMetricChartActionOptions() {
const element = await testSubjects.find('hostsView-metricChart-tx');
await element.moveMouseTo();
const button = await element.findByTestSubject('embeddablePanelToggleMenuIcon');