From 0f522544c9363f94a3e68c4c4e9c7d1a5968169c Mon Sep 17 00:00:00 2001 From: Davis McPhee Date: Wed, 13 Sep 2023 22:27:12 -0300 Subject: [PATCH 1/2] Unskip search examples Serverless tests --- .../common/examples/search_examples/index.ts | 2 +- .../search_examples/partial_results_example.ts | 7 ++++--- .../common/examples/search_examples/search_example.ts | 11 +++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts index d0ea8f613115..c37a0d2f3fac 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts @@ -12,7 +12,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - describe('search examples', function () { + describe.only('search examples', function () { before(async () => { // TODO: emptyKibanaIndex fails in Serverless with // "index_not_found_exception: no such index [.kibana_ingest]", 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 38f055d9be27..b9e966de3a8f 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,12 +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(['common', 'svlCommonPage']); const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/165763 - describe.skip('Partial results example', () => { + describe('Partial results example', () => { before(async () => { + // TODO: Serverless tests require login first + await PageObjects.svlCommonPage.login(); 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 67a2e41d5031..5de11a849eef 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 @@ -10,14 +10,17 @@ import type { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'timePicker']); + const PageObjects = getPageObjects(['common', 'timePicker', 'svlCommonPage']); const retry = getService('retry'); const comboBox = getService('comboBox'); const toasts = getService('toasts'); - // Failing: See https://github.com/elastic/kibana/issues/165730 - // FLAKY: https://github.com/elastic/kibana/issues/165735 - describe.skip('Search example', () => { + describe('Search example', () => { + before(async () => { + // TODO: Serverless tests require login first + await PageObjects.svlCommonPage.login(); + }); + describe('with bfetch', () => { testSearchExample(); }); From fd59fdc7709ed6050be97e994efacfc3d14b046c Mon Sep 17 00:00:00 2001 From: Davis McPhee Date: Fri, 15 Sep 2023 01:02:30 -0300 Subject: [PATCH 2/2] Remove .only --- .../test_suites/common/examples/search_examples/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts index c37a0d2f3fac..d0ea8f613115 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search_examples/index.ts @@ -12,7 +12,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - describe.only('search examples', function () { + describe('search examples', function () { before(async () => { // TODO: emptyKibanaIndex fails in Serverless with // "index_not_found_exception: no such index [.kibana_ingest]",