From 96c3d9155ad553416debf62e5956e8a0d1b2db79 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Mon, 6 Mar 2023 08:29:58 -0500 Subject: [PATCH] Fix flaky test (#152650) ## Summary Fixes: https://github.com/elastic/kibana/issues/148469, https://github.com/elastic/kibana/issues/148468 Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1981 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 93fbaee4f460cd7d610d235f738d03aed1f8ba42) --- .../cases/public/components/all_cases/use_actions.tsx | 7 ++++++- x-pack/test/functional/services/cases/list.ts | 10 ++++++---- .../apps/cases/group2/list_view.ts | 4 +--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/cases/public/components/all_cases/use_actions.tsx b/x-pack/plugins/cases/public/components/all_cases/use_actions.tsx index a06235d144a50..88d94f65f900c 100644 --- a/x-pack/plugins/cases/public/components/all_cases/use_actions.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/use_actions.tsx @@ -186,7 +186,12 @@ const ActionColumnComponent: React.FC<{ theCase: Case; disableActions: boolean } panelPaddingSize="none" anchorPosition="downLeft" > - + {deleteAction.isModalVisible ? ( { + return find.existsByCssSelector('[data-test-subj*="case-action-status-panel-"'); + }); - await find.existsByCssSelector('[data-test-subj*="case-action-status-panel-"'); const statusButton = await find.byCssSelector('[data-test-subj*="case-action-status-panel-"'); statusButton.click(); @@ -218,9 +219,10 @@ export function CasesTableServiceProvider( async changeSeverity(severity: CaseSeverity, index: number) { await this.openRowActions(index); - await testSubjects.existOrFail('cases-bulk-action-delete'); + await retry.waitFor('severity panel exists', async () => { + return find.existsByCssSelector('[data-test-subj*="case-action-severity-panel-"'); + }); - await find.existsByCssSelector('[data-test-subj*="case-action-severity-panel-"'); const statusButton = await find.byCssSelector( '[data-test-subj*="case-action-severity-panel-"' ); 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 485f99f4db94a..b7b5d892681c0 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 @@ -590,9 +590,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/148468 - // FLAKY: https://github.com/elastic/kibana/issues/148469 - describe.skip('Severity', () => { + describe('Severity', () => { before(async () => { await cases.api.createNthRandomCases(1); await header.waitUntilLoadingHasFinished();