From 6d2e1352b0ae998cd448e16aec82a754c5c28c4f Mon Sep 17 00:00:00 2001 From: adcoelho Date: Thu, 9 Nov 2023 10:29:17 +0100 Subject: [PATCH] Trying to fix tests. --- x-pack/test/functional/services/cases/list.ts | 5 +++++ .../functional_with_es_ssl/apps/cases/group2/list_view.ts | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/services/cases/list.ts b/x-pack/test/functional/services/cases/list.ts index 9d0dc6be17e08..ef3e61acf5213 100644 --- a/x-pack/test/functional/services/cases/list.ts +++ b/x-pack/test/functional/services/cases/list.ts @@ -403,6 +403,11 @@ export function CasesTableServiceProvider( async openColumnsPopover() { await testSubjects.click('column-selection-popover-button'); + await testSubjects.existOrFail('column-selection-popover-drag-drop-context'); + }, + + async closeColumnsPopover() { + await testSubjects.click('column-selection-popover-button'); }, async toggleColumnInPopover(columnId: string) { diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group2/list_view.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group2/list_view.ts index 80e4a621d9135..c1d2b2a9d7c0c 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group2/list_view.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group2/list_view.ts @@ -660,9 +660,6 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { describe('Column Selection', () => { afterEach(async () => { await toasts.dismissAllToastsWithChecks(); - - // closes the popover - await browser.pressKeys(browser.keys.ESCAPE); }); before(async () => { @@ -702,6 +699,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await testSubjects.click('column-selection-popover-hide-all-button'); + await cases.casesTable.closeColumnsPopover(); + expect(await cases.casesTable.hasColumn('Name')).to.be(false); expect(await cases.casesTable.hasColumn('Assignees')).to.be(false); expect(await cases.casesTable.hasColumn('Tags')).to.be(false); @@ -713,6 +712,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await testSubjects.click('column-selection-popover-show-all-button'); + await cases.casesTable.closeColumnsPopover(); + expect(await cases.casesTable.hasColumn('Name')).to.be(true); expect(await cases.casesTable.hasColumn('Assignees')).to.be(true); expect(await cases.casesTable.hasColumn('Tags')).to.be(true);