From d96ee7ddb550122f4786e1aa8271e5316602b32c Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Thu, 21 Sep 2023 15:24:59 +0200 Subject: [PATCH 1/9] [ftr] pass password for UI login + retry login via API in advance --- .../page_objects/svl_common_page.ts | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) 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 cf96bfd274eb9..ca45ccde84a86 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 @@ -5,17 +5,64 @@ * 2.0. */ +import Url from 'url'; import { FtrProviderContext } from '../ftr_provider_context'; export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const config = getService('config'); const pageObjects = getPageObjects(['security']); + const retry = getService('retry'); + const kibanaServer = getService('kibanaServer'); + const log = getService('log'); + + const delay = (ms: number) => + new Promise((resolve) => { + setTimeout(resolve, ms); + }); return { async login() { await pageObjects.security.forceLogout({ waitForLoginPage: false }); - return await pageObjects.security.login(config.get('servers.kibana.username')); + + await retry.waitForWithTimeout( + 'Login successfully via API', + 10_000, + async () => { + const response = await kibanaServer.request({ + method: 'POST', + path: Url.format({ + protocol: config.get('servers.kibana.protocol'), + hostname: config.get('servers.kibana.hostname'), + pathname: 'internal/security/login', + }), + body: { + providerType: 'basic', + providerName: 'cloud-basic', + currentURL: Url.format({ + protocol: config.get('servers.kibana.protocol'), + hostname: config.get('servers.kibana.hostname'), + pathname: 'login', + }), + params: { + username: config.get('servers.kibana.username'), + password: config.get('servers.kibana.password'), + }, + }, + }); + log.debug(`Login via API completed with status: ${response.status}`); + return response.status === 200; + }, + async () => { + log.debug('Waiting 2000 ms before retry'); + await delay(2000); + } + ); + + return await pageObjects.security.login( + config.get('servers.kibana.username'), + config.get('servers.kibana.password') + ); }, async forceLogout() { From 79cdcdc80a62f9995e68a78a898965aa95016bf3 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Thu, 21 Sep 2023 17:21:14 +0200 Subject: [PATCH 2/9] fix port & retry logic --- .../functional/page_objects/svl_common_page.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 ca45ccde84a86..b4c8ffbd4b5c7 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 @@ -34,6 +34,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide path: Url.format({ protocol: config.get('servers.kibana.protocol'), hostname: config.get('servers.kibana.hostname'), + port: config.get('servers.kibana.port'), pathname: 'internal/security/login', }), body: { @@ -42,6 +43,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide currentURL: Url.format({ protocol: config.get('servers.kibana.protocol'), hostname: config.get('servers.kibana.hostname'), + port: config.get('servers.kibana.port'), pathname: 'login', }), params: { @@ -50,8 +52,13 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide }, }, }); - log.debug(`Login via API completed with status: ${response.status}`); - return response.status === 200; + if (response.status !== 200) { + throw new Error( + `Login via API failed with status ${response.status}, but expected 200` + ); + } else { + return true; + } }, async () => { log.debug('Waiting 2000 ms before retry'); From a1dffd4f22622d2b9ef818db720837bd5268f184 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 25 Sep 2023 12:28:35 +0200 Subject: [PATCH 3/9] fix flaky logout > login navigation --- x-pack/test/functional/page_objects/security_page.ts | 8 +++++++- .../functional/page_objects/svl_common_page.ts | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/page_objects/security_page.ts b/x-pack/test/functional/page_objects/security_page.ts index 4498689a428ba..493b7ded79b05 100644 --- a/x-pack/test/functional/page_objects/security_page.ts +++ b/x-pack/test/functional/page_objects/security_page.ts @@ -323,7 +323,13 @@ export class SecurityPageObject extends FtrService { if (alert?.accept) { await alert.accept(); } - return !(await this.browser.getCurrentUrl()).includes('/logout'); + + if (this.config.get('serverless')) { + // Logout might trigger multiple redirects, but in the end we expect the Cloud login page + return await this.find.existsByDisplayedByCssSelector('.login-form-password', 5000); + } else { + return !(await this.browser.getCurrentUrl()).includes('/logout'); + } }); } } 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 b4c8ffbd4b5c7..b5b736584e052 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 @@ -11,7 +11,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const config = getService('config'); - const pageObjects = getPageObjects(['security']); + const pageObjects = getPageObjects(['security', 'common']); const retry = getService('retry'); const kibanaServer = getService('kibanaServer'); const log = getService('log'); @@ -25,6 +25,9 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide async login() { await pageObjects.security.forceLogout({ waitForLoginPage: false }); + // adding sleep to settle down logout + await pageObjects.common.sleep(2500); + await retry.waitForWithTimeout( 'Login successfully via API', 10_000, From 07a56065b740e318267141e1ece3c92648cc27e8 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 25 Sep 2023 12:28:59 +0200 Subject: [PATCH 4/9] remove await for log service --- .../common/index_management/create_enrich_policy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts index 383e55f1e5579..2a1d70a8e42b3 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts @@ -21,7 +21,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Create enrich policy', function () { before(async () => { - await log.debug('Creating test index'); + log.debug('Creating test index'); try { await es.indices.create({ index: INDEX_NAME, @@ -43,7 +43,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { throw e; } - await log.debug('Navigating to the enrich policies tab'); + log.debug('Navigating to the enrich policies tab'); await pageObjects.svlCommonPage.login(); await security.testUser.setRoles(['index_management_user']); await pageObjects.common.navigateToApp('indexManagement'); @@ -56,7 +56,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); after(async () => { - await log.debug('Cleaning up created index'); + log.debug('Cleaning up created index'); try { await es.indices.delete({ index: INDEX_NAME }); From df1eb780c7c063c7a3dcd799b272f327104c5109 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 25 Sep 2023 12:43:34 +0200 Subject: [PATCH 5/9] Revert "remove await for log service" This reverts commit 07a56065b740e318267141e1ece3c92648cc27e8. --- .../common/index_management/create_enrich_policy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts index 2a1d70a8e42b3..383e55f1e5579 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts @@ -21,7 +21,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Create enrich policy', function () { before(async () => { - log.debug('Creating test index'); + await log.debug('Creating test index'); try { await es.indices.create({ index: INDEX_NAME, @@ -43,7 +43,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { throw e; } - log.debug('Navigating to the enrich policies tab'); + await log.debug('Navigating to the enrich policies tab'); await pageObjects.svlCommonPage.login(); await security.testUser.setRoles(['index_management_user']); await pageObjects.common.navigateToApp('indexManagement'); @@ -56,7 +56,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); after(async () => { - log.debug('Cleaning up created index'); + await log.debug('Cleaning up created index'); try { await es.indices.delete({ index: INDEX_NAME }); From d59c88b56d45550afb68e2a28f429ccfa4e96092 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 25 Sep 2023 17:25:28 +0200 Subject: [PATCH 6/9] [ftr] retry login via UI --- .../functional/page_objects/security_page.ts | 3 +- .../page_objects/svl_common_page.ts | 29 ++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/x-pack/test/functional/page_objects/security_page.ts b/x-pack/test/functional/page_objects/security_page.ts index 493b7ded79b05..31aef647fa59d 100644 --- a/x-pack/test/functional/page_objects/security_page.ts +++ b/x-pack/test/functional/page_objects/security_page.ts @@ -168,7 +168,7 @@ export class SecurityPageObject extends FtrService { ); } - private async isLoginFormVisible() { + public async isLoginFormVisible() { return await this.testSubjects.exists('loginForm'); } @@ -326,6 +326,7 @@ export class SecurityPageObject extends FtrService { if (this.config.get('serverless')) { // Logout might trigger multiple redirects, but in the end we expect the Cloud login page + this.log.debug('Wait 5 sec for Cloud login page to be displayed'); return await this.find.existsByDisplayedByCssSelector('.login-form-password', 5000); } else { return !(await this.browser.getCurrentUrl()).includes('/logout'); 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 b5b736584e052..ad310f51c8bb5 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 @@ -15,6 +15,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide const retry = getService('retry'); const kibanaServer = getService('kibanaServer'); const log = getService('log'); + const browser = getService('browser'); const delay = (ms: number) => new Promise((resolve) => { @@ -69,10 +70,30 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide } ); - return await pageObjects.security.login( - config.get('servers.kibana.username'), - config.get('servers.kibana.password') - ); + await retry.waitForWithTimeout('Login to Kibana via UI', 90_000, async () => { + await pageObjects.common.navigateToUrl('login'); + // ensure welcome screen won't be shown. This is relevant for environments which don't allow + // to use the yml setting, e.g. cloud + await browser.setLocalStorageItem('home:welcome:show', 'false'); + + log.debug('Waiting for Login Form to appear.'); + await retry.waitForWithTimeout('login form', 10_000, async () => { + return await pageObjects.security.isLoginFormVisible(); + }); + + await testSubjects.setValue('loginUsername', config.get('servers.kibana.username')); + await testSubjects.setValue('loginPassword', config.get('servers.kibana.password')); + await testSubjects.click('loginSubmit'); + + if (await testSubjects.exists('userMenuButton', { timeout: 10_000 })) { + return true; + } else { + // Sometimes authentication fails and user is redirected to Cloud login page + // [plugins.security.authentication] Authentication attempt failed: UNEXPECTED_SESSION_ERROR + const currentUrl = await browser.getCurrentUrl(); + throw new Error(`Failed to login, currentUrl=${currentUrl}`); + } + }); }, async forceLogout() { From a228bf9e420d2632e9f135b4f606bee8eeadefb7 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 25 Sep 2023 19:00:34 +0200 Subject: [PATCH 7/9] remove API call, split logic on retry failure --- .../page_objects/svl_common_page.ts | 110 +++++++++--------- 1 file changed, 53 insertions(+), 57 deletions(-) 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 ad310f51c8bb5..7762bf92d046a 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 @@ -5,7 +5,6 @@ * 2.0. */ -import Url from 'url'; import { FtrProviderContext } from '../ftr_provider_context'; export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) { @@ -13,7 +12,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide const config = getService('config'); const pageObjects = getPageObjects(['security', 'common']); const retry = getService('retry'); - const kibanaServer = getService('kibanaServer'); + const deployment = getService('deployment'); const log = getService('log'); const browser = getService('browser'); @@ -23,6 +22,19 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide }); return { + async navigateToLoginForm() { + const url = deployment.getHostPort() + '/login'; + await browser.get(url); + // ensure welcome screen won't be shown. This is relevant for environments which don't allow + // to use the yml setting, e.g. cloud + await browser.setLocalStorageItem('home:welcome:show', 'false'); + + log.debug('Waiting for Login Form to appear.'); + await retry.waitForWithTimeout('login form', 10_000, async () => { + return await pageObjects.security.isLoginFormVisible(); + }); + }, + async login() { await pageObjects.security.forceLogout({ waitForLoginPage: false }); @@ -30,74 +42,58 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide await pageObjects.common.sleep(2500); await retry.waitForWithTimeout( - 'Login successfully via API', - 10_000, + 'Waiting for successful authentication', + 90_000, async () => { - const response = await kibanaServer.request({ - method: 'POST', - path: Url.format({ - protocol: config.get('servers.kibana.protocol'), - hostname: config.get('servers.kibana.hostname'), - port: config.get('servers.kibana.port'), - pathname: 'internal/security/login', - }), - body: { - providerType: 'basic', - providerName: 'cloud-basic', - currentURL: Url.format({ - protocol: config.get('servers.kibana.protocol'), - hostname: config.get('servers.kibana.hostname'), - port: config.get('servers.kibana.port'), - pathname: 'login', - }), - params: { - username: config.get('servers.kibana.username'), - password: config.get('servers.kibana.password'), - }, - }, - }); - if (response.status !== 200) { - throw new Error( - `Login via API failed with status ${response.status}, but expected 200` - ); - } else { + if (!(await testSubjects.exists('loginUsername', { timeout: 1000 }))) { + await this.navigateToLoginForm(); + + await testSubjects.setValue('loginUsername', config.get('servers.kibana.username')); + await testSubjects.setValue('loginPassword', config.get('servers.kibana.password')); + await testSubjects.click('loginSubmit'); + } + + if (await testSubjects.exists('userMenuButton', { timeout: 10_000 })) { + log.debug('userMenuButton is found, logged in passed'); return true; + } else { + throw new Error(`Failed to login to Kibana via UI`); } }, async () => { - log.debug('Waiting 2000 ms before retry'); - await delay(2000); - } - ); - - await retry.waitForWithTimeout('Login to Kibana via UI', 90_000, async () => { - await pageObjects.common.navigateToUrl('login'); - // ensure welcome screen won't be shown. This is relevant for environments which don't allow - // to use the yml setting, e.g. cloud - await browser.setLocalStorageItem('home:welcome:show', 'false'); - - log.debug('Waiting for Login Form to appear.'); - await retry.waitForWithTimeout('login form', 10_000, async () => { - return await pageObjects.security.isLoginFormVisible(); - }); - - await testSubjects.setValue('loginUsername', config.get('servers.kibana.username')); - await testSubjects.setValue('loginPassword', config.get('servers.kibana.password')); - await testSubjects.click('loginSubmit'); - - if (await testSubjects.exists('userMenuButton', { timeout: 10_000 })) { - return true; - } else { // Sometimes authentication fails and user is redirected to Cloud login page // [plugins.security.authentication] Authentication attempt failed: UNEXPECTED_SESSION_ERROR const currentUrl = await browser.getCurrentUrl(); - throw new Error(`Failed to login, currentUrl=${currentUrl}`); + if (currentUrl.startsWith('https://cloud.elastic.co')) { + log.debug( + 'Probably authentication attempt failed, we are at Cloud login page. Retrying from scratch' + ); + } else { + const authError = await testSubjects.exists('promptPage', { timeout: 2500 }); + if (authError) { + log.debug('Probably SAML callback page, doing logout again'); + await pageObjects.security.forceLogout({ waitForLoginPage: false }); + } else { + const isOnLoginPage = await testSubjects.exists('loginUsername', { timeout: 1000 }); + if (isOnLoginPage) { + log.debug( + 'Probably ES user profile activation failed, waiting 2 seconds and pressing Login button again' + ); + await delay(2000); + await testSubjects.click('loginSubmit'); + } else { + log.debug('New behaviour, trying to navigate and login again'); + } + } + } } - }); + ); + log.debug('Logged in successfully'); }, async forceLogout() { await pageObjects.security.forceLogout({ waitForLoginPage: false }); + log.debug('Logged out successfully'); }, async assertProjectHeaderExists() { From 9b8651f160a8a2648294185ccd3e2f95b6cae1f9 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Tue, 26 Sep 2023 11:44:09 +0200 Subject: [PATCH 8/9] update nav, unskip tests --- .../page_objects/svl_common_page.ts | 104 ++++++++++++++++++ .../services/svl_common_navigation.ts | 4 +- .../services/svl_oblt_navigation.ts | 4 +- .../services/svl_search_navigation.ts | 4 +- .../functional/services/svl_sec_navigation.ts | 4 +- .../test_suites/common/advanced_settings.ts | 4 +- .../data_view_field_editor_example/index.ts | 4 +- .../customizations.ts | 2 +- .../common/examples/field_formats/index.ts | 2 +- .../common/examples/partial_results/index.ts | 2 +- .../common/examples/search/warnings.ts | 2 +- .../partial_results_example.ts | 6 +- .../search_examples/search_example.ts | 2 +- .../existing_fields.ts | 12 +- .../field_stats.ts | 12 +- .../index_management/create_enrich_policy.ts | 2 +- .../index_management/index_templates.ts | 2 +- .../common/index_management/indices.ts | 2 +- .../observability/advanced_settings.ts | 4 +- .../test_suites/search/advanced_settings.ts | 4 +- .../search/dashboards/build_dashboard.ts | 2 +- .../search/dashboards/import_dashboard.ts | 6 +- .../stack_connectors/connectors.ts | 2 +- .../test_suites/security/advanced_settings.ts | 4 +- 24 files changed, 156 insertions(+), 40 deletions(-) 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 7762bf92d046a..300b3d07ee126 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 @@ -5,6 +5,7 @@ * 2.0. */ +import { getUrl } from '@kbn/test'; import { FtrProviderContext } from '../ftr_provider_context'; export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) { @@ -22,6 +23,105 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide }); return { + async navigateToApp( + appName: string, + { + basePath = '', + shouldLoginIfPrompted = true, + path = '', + hash = '', + search = '', + disableWelcomePrompt = true, + insertTimestamp = true, + retryOnFatalError = true, + } = {} + ) { + let appUrl: string; + + if (config.has(['apps', appName])) { + // Legacy applications + const appConfig = config.get(['apps', appName]); + appUrl = getUrl.noAuth(config.get('servers.kibana'), { + pathname: `${basePath}${appConfig.pathname}`, + hash: hash || appConfig.hash, + search, + }); + } else { + appUrl = getUrl.noAuth(config.get('servers.kibana'), { + pathname: `${basePath}/app/${appName}` + (path ? `/${path}` : ''), + hash, + search, + }); + } + + log.debug('navigating to ' + appName + ' url: ' + appUrl); + + await retry.tryForTime(60_000 * 2, async () => { + let lastUrl = await retry.try(async () => { + // since we're using hash URLs, always reload first to force re-render + log.debug('navigate to: ' + appUrl); + await browser.get(appUrl, insertTimestamp); + // accept alert if it pops up + const alert = await browser.getAlert(); + await alert?.accept(); + await delay(700); + let currentUrl = await browser.getCurrentUrl(); + + if (currentUrl.includes('app/kibana')) { + await testSubjects.find('kibanaChrome'); + } + + // If navigating to the `home` app, and we want to skip the Welcome page, but the chrome is still hidden, + // set the relevant localStorage key to skip the Welcome page and throw an error to try to navigate again. + // if ( + // appName === 'home' && + // currentUrl.includes('app/home') && + // disableWelcomePrompt && + // (await this.isWelcomeScreen()) + // ) { + // await this.browser.setLocalStorageItem('home:welcome:show', 'false'); + // const msg = `Failed to skip the Welcome page when navigating the app ${appName}`; + // this.log.debug(msg); + // throw new Error(msg); + // } + + currentUrl = (await browser.getCurrentUrl()).replace(/\/\/\w+:\w+@/, '//'); + + const navSuccessful = currentUrl + .replace(':80/', '/') + .replace(':443/', '/') + .startsWith(appUrl.replace(':80/', '/').replace(':443/', '/')); + + if (!navSuccessful) { + const msg = `App failed to load: ${appName} in 60000 ms appUrl=${appUrl} currentUrl=${currentUrl}`; + log.debug(msg); + throw new Error(msg); + } + + if (retryOnFatalError && (await pageObjects.common.isFatalErrorScreen())) { + const msg = `Fatal error screen shown. Let's try refreshing the page once more.`; + log.debug(msg); + throw new Error(msg); + } + + if (appName === 'discover') { + await browser.setLocalStorageItem('data.autocompleteFtuePopover', 'true'); + } + return currentUrl; + }); + + await retry.tryForTime(60_000, async () => { + await delay(501); + const currentUrl = await browser.getCurrentUrl(); + log.debug('in navigateTo url = ' + currentUrl); + if (lastUrl !== currentUrl) { + lastUrl = currentUrl; + throw new Error('URL changed, waiting for it to settle'); + } + }); + }); + }, + async navigateToLoginForm() { const url = deployment.getHostPort() + '/login'; await browser.get(url); @@ -53,6 +153,10 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide await testSubjects.click('loginSubmit'); } + await testSubjects.existOrFail('userMenuButton', { timeout: 10_000 }); + await delay(2000); + await browser.refresh(); + if (await testSubjects.exists('userMenuButton', { timeout: 10_000 })) { log.debug('userMenuButton is found, logged in passed'); return true; diff --git a/x-pack/test_serverless/functional/services/svl_common_navigation.ts b/x-pack/test_serverless/functional/services/svl_common_navigation.ts index 07efaa8c918c7..9511d5a63c808 100644 --- a/x-pack/test_serverless/functional/services/svl_common_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_common_navigation.ts @@ -13,12 +13,12 @@ export function SvlCommonNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['common', 'svlCommonPage']); return { async navigateToKibanaHome() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.common.navigateToApp('home'); + await PageObjects.svlCommonPage.navigateToApp('home'); await testSubjects.existOrFail('homeApp', { timeout: 2000 }); }); }, diff --git a/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts b/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts index a028626f8a11d..d73114c2f8da6 100644 --- a/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts @@ -13,12 +13,12 @@ export function SvlObltNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['svlCommonPage']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.common.navigateToApp('landingPage'); + await PageObjects.svlCommonPage.navigateToApp('landingPage'); await testSubjects.existOrFail('obltOnboardingHomeTitle', { timeout: 2000 }); }); }, diff --git a/x-pack/test_serverless/functional/services/svl_search_navigation.ts b/x-pack/test_serverless/functional/services/svl_search_navigation.ts index dd0c1515a429c..fa5c2782b219e 100644 --- a/x-pack/test_serverless/functional/services/svl_search_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_search_navigation.ts @@ -12,12 +12,12 @@ export function SvlSearchNavigationServiceProvider({ getPageObjects, }: FtrProviderContext) { const retry = getService('retry'); - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['svlCommonPage']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.common.navigateToApp('landingPage'); + await PageObjects.svlCommonPage.navigateToApp('landingPage'); // The getting started page is currently empty, so there's nothing we could // assert on. Once something exists here, we should add back a check. // await testSubjects.existOrFail('svlSearchOverviewPage', { timeout: 2000 }); diff --git a/x-pack/test_serverless/functional/services/svl_sec_navigation.ts b/x-pack/test_serverless/functional/services/svl_sec_navigation.ts index 85f21940d5ab1..fdc737c931770 100644 --- a/x-pack/test_serverless/functional/services/svl_sec_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_sec_navigation.ts @@ -13,12 +13,12 @@ export function SvlSecNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['svlCommonPage']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.common.navigateToApp('landingPage'); + await PageObjects.svlCommonPage.navigateToApp('landingPage'); // Currently, the security landing page app is not loading correctly. // Replace '~kbnAppWrapper' with a proper test subject of the landing // page once it loads successfully. diff --git a/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts index f24d3350b9744..634dc8f33edc2 100644 --- a/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['svlCommonPage']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Common advanced settings', function () { before(async () => { - await pageObjects.common.navigateToApp('advancedSettings'); + await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts index 106f504cae82b..b75d6deb13fab 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid ); // TODO: Navigation to Data View Management is different in Serverless - await PageObjects.common.navigateToApp('management'); + await PageObjects.svlCommonPage.navigateToApp('management'); await retry.waitFor('data views link', async () => { if (await testSubjects.exists('app-card-dataViews')) { await testSubjects.click('app-card-dataViews'); @@ -56,7 +56,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid return false; }); await PageObjects.settings.createIndexPattern('blogs', null); - await PageObjects.common.navigateToApp('dataViewFieldEditorExample'); + await PageObjects.svlCommonPage.navigateToApp('dataViewFieldEditorExample'); }); loadTestFile(require.resolve('./data_view_field_editor_example')); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts index d653c6f8505ba..47fcc7cd8ca24 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts @@ -28,7 +28,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace(defaultSettings); - await PageObjects.common.navigateToApp('home'); + await PageObjects.svlCommonPage.navigateToApp('home'); const currentUrl = await browser.getCurrentUrl(); const customizationUrl = currentUrl.substring(0, currentUrl.indexOf('/app/home')) + diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts index 9da271eee5941..f8db52b4d227a 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts @@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { // TODO: Serverless tests require login first await PageObjects.svlCommonPage.login(); - await PageObjects.common.navigateToApp('fieldFormatsExample'); + await PageObjects.svlCommonPage.navigateToApp('fieldFormatsExample'); }); it('renders field formats example 1', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts index 9ac96c87fa941..2858cb7e1a16c 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts @@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { // TODO: Serverless tests require login first await PageObjects.svlCommonPage.login(); - await PageObjects.common.navigateToApp('partialResultsExample'); + await PageObjects.svlCommonPage.navigateToApp('partialResultsExample'); const element = await testSubjects.find('example-help'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts index a98cc05f0bfd3..2e522680dff43 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts @@ -85,7 +85,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'timepicker:timeDefaults': '{ "from": "now-1y", "to": "now" }', }); - await PageObjects.common.navigateToApp('searchExamples'); + await PageObjects.svlCommonPage.navigateToApp('searchExamples'); }); beforeEach(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts index 38f055d9be277..992a25bb27bc6 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts @@ -10,13 +10,13 @@ import type { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common']); + const PageObjects = getPageObjects(['svlCommonPage']); const retry = getService('retry'); // FLAKY: https://github.com/elastic/kibana/issues/165763 - describe.skip('Partial results example', () => { + describe('Partial results example', () => { before(async () => { - await PageObjects.common.navigateToApp('searchExamples'); + await PageObjects.svlCommonPage.navigateToApp('searchExamples'); await testSubjects.click('/search'); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts index 67a2e41d50314..b26836405d8dd 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts @@ -40,7 +40,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { function testSearchExample() { before(async function () { - await PageObjects.common.navigateToApp(appId, { insertTimestamp: false }); + await PageObjects.svlCommonPage.navigateToApp(appId, { insertTimestamp: false }); await comboBox.setCustom('dataViewSelector', 'logstash-*'); await comboBox.set('searchBucketField', 'geo.src'); await comboBox.set('searchMetricField', 'memory'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts index 2b8effe5fcd58..fb7a1dcd9c4c5 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts @@ -28,7 +28,13 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const retry = getService('retry'); const testSubjects = getService('testSubjects'); const monacoEditor = getService('monacoEditor'); - const PageObjects = getPageObjects(['common', 'timePicker', 'header', 'unifiedFieldList']); + const PageObjects = getPageObjects([ + 'common', + 'timePicker', + 'header', + 'unifiedFieldList', + 'svlCommonPage', + ]); const dataViewTitle = 'existence_index_*'; async function addDSLFilter(value: string) { @@ -53,7 +59,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { // Failing: See https://github.com/elastic/kibana/issues/165938 // Failing: See https://github.com/elastic/kibana/issues/165927 - describe.skip('Fields existence info', () => { + describe('Fields existence info', () => { before(async () => { await esArchiver.load( 'test/api_integration/fixtures/es_archiver/index_patterns/constant_keyword' @@ -61,7 +67,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await kibanaServer.importExport.load( 'test/api_integration/fixtures/kbn_archiver/index_patterns/constant_keyword.json' ); - await PageObjects.common.navigateToApp('unifiedFieldListExamples'); + await PageObjects.svlCommonPage.navigateToApp('unifiedFieldListExamples'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.waitFor('combobox is ready', async () => { return await testSubjects.exists('dataViewSelector'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts index aacd1352280bb..2649884b802e6 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts @@ -12,7 +12,13 @@ const TEST_START_TIME = 'Sep 19, 2015 @ 06:31:44.000'; const TEST_END_TIME = 'Sep 23, 2015 @ 18:31:44.000'; export default ({ getService, getPageObjects }: FtrProviderContext) => { - const PageObjects = getPageObjects(['common', 'timePicker', 'header', 'unifiedFieldList']); + const PageObjects = getPageObjects([ + 'common', + 'timePicker', + 'header', + 'unifiedFieldList', + 'svlCommonPage', + ]); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const comboBox = getService('comboBox'); @@ -22,7 +28,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const dataViewTitle = 'logstash-2015.09.22'; // FLAKY: https://github.com/elastic/kibana/issues/165882 - describe.skip('Field stats', () => { + describe('Field stats', () => { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); @@ -34,7 +40,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await esArchiver.loadIfNeeded( 'x-pack/test_serverless/functional/es_archives/pre_calculated_histogram' ); - await PageObjects.common.navigateToApp('unifiedFieldListExamples'); + await PageObjects.svlCommonPage.navigateToApp('unifiedFieldListExamples'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.waitFor('combobox is ready', async () => { return await testSubjects.exists('dataViewSelector'); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts index 383e55f1e5579..b5ef0db943c8c 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts @@ -46,7 +46,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await log.debug('Navigating to the enrich policies tab'); await pageObjects.svlCommonPage.login(); await security.testUser.setRoles(['index_management_user']); - await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.svlCommonPage.navigateToApp('indexManagement'); // Navigate to the enrich policies tab await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts index 7e9355076887b..23d4c0f74ab4f 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts @@ -18,7 +18,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await security.testUser.setRoles(['index_management_user']); // Navigate to the index management page await pageObjects.svlCommonPage.login(); - await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.svlCommonPage.navigateToApp('indexManagement'); // Navigate to the index templates tab await pageObjects.indexManagement.changeTabs('templatesTab'); await pageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts index 5d9d53863270b..2d5f50add77d9 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts @@ -18,7 +18,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await security.testUser.setRoles(['index_management_user']); // Navigate to the index management page await pageObjects.svlCommonPage.login(); - await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.svlCommonPage.navigateToApp('indexManagement'); // Navigate to the indices tab await pageObjects.indexManagement.changeTabs('indicesTab'); await pageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts index e723b81dbe20f..f000fa42fe9df 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['common', 'svlCommonPage']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Observability advanced settings', function () { before(async () => { - await pageObjects.common.navigateToApp('advancedSettings'); + await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts index 63b6053589ea6..2f04b1cca19c2 100644 --- a/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['common', 'svlCommonPage']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Search advanced settings', function () { before(async () => { - await pageObjects.common.navigateToApp('advancedSettings'); + await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts b/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts index d91d296c75624..ee0b25e9f0770 100644 --- a/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts +++ b/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts @@ -33,7 +33,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ); - await PageObjects.common.navigateToApp('dashboards'); + await PageObjects.svlCommonPage.navigateToApp('dashboards'); await PageObjects.dashboard.preserveCrossAppState(); await PageObjects.dashboard.clickNewDashboard(); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts b/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts index c935ab3f15f83..4c8c4110008a1 100644 --- a/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts +++ b/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); // Failing: See https://github.com/elastic/kibana/issues/166573 - describe.skip('Importing an existing dashboard', () => { + describe('Importing an existing dashboard', () => { before(async () => { await PageObjects.svlCommonPage.login(); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should be able to import dashboard created in 8.11', async () => { - await PageObjects.common.navigateToApp('management'); + await PageObjects.svlCommonPage.navigateToApp('management'); await testSubjects.click('app-card-objects'); await PageObjects.savedObjects.waitTableIsLoaded(); await PageObjects.savedObjects.importFile( @@ -55,7 +55,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should render all panels on the dashboard', async () => { - await PageObjects.common.navigateToApp('dashboards'); + await PageObjects.svlCommonPage.navigateToApp('dashboards'); await PageObjects.dashboard.loadSavedDashboard('Super Saved Serverless'); // dashboard should load properly diff --git a/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts b/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts index 8bfada9db1044..87651f879a816 100644 --- a/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts +++ b/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('connectors list screenshot', async () => { - await pageObjects.common.navigateToApp('connectors'); + await pageObjects.svlCommonPage.navigateToApp('connectors'); await pageObjects.header.waitUntilLoadingHasFinished(); await svlCommonScreenshots.takeScreenshot( 'connector-listing', diff --git a/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts index 27fa42549dcc6..68b6903b36a8f 100644 --- a/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['common', 'svlCommonPage']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Security advanced settings', function () { before(async () => { - await pageObjects.common.navigateToApp('advancedSettings'); + await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); }); it('renders the page', async () => { From fefbac8aff365f539fdc89916c6a1d14bd206315 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Tue, 26 Sep 2023 17:23:27 +0200 Subject: [PATCH 9/9] Revert "update nav, unskip tests" This reverts commit 9b8651f160a8a2648294185ccd3e2f95b6cae1f9. --- .../page_objects/svl_common_page.ts | 104 ------------------ .../services/svl_common_navigation.ts | 4 +- .../services/svl_oblt_navigation.ts | 4 +- .../services/svl_search_navigation.ts | 4 +- .../functional/services/svl_sec_navigation.ts | 4 +- .../test_suites/common/advanced_settings.ts | 4 +- .../data_view_field_editor_example/index.ts | 4 +- .../customizations.ts | 2 +- .../common/examples/field_formats/index.ts | 2 +- .../common/examples/partial_results/index.ts | 2 +- .../common/examples/search/warnings.ts | 2 +- .../partial_results_example.ts | 6 +- .../search_examples/search_example.ts | 2 +- .../existing_fields.ts | 12 +- .../field_stats.ts | 12 +- .../index_management/create_enrich_policy.ts | 2 +- .../index_management/index_templates.ts | 2 +- .../common/index_management/indices.ts | 2 +- .../observability/advanced_settings.ts | 4 +- .../test_suites/search/advanced_settings.ts | 4 +- .../search/dashboards/build_dashboard.ts | 2 +- .../search/dashboards/import_dashboard.ts | 6 +- .../stack_connectors/connectors.ts | 2 +- .../test_suites/security/advanced_settings.ts | 4 +- 24 files changed, 40 insertions(+), 156 deletions(-) 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 300b3d07ee126..7762bf92d046a 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 @@ -5,7 +5,6 @@ * 2.0. */ -import { getUrl } from '@kbn/test'; import { FtrProviderContext } from '../ftr_provider_context'; export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) { @@ -23,105 +22,6 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide }); return { - async navigateToApp( - appName: string, - { - basePath = '', - shouldLoginIfPrompted = true, - path = '', - hash = '', - search = '', - disableWelcomePrompt = true, - insertTimestamp = true, - retryOnFatalError = true, - } = {} - ) { - let appUrl: string; - - if (config.has(['apps', appName])) { - // Legacy applications - const appConfig = config.get(['apps', appName]); - appUrl = getUrl.noAuth(config.get('servers.kibana'), { - pathname: `${basePath}${appConfig.pathname}`, - hash: hash || appConfig.hash, - search, - }); - } else { - appUrl = getUrl.noAuth(config.get('servers.kibana'), { - pathname: `${basePath}/app/${appName}` + (path ? `/${path}` : ''), - hash, - search, - }); - } - - log.debug('navigating to ' + appName + ' url: ' + appUrl); - - await retry.tryForTime(60_000 * 2, async () => { - let lastUrl = await retry.try(async () => { - // since we're using hash URLs, always reload first to force re-render - log.debug('navigate to: ' + appUrl); - await browser.get(appUrl, insertTimestamp); - // accept alert if it pops up - const alert = await browser.getAlert(); - await alert?.accept(); - await delay(700); - let currentUrl = await browser.getCurrentUrl(); - - if (currentUrl.includes('app/kibana')) { - await testSubjects.find('kibanaChrome'); - } - - // If navigating to the `home` app, and we want to skip the Welcome page, but the chrome is still hidden, - // set the relevant localStorage key to skip the Welcome page and throw an error to try to navigate again. - // if ( - // appName === 'home' && - // currentUrl.includes('app/home') && - // disableWelcomePrompt && - // (await this.isWelcomeScreen()) - // ) { - // await this.browser.setLocalStorageItem('home:welcome:show', 'false'); - // const msg = `Failed to skip the Welcome page when navigating the app ${appName}`; - // this.log.debug(msg); - // throw new Error(msg); - // } - - currentUrl = (await browser.getCurrentUrl()).replace(/\/\/\w+:\w+@/, '//'); - - const navSuccessful = currentUrl - .replace(':80/', '/') - .replace(':443/', '/') - .startsWith(appUrl.replace(':80/', '/').replace(':443/', '/')); - - if (!navSuccessful) { - const msg = `App failed to load: ${appName} in 60000 ms appUrl=${appUrl} currentUrl=${currentUrl}`; - log.debug(msg); - throw new Error(msg); - } - - if (retryOnFatalError && (await pageObjects.common.isFatalErrorScreen())) { - const msg = `Fatal error screen shown. Let's try refreshing the page once more.`; - log.debug(msg); - throw new Error(msg); - } - - if (appName === 'discover') { - await browser.setLocalStorageItem('data.autocompleteFtuePopover', 'true'); - } - return currentUrl; - }); - - await retry.tryForTime(60_000, async () => { - await delay(501); - const currentUrl = await browser.getCurrentUrl(); - log.debug('in navigateTo url = ' + currentUrl); - if (lastUrl !== currentUrl) { - lastUrl = currentUrl; - throw new Error('URL changed, waiting for it to settle'); - } - }); - }); - }, - async navigateToLoginForm() { const url = deployment.getHostPort() + '/login'; await browser.get(url); @@ -153,10 +53,6 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide await testSubjects.click('loginSubmit'); } - await testSubjects.existOrFail('userMenuButton', { timeout: 10_000 }); - await delay(2000); - await browser.refresh(); - if (await testSubjects.exists('userMenuButton', { timeout: 10_000 })) { log.debug('userMenuButton is found, logged in passed'); return true; diff --git a/x-pack/test_serverless/functional/services/svl_common_navigation.ts b/x-pack/test_serverless/functional/services/svl_common_navigation.ts index 9511d5a63c808..07efaa8c918c7 100644 --- a/x-pack/test_serverless/functional/services/svl_common_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_common_navigation.ts @@ -13,12 +13,12 @@ export function SvlCommonNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'svlCommonPage']); + const PageObjects = getPageObjects(['common']); return { async navigateToKibanaHome() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.svlCommonPage.navigateToApp('home'); + await PageObjects.common.navigateToApp('home'); await testSubjects.existOrFail('homeApp', { timeout: 2000 }); }); }, diff --git a/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts b/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts index d73114c2f8da6..a028626f8a11d 100644 --- a/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts @@ -13,12 +13,12 @@ export function SvlObltNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['svlCommonPage']); + const PageObjects = getPageObjects(['common']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.svlCommonPage.navigateToApp('landingPage'); + await PageObjects.common.navigateToApp('landingPage'); await testSubjects.existOrFail('obltOnboardingHomeTitle', { timeout: 2000 }); }); }, diff --git a/x-pack/test_serverless/functional/services/svl_search_navigation.ts b/x-pack/test_serverless/functional/services/svl_search_navigation.ts index fa5c2782b219e..dd0c1515a429c 100644 --- a/x-pack/test_serverless/functional/services/svl_search_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_search_navigation.ts @@ -12,12 +12,12 @@ export function SvlSearchNavigationServiceProvider({ getPageObjects, }: FtrProviderContext) { const retry = getService('retry'); - const PageObjects = getPageObjects(['svlCommonPage']); + const PageObjects = getPageObjects(['common']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.svlCommonPage.navigateToApp('landingPage'); + await PageObjects.common.navigateToApp('landingPage'); // The getting started page is currently empty, so there's nothing we could // assert on. Once something exists here, we should add back a check. // await testSubjects.existOrFail('svlSearchOverviewPage', { timeout: 2000 }); diff --git a/x-pack/test_serverless/functional/services/svl_sec_navigation.ts b/x-pack/test_serverless/functional/services/svl_sec_navigation.ts index fdc737c931770..85f21940d5ab1 100644 --- a/x-pack/test_serverless/functional/services/svl_sec_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_sec_navigation.ts @@ -13,12 +13,12 @@ export function SvlSecNavigationServiceProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['svlCommonPage']); + const PageObjects = getPageObjects(['common']); return { async navigateToLandingPage() { await retry.tryForTime(60 * 1000, async () => { - await PageObjects.svlCommonPage.navigateToApp('landingPage'); + await PageObjects.common.navigateToApp('landingPage'); // Currently, the security landing page app is not loading correctly. // Replace '~kbnAppWrapper' with a proper test subject of the landing // page once it loads successfully. diff --git a/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts index 634dc8f33edc2..f24d3350b9744 100644 --- a/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/common/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['svlCommonPage']); + const pageObjects = getPageObjects(['common']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Common advanced settings', function () { before(async () => { - await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); + await pageObjects.common.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts index b75d6deb13fab..106f504cae82b 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/data_view_field_editor_example/index.ts @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid ); // TODO: Navigation to Data View Management is different in Serverless - await PageObjects.svlCommonPage.navigateToApp('management'); + await PageObjects.common.navigateToApp('management'); await retry.waitFor('data views link', async () => { if (await testSubjects.exists('app-card-dataViews')) { await testSubjects.click('app-card-dataViews'); @@ -56,7 +56,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid return false; }); await PageObjects.settings.createIndexPattern('blogs', null); - await PageObjects.svlCommonPage.navigateToApp('dataViewFieldEditorExample'); + await PageObjects.common.navigateToApp('dataViewFieldEditorExample'); }); loadTestFile(require.resolve('./data_view_field_editor_example')); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts index 47fcc7cd8ca24..d653c6f8505ba 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts @@ -28,7 +28,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace(defaultSettings); - await PageObjects.svlCommonPage.navigateToApp('home'); + await PageObjects.common.navigateToApp('home'); const currentUrl = await browser.getCurrentUrl(); const customizationUrl = currentUrl.substring(0, currentUrl.indexOf('/app/home')) + diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts index f8db52b4d227a..9da271eee5941 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/field_formats/index.ts @@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { // TODO: Serverless tests require login first await PageObjects.svlCommonPage.login(); - await PageObjects.svlCommonPage.navigateToApp('fieldFormatsExample'); + await PageObjects.common.navigateToApp('fieldFormatsExample'); }); it('renders field formats example 1', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts index 2858cb7e1a16c..9ac96c87fa941 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/partial_results/index.ts @@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { // TODO: Serverless tests require login first await PageObjects.svlCommonPage.login(); - await PageObjects.svlCommonPage.navigateToApp('partialResultsExample'); + await PageObjects.common.navigateToApp('partialResultsExample'); const element = await testSubjects.find('example-help'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts index 2e522680dff43..a98cc05f0bfd3 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts @@ -85,7 +85,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'timepicker:timeDefaults': '{ "from": "now-1y", "to": "now" }', }); - await PageObjects.svlCommonPage.navigateToApp('searchExamples'); + await PageObjects.common.navigateToApp('searchExamples'); }); beforeEach(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts index 992a25bb27bc6..38f055d9be277 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts @@ -10,13 +10,13 @@ import type { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['svlCommonPage']); + const PageObjects = getPageObjects(['common']); const retry = getService('retry'); // FLAKY: https://github.com/elastic/kibana/issues/165763 - describe('Partial results example', () => { + describe.skip('Partial results example', () => { before(async () => { - await PageObjects.svlCommonPage.navigateToApp('searchExamples'); + await PageObjects.common.navigateToApp('searchExamples'); await testSubjects.click('/search'); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts index b26836405d8dd..67a2e41d50314 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/search_example.ts @@ -40,7 +40,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { function testSearchExample() { before(async function () { - await PageObjects.svlCommonPage.navigateToApp(appId, { insertTimestamp: false }); + await PageObjects.common.navigateToApp(appId, { insertTimestamp: false }); await comboBox.setCustom('dataViewSelector', 'logstash-*'); await comboBox.set('searchBucketField', 'geo.src'); await comboBox.set('searchMetricField', 'memory'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts index fb7a1dcd9c4c5..2b8effe5fcd58 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts @@ -28,13 +28,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const retry = getService('retry'); const testSubjects = getService('testSubjects'); const monacoEditor = getService('monacoEditor'); - const PageObjects = getPageObjects([ - 'common', - 'timePicker', - 'header', - 'unifiedFieldList', - 'svlCommonPage', - ]); + const PageObjects = getPageObjects(['common', 'timePicker', 'header', 'unifiedFieldList']); const dataViewTitle = 'existence_index_*'; async function addDSLFilter(value: string) { @@ -59,7 +53,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { // Failing: See https://github.com/elastic/kibana/issues/165938 // Failing: See https://github.com/elastic/kibana/issues/165927 - describe('Fields existence info', () => { + describe.skip('Fields existence info', () => { before(async () => { await esArchiver.load( 'test/api_integration/fixtures/es_archiver/index_patterns/constant_keyword' @@ -67,7 +61,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await kibanaServer.importExport.load( 'test/api_integration/fixtures/kbn_archiver/index_patterns/constant_keyword.json' ); - await PageObjects.svlCommonPage.navigateToApp('unifiedFieldListExamples'); + await PageObjects.common.navigateToApp('unifiedFieldListExamples'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.waitFor('combobox is ready', async () => { return await testSubjects.exists('dataViewSelector'); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts index 2649884b802e6..aacd1352280bb 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/field_stats.ts @@ -12,13 +12,7 @@ const TEST_START_TIME = 'Sep 19, 2015 @ 06:31:44.000'; const TEST_END_TIME = 'Sep 23, 2015 @ 18:31:44.000'; export default ({ getService, getPageObjects }: FtrProviderContext) => { - const PageObjects = getPageObjects([ - 'common', - 'timePicker', - 'header', - 'unifiedFieldList', - 'svlCommonPage', - ]); + const PageObjects = getPageObjects(['common', 'timePicker', 'header', 'unifiedFieldList']); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const comboBox = getService('comboBox'); @@ -28,7 +22,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const dataViewTitle = 'logstash-2015.09.22'; // FLAKY: https://github.com/elastic/kibana/issues/165882 - describe('Field stats', () => { + describe.skip('Field stats', () => { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); @@ -40,7 +34,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await esArchiver.loadIfNeeded( 'x-pack/test_serverless/functional/es_archives/pre_calculated_histogram' ); - await PageObjects.svlCommonPage.navigateToApp('unifiedFieldListExamples'); + await PageObjects.common.navigateToApp('unifiedFieldListExamples'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.waitFor('combobox is ready', async () => { return await testSubjects.exists('dataViewSelector'); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts index b5ef0db943c8c..383e55f1e5579 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts @@ -46,7 +46,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await log.debug('Navigating to the enrich policies tab'); await pageObjects.svlCommonPage.login(); await security.testUser.setRoles(['index_management_user']); - await pageObjects.svlCommonPage.navigateToApp('indexManagement'); + await pageObjects.common.navigateToApp('indexManagement'); // Navigate to the enrich policies tab await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts index 23d4c0f74ab4f..7e9355076887b 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/index_templates.ts @@ -18,7 +18,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await security.testUser.setRoles(['index_management_user']); // Navigate to the index management page await pageObjects.svlCommonPage.login(); - await pageObjects.svlCommonPage.navigateToApp('indexManagement'); + await pageObjects.common.navigateToApp('indexManagement'); // Navigate to the index templates tab await pageObjects.indexManagement.changeTabs('templatesTab'); await pageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts b/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts index 2d5f50add77d9..5d9d53863270b 100644 --- a/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts +++ b/x-pack/test_serverless/functional/test_suites/common/index_management/indices.ts @@ -18,7 +18,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await security.testUser.setRoles(['index_management_user']); // Navigate to the index management page await pageObjects.svlCommonPage.login(); - await pageObjects.svlCommonPage.navigateToApp('indexManagement'); + await pageObjects.common.navigateToApp('indexManagement'); // Navigate to the indices tab await pageObjects.indexManagement.changeTabs('indicesTab'); await pageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts index f000fa42fe9df..e723b81dbe20f 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common', 'svlCommonPage']); + const pageObjects = getPageObjects(['common']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Observability advanced settings', function () { before(async () => { - await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); + await pageObjects.common.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts index 2f04b1cca19c2..63b6053589ea6 100644 --- a/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/search/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common', 'svlCommonPage']); + const pageObjects = getPageObjects(['common']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Search advanced settings', function () { before(async () => { - await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); + await pageObjects.common.navigateToApp('advancedSettings'); }); it('renders the page', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts b/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts index ee0b25e9f0770..d91d296c75624 100644 --- a/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts +++ b/x-pack/test_serverless/functional/test_suites/search/dashboards/build_dashboard.ts @@ -33,7 +33,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ); - await PageObjects.svlCommonPage.navigateToApp('dashboards'); + await PageObjects.common.navigateToApp('dashboards'); await PageObjects.dashboard.preserveCrossAppState(); await PageObjects.dashboard.clickNewDashboard(); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts b/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts index 4c8c4110008a1..c935ab3f15f83 100644 --- a/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts +++ b/x-pack/test_serverless/functional/test_suites/search/dashboards/import_dashboard.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); // Failing: See https://github.com/elastic/kibana/issues/166573 - describe('Importing an existing dashboard', () => { + describe.skip('Importing an existing dashboard', () => { before(async () => { await PageObjects.svlCommonPage.login(); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should be able to import dashboard created in 8.11', async () => { - await PageObjects.svlCommonPage.navigateToApp('management'); + await PageObjects.common.navigateToApp('management'); await testSubjects.click('app-card-objects'); await PageObjects.savedObjects.waitTableIsLoaded(); await PageObjects.savedObjects.importFile( @@ -55,7 +55,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should render all panels on the dashboard', async () => { - await PageObjects.svlCommonPage.navigateToApp('dashboards'); + await PageObjects.common.navigateToApp('dashboards'); await PageObjects.dashboard.loadSavedDashboard('Super Saved Serverless'); // dashboard should load properly diff --git a/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts b/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts index 87651f879a816..8bfada9db1044 100644 --- a/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts +++ b/x-pack/test_serverless/functional/test_suites/search/screenshot_creation/response_ops_docs/stack_connectors/connectors.ts @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('connectors list screenshot', async () => { - await pageObjects.svlCommonPage.navigateToApp('connectors'); + await pageObjects.common.navigateToApp('connectors'); await pageObjects.header.waitUntilLoadingHasFinished(); await svlCommonScreenshots.takeScreenshot( 'connector-listing', diff --git a/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts b/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts index 68b6903b36a8f..27fa42549dcc6 100644 --- a/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts +++ b/x-pack/test_serverless/functional/test_suites/security/advanced_settings.ts @@ -11,14 +11,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common', 'svlCommonPage']); + const pageObjects = getPageObjects(['common']); const browser = getService('browser'); const retry = getService('retry'); // Skip until we enable the Advanced settings app in serverless describe.skip('Security advanced settings', function () { before(async () => { - await pageObjects.svlCommonPage.navigateToApp('advancedSettings'); + await pageObjects.common.navigateToApp('advancedSettings'); }); it('renders the page', async () => {