From 12c709d5d9e1f101253f909b4f8d3c8ceaf10242 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Sat, 14 Oct 2023 10:54:20 +0300 Subject: [PATCH] [Cases] Wait for the configuration page to appear before starting the tests (#168465) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../observability/cases/configure.ts | 18 +++++++++++++----- .../security/ftr/cases/configure.ts | 12 ++++++++++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts b/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts index 3ed07084edd8cf..f63ce94ead3fe1 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts @@ -21,14 +21,24 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const find = getService('find'); describe('Configure Case', function () { - // Error: timed out waiting for assertRadioGroupValue: Expected the radio group value to equal "close-by-pushing" + // security_exception: action [indices:data/write/delete/byquery] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.kibana_alerting_cases], this action is granted by the index privileges [delete,write,all] this.tags(['failsOnMKI']); before(async () => { await svlCommonPage.login(); await svlObltNavigation.navigateToLandingPage(); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observability-overview:cases' }); + await header.waitUntilLoadingHasFinished(); + + await retry.waitFor('configure-case-button exist', async () => { + return await testSubjects.exists('configure-case-button'); + }); + await common.clickAndValidate('configure-case-button', 'case-configure-title'); await header.waitUntilLoadingHasFinished(); + + await retry.waitFor('case-configure-title exist', async () => { + return await testSubjects.exists('case-configure-title'); + }); }); after(async () => { @@ -36,8 +46,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await svlCommonPage.forceLogout(); }); - // FLAKY: https://github.com/elastic/kibana/issues/166469 - describe.skip('Closure options', function () { + describe('Closure options', function () { it('defaults the closure option correctly', async () => { await cases.common.assertRadioGroupValue('closure-options-radio-group', 'close-by-user'); }); @@ -50,8 +59,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/167869 - describe.skip('Connectors', function () { + describe('Connectors', function () { it('defaults the connector to none correctly', async () => { await retry.waitFor('dropdown-connector-no-connector to exist', async () => { return await testSubjects.exists('dropdown-connector-no-connector'); diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cases/configure.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cases/configure.ts index 5c71abf3ad7ba4..19cd7a3ccdce06 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cases/configure.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cases/configure.ts @@ -26,8 +26,18 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await svlCommonPage.login(); await svlSecNavigation.navigateToLandingPage(); await testSubjects.click('solutionSideNavItemLink-cases'); + await header.waitUntilLoadingHasFinished(); + + await retry.waitFor('configure-case-button exist', async () => { + return await testSubjects.exists('configure-case-button'); + }); + await common.clickAndValidate('configure-case-button', 'case-configure-title'); await header.waitUntilLoadingHasFinished(); + + await retry.waitFor('case-configure-title exist', async () => { + return await testSubjects.exists('case-configure-title'); + }); }); after(async () => { @@ -36,8 +46,6 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); describe('Closure options', function () { - // Error: Expected the radio group value to equal "close-by-pushing" (got "close-by-user") - this.tags(['failsOnMKI']); it('defaults the closure option correctly', async () => { await cases.common.assertRadioGroupValue('closure-options-radio-group', 'close-by-user'); });