Skip to content

Commit

Permalink
[8.x] [Discover] Unskip get_render_app_wrapper test (#199456) (#200868)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Discover] Unskip get_render_app_wrapper test
(#199456)](#199456)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-20T09:19:24Z","message":"[Discover]
Unskip get_render_app_wrapper test (#199456)\n\n- Closes
https://github.com/elastic/kibana/issues/199356","sha":"b512ee4803f4383f4592dc1cc015f5c550866130","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"[Discover]
Unskip get_render_app_wrapper
test","number":199456,"url":"https://github.com/elastic/kibana/pull/199456","mergeCommit":{"message":"[Discover]
Unskip get_render_app_wrapper test (#199456)\n\n- Closes
https://github.com/elastic/kibana/issues/199356","sha":"b512ee4803f4383f4592dc1cc015f5c550866130"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199456","number":199456,"mergeCommit":{"message":"[Discover]
Unskip get_render_app_wrapper test (#199456)\n\n- Closes
https://github.com/elastic/kibana/issues/199356","sha":"b512ee4803f4383f4592dc1cc015f5c550866130"}}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <[email protected]>
  • Loading branch information
kibanamachine and jughosta authored Nov 20, 2024
1 parent 0316b31 commit 7126046
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@

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) {
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');
Expand All @@ -41,17 +43,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await common.navigateToActualUrl('discover', `?_a=${state}`, {
ensureCurrentUrl: false,
});
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
await unifiedFieldList.clickFieldListItemAdd('message');
let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2);
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
let messageCell: WebElementWrapper;
await retry.try(async () => {
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');
Expand All @@ -69,15 +75,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');
Expand All @@ -93,18 +99,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');
let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2);
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
let messageCell: WebElementWrapper;
await retry.try(async () => {
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');
Expand All @@ -120,16 +130,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await header.waitUntilLoadingHasFinished();
await browser.refresh();
await header.waitUntilLoadingHasFinished();
await context.waitUntilContextLoadingHasFinished();

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');
Expand All @@ -149,15 +160,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');
Expand Down
6 changes: 6 additions & 0 deletions test/functional/services/data_grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@

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) {
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');
Expand All @@ -44,17 +47,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await common.navigateToActualUrl('discover', `?_a=${state}`, {
ensureCurrentUrl: false,
});
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
await unifiedFieldList.clickFieldListItemAdd('message');
let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2);
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
let messageCell: WebElementWrapper;
await retry.try(async () => {
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');
Expand All @@ -72,15 +79,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');
Expand All @@ -96,18 +103,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');
let messageCell = await dataGrid.getCellElementExcludingControlColumns(0, 2);
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
let messageCell: WebElementWrapper;
await retry.try(async () => {
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');
Expand All @@ -123,16 +134,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await header.waitUntilLoadingHasFinished();
await browser.refresh();
await header.waitUntilLoadingHasFinished();
await context.waitUntilContextLoadingHasFinished();

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');
Expand All @@ -152,15 +164,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');
Expand Down

0 comments on commit 7126046

Please sign in to comment.