Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [Discover] Unskip get_render_app_wrapper test (#199456) #200868

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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