From ac12b89beee5c00069acf6f04c088f1731c5dcb6 Mon Sep 17 00:00:00 2001 From: nreese Date: Tue, 27 Jun 2023 15:58:18 -0600 Subject: [PATCH 1/2] =?UTF-8?q?fix=20Failing=20test:=20X-Pack=20Saved=20Ob?= =?UTF-8?q?ject=20Tagging=20Functional=20Tests.x-pack/test/saved=5Fobject?= =?UTF-8?q?=5Ftagging/functional/tests/dashboard=5Fintegration=C2=B7ts=20-?= =?UTF-8?q?=20saved=20objects=20tagging=20-=20functional=20tests=20dashboa?= =?UTF-8?q?rd=20integration=20creating=20allows=20to=20select=20tags=20for?= =?UTF-8?q?=20a=20new=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/functional/page_objects/dashboard_page.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index aceafe2d179c7..391be5697a0ca 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -473,10 +473,9 @@ export class DashboardPageObject extends FtrService { public async saveDashboard( dashboardName: string, saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true }, - clickMenuItem = true ) { await this.retry.try(async () => { - await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions, clickMenuItem); + await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions); if (saveOptions.needsConfirm) { await this.ensureDuplicateTitleCallout(); @@ -517,9 +516,11 @@ export class DashboardPageObject extends FtrService { public async enterDashboardTitleAndClickSave( dashboardTitle: string, saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }, - clickMenuItem = 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'); From 024c2309027ae07cbe54285719fcdac18b8ba604 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 27 Jun 2023 22:06:10 +0000 Subject: [PATCH 2/2] [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' --- test/functional/page_objects/dashboard_page.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index 391be5697a0ca..602f0f9d3fd92 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -472,7 +472,7 @@ export class DashboardPageObject extends FtrService { */ public async saveDashboard( dashboardName: string, - saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true }, + saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true } ) { await this.retry.try(async () => { await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions); @@ -515,7 +515,7 @@ export class DashboardPageObject extends FtrService { */ public async enterDashboardTitleAndClickSave( dashboardTitle: string, - saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }, + saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true } ) { const isSaveModalOpen = await this.testSubjects.exists('savedObjectSaveModal', { timeout: 2000,