Skip to content

Commit

Permalink
[Discover] Unskip get_render_app_wrapper test (elastic#199456)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored and paulinashakirova committed Nov 26, 2024
1 parent b8b794f commit 032f2d9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 33 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 @@ -26,8 +29,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();
});
Expand All @@ -45,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 @@ -73,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 @@ -97,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 @@ -124,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 @@ -153,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 032f2d9

Please sign in to comment.