From 0b6f2e89cef6246b6beda09555a90d0d2697bd8a Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 28 Jun 2023 13:22:54 -0400 Subject: [PATCH] =?UTF-8?q?[8.9]=20fix=20Failing=20test:=20X-Pack=20Saved?= =?UTF-8?q?=20Object=20Tagging=20Functional=20Tests.x-pack/test/saved=5Fob?= =?UTF-8?q?ject=5Ftagging/functional/tests/dashboard=5Fintegration=C2=B7ts?= =?UTF-8?q?=20-=20saved=20objects=20tagging=20-=20functional=20tests=20das?= =?UTF-8?q?hboard=20integration=20creating=20allows=20to=20select=20tags?= =?UTF-8?q?=20=20(#160782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.9`: - [fix Failing test: X-Pack Saved Object Tagging Functional Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts - saved objects tagging - functional tests dashboard integration creating allows to select tags for a new dashboard (#160687)](https://github.com/elastic/kibana/pull/160687) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Nathan Reese --- test/functional/page_objects/dashboard_page.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index aceafe2d179c7..602f0f9d3fd92 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -472,11 +472,10 @@ export class DashboardPageObject extends FtrService { */ public async saveDashboard( dashboardName: string, - saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true }, - clickMenuItem = true + saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true } ) { await this.retry.try(async () => { - await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions, clickMenuItem); + await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions); if (saveOptions.needsConfirm) { await this.ensureDuplicateTitleCallout(); @@ -516,10 +515,12 @@ export class DashboardPageObject extends FtrService { */ public async enterDashboardTitleAndClickSave( dashboardTitle: string, - saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }, - clickMenuItem = true + saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true } ) { - if (clickMenuItem) { + const isSaveModalOpen = await this.testSubjects.exists('savedObjectSaveModal', { + timeout: 2000, + }); + if (!isSaveModalOpen) { await this.testSubjects.click('dashboardSaveMenuItem'); } const modalDialog = await this.testSubjects.find('savedObjectSaveModal');