From bfa39c7d4de03cc453d85235a2160154409ea007 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 26 Oct 2023 07:04:13 -0400 Subject: [PATCH] [8.11] Add a slight delay before selecting a visualization type (#169851) (#169917) # Backport This will backport the following commits from `main` to `8.11`: - [Add a slight delay before selecting a visualization type (#169851)](https://github.com/elastic/kibana/pull/169851) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Gerard Soldevila --- test/functional/page_objects/visualize_page.ts | 5 +++++ .../functional/tests/visualize_integration.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index a08b950ce9853a..daa8ab00351bd2 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -170,6 +170,11 @@ export class VisualizePageObject extends FtrService { } public async clickVisType(type: string) { + // checking for the existence of the control gives the UI more time to bind a click handler + // see https://github.com/elastic/kibana/issues/89958 + if (!(await this.hasVisType(type))) { + throw new Error(`The '${type}' visualization type does not exist (visType-${type})`); + } await this.testSubjects.click(`visType-${type}`); await this.header.waitUntilLoadingHasFinished(); } diff --git a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts index b930818a9c5008..a7a03a58ba0cf5 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts @@ -123,8 +123,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/89958 - describe.skip('creating', () => { + describe('creating', () => { before(async () => { await PageObjects.visualize.gotoVisualizationLandingPage(); // delete all visualizations to create new ones explicitly