From 0ca6097b7abdb293bff32d5c5b3f6c2a7db51705 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Fri, 8 Nov 2024 12:19:32 +0100 Subject: [PATCH 1/6] [Discover] Unskip get_render_app_wrapper test --- .../extensions/_get_render_app_wrapper.ts | 12 +++++++++--- .../extensions/_get_render_app_wrapper.ts | 11 ++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index b30d16c215044..fd257a58bd4eb 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -41,8 +41,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); + await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); await unifiedFieldList.clickFieldListItemAdd('message'); + await header.waitUntilLoadingHasFinished(); + await discover.waitUntilSearchingHasFinished(); let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); @@ -93,19 +96,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await common.navigateToActualUrl('discover', undefined, { ensureCurrentUrl: false, }); - await dataViews.switchTo('my-example-logs'); + await dataViews.switchToAndValidate('my-example-logs'); + await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); await unifiedFieldList.clickFieldListItemAdd('message'); + await header.waitUntilLoadingHasFinished(); + await discover.waitUntilSearchingHasFinished(); let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await retry.try(async () => { - await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); + await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await retry.try(async () => { - await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is an error log'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts index fd4bee4c1fffb..f586cef9fa3e8 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardAddPanel = getService('dashboardAddPanel'); const kibanaServer = getService('kibanaServer'); - // Failing: See https://github.com/elastic/kibana/issues/199356 - describe.skip('extension getRenderAppWrapper', () => { + describe('extension getRenderAppWrapper', () => { before(async () => { await svlCommonPage.loginAsAdmin(); }); @@ -45,8 +44,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); + await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); await unifiedFieldList.clickFieldListItemAdd('message'); + await header.waitUntilLoadingHasFinished(); + await discover.waitUntilSearchingHasFinished(); let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); @@ -97,9 +99,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await common.navigateToActualUrl('discover', undefined, { ensureCurrentUrl: false, }); - await dataViews.switchTo('my-example-logs'); + await dataViews.switchToAndValidate('my-example-logs'); + await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); await unifiedFieldList.clickFieldListItemAdd('message'); + await header.waitUntilLoadingHasFinished(); + await discover.waitUntilSearchingHasFinished(); let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); From 5c452367a298a648481b2c8f7a5bfb5b9fb5be39 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Fri, 8 Nov 2024 12:24:49 +0100 Subject: [PATCH 2/6] [Discover] Update tests --- .../extensions/_get_render_app_wrapper.ts | 9 ++++++--- .../extensions/_get_render_app_wrapper.ts | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index fd257a58bd4eb..1ab41f5b3961b 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -9,6 +9,7 @@ import kbnRison from '@kbn/rison'; import expect from '@kbn/expect'; +import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; import type { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { @@ -46,8 +47,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.clickFieldListItemAdd('message'); await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); - let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + let messageCell: WebElementWrapper; await retry.try(async () => { + messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); @@ -102,9 +104,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.clickFieldListItemAdd('message'); await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); - let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); - await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); + let messageCell: WebElementWrapper; await retry.try(async () => { + messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts index f586cef9fa3e8..2166976f552b5 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -7,6 +7,7 @@ import kbnRison from '@kbn/rison'; import expect from '@kbn/expect'; +import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { @@ -49,8 +50,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.clickFieldListItemAdd('message'); await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); - let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + let messageCell: WebElementWrapper; await retry.try(async () => { + messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); @@ -105,8 +107,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.clickFieldListItemAdd('message'); await header.waitUntilLoadingHasFinished(); await discover.waitUntilSearchingHasFinished(); - let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + let messageCell: WebElementWrapper; await retry.try(async () => { + messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); From 6a31cd06409f224ee07cce1977c82e9ff7fb06fa Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Fri, 8 Nov 2024 12:27:01 +0100 Subject: [PATCH 3/6] [Discover] Revert --- .../context_awareness/extensions/_get_render_app_wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index 1ab41f5b3961b..89e51418f2fdf 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -113,8 +113,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); - await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await retry.try(async () => { + await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is an error log'); From 070ff83a3890c29ebb2cfc07ac21e1e8a25b5198 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 19 Nov 2024 11:59:02 +0100 Subject: [PATCH 4/6] [Discover] Use new function --- .../extensions/_get_render_app_wrapper.ts | 20 +++++++++---------- test/functional/services/data_grid.ts | 6 ++++++ .../extensions/_get_render_app_wrapper.ts | 20 +++++++++---------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index 89e51418f2fdf..a75275a70a6c5 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -49,13 +49,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await discover.waitUntilSearchingHasFinished(); let messageCell: WebElementWrapper; await retry.try(async () => { - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); @@ -74,14 +74,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); @@ -106,14 +106,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await discover.waitUntilSearchingHasFinished(); let messageCell: WebElementWrapper; await retry.try(async () => { - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -130,15 +130,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); await header.waitUntilLoadingHasFinished(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -158,15 +158,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index f56b58cfa88f1..36e5285a529b8 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -166,6 +166,12 @@ export class DataGridService extends FtrService { ); } + public async getCellElementByColumnName(rowIndex: number, columnName: string) { + return await this.find.byCssSelector( + `[data-test-subj="euiDataGridBody"] [data-test-subj="dataGridRowCell"][data-gridcell-column-id="${columnName}"][data-gridcell-visible-row-index="${rowIndex}"]` + ); + } + private async getCellActionButton( rowIndex: number = 0, columnIndex: number = 0, diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts index 2166976f552b5..b58f7963f0fd8 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -52,13 +52,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await discover.waitUntilSearchingHasFinished(); let messageCell: WebElementWrapper; await retry.try(async () => { - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); @@ -77,14 +77,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); @@ -109,14 +109,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await discover.waitUntilSearchingHasFinished(); let messageCell: WebElementWrapper; await retry.try(async () => { - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -133,15 +133,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); await header.waitUntilLoadingHasFinished(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -161,15 +161,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementExcludingControlColumns(1, 2); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); From ca97c38e0fb537d492a28b7987797a7f6ac309b4 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 19 Nov 2024 12:09:48 +0100 Subject: [PATCH 5/6] [Discover] Update other cases too --- .../context_awareness/extensions/_get_render_app_wrapper.ts | 6 +++--- .../context_awareness/extensions/_get_render_app_wrapper.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index a75275a70a6c5..4b08ad76fee5b 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -55,8 +55,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -74,15 +74,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts index b58f7963f0fd8..a2dce68cf0805 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -58,8 +58,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); let message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); @@ -77,15 +77,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await dashboard.waitForRenderComplete(); - messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); }); message = await testSubjects.find('exampleRootProfileCurrentMessage'); expect(await message.getVisibleText()).to.be('This is a debug log'); - messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await retry.try(async () => { + messageCell = await dataGrid.getCellElementByColumnName(1, 'message'); await (await messageCell.findByTestSubject('exampleDataSourceProfileMessage')).click(); await testSubjects.existOrFail('exampleRootProfileFlyout'); message = await testSubjects.find('exampleRootProfileCurrentMessage'); From 8b1719eae63c4926dbe364465069d0dee44343bb Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 19 Nov 2024 17:22:51 +0100 Subject: [PATCH 6/6] [Discover] Update tests --- .../extensions/_get_render_app_wrapper.ts | 4 +++- .../extensions/_get_render_app_wrapper.ts | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts index 4b08ad76fee5b..b22d54ffe51c5 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -13,12 +13,13 @@ import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; import type { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { common, discover, header, unifiedFieldList, dashboard } = getPageObjects([ + const { common, discover, header, unifiedFieldList, dashboard, context } = getPageObjects([ 'common', 'discover', 'header', 'unifiedFieldList', 'dashboard', + 'context', ]); const testSubjects = getService('testSubjects'); const dataViews = getService('dataViews'); @@ -129,6 +130,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await browser.refresh(); await header.waitUntilLoadingHasFinished(); + await context.waitUntilContextLoadingHasFinished(); await retry.try(async () => { messageCell = await dataGrid.getCellElementByColumnName(0, 'message'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts index a2dce68cf0805..3506f132f9026 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_render_app_wrapper.ts @@ -11,14 +11,16 @@ import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { common, discover, header, unifiedFieldList, dashboard, svlCommonPage } = getPageObjects([ - 'common', - 'discover', - 'header', - 'unifiedFieldList', - 'dashboard', - 'svlCommonPage', - ]); + const { common, discover, header, unifiedFieldList, dashboard, context, svlCommonPage } = + getPageObjects([ + 'common', + 'discover', + 'header', + 'unifiedFieldList', + 'dashboard', + 'context', + 'svlCommonPage', + ]); const testSubjects = getService('testSubjects'); const dataViews = getService('dataViews'); const dataGrid = getService('dataGrid'); @@ -132,6 +134,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await browser.refresh(); await header.waitUntilLoadingHasFinished(); + await context.waitUntilContextLoadingHasFinished(); await retry.try(async () => { messageCell = await dataGrid.getCellElementByColumnName(0, 'message');