diff --git a/x-pack/test_serverless/functional/page_objects/svl_common_page.ts b/x-pack/test_serverless/functional/page_objects/svl_common_page.ts index d8ba679128410..84d23eedcce7b 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_common_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_common_page.ts @@ -40,7 +40,22 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide await alert.accept(); } log.debug(`browser: wait for resource page to be loaded`); - await find.byCssSelector('body > pre', 5000); + // TODO: temporary solution while we don't migrate all functional tests to SAML auth + // On CI sometimes we are redirected to cloud login page, in this case we skip cleanup + const isOnBootstrap = await find.existsByDisplayedByCssSelector('body > pre', 5000); + if (!isOnBootstrap) { + const currentUrl = await browser.getCurrentUrl(); + log.debug(`current url: ${currentUrl}`); + if (!currentUrl.includes(deployment.getHostPort())) { + log.debug('Skipping browser state cleanup'); + return; + } else { + log.debug('browser: navigate to /bootstrap-anonymous.js #2'); + await browser.get(noAuthRequiredUrl); + await find.byCssSelector('body > pre', 5000); + } + } + log.debug(`browser: delete all the cookies`); await retry.waitForWithTimeout('Browser cookies are deleted', 10000, async () => { await browser.deleteAllCookies(); @@ -125,7 +140,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide async forceLogout() { log.debug('SvlCommonPage.forceLogout'); - if (await find.existsByDisplayedByCssSelector('.login-form', 100)) { + if (await find.existsByDisplayedByCssSelector('.login-form', 2000)) { log.debug('Already on the login page, not forcing anything'); return; } diff --git a/x-pack/test_serverless/functional/test_suites/search/default_dataview.ts b/x-pack/test_serverless/functional/test_suites/search/default_dataview.ts index 0a0212ba10919..2beb234f688f4 100644 --- a/x-pack/test_serverless/functional/test_suites/search/default_dataview.ts +++ b/x-pack/test_serverless/functional/test_suites/search/default_dataview.ts @@ -13,8 +13,7 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { const svlCommonNavigation = getPageObject('svlCommonNavigation'); const svlCommonPage = getPageObject('svlCommonPage'); - // FLAKY: https://github.com/elastic/kibana/issues/175601 - describe.skip('default dataView', function () { + describe('default dataView', function () { // Error: expected testSubject(kbnOverviewElasticsearchGettingStarted) to exist this.tags(['failsOnMKI']); before(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/navigation.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/navigation.ts index fc75dab7160f5..69bc9d517e7e8 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/navigation.ts @@ -19,8 +19,7 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { const headerPage = getPageObject('header'); const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/175608 - describe.skip('navigation', function () { + describe('navigation', function () { before(async () => { await svlCommonPage.login(); await svlSecNavigation.navigateToLandingPage();