Skip to content

Commit

Permalink
[7.x] [Logs UI] Unskip and stabilitize log column configuratio… (#58455)
Browse files Browse the repository at this point in the history
Backports the following commits to 7.x:
 - [Logs UI] Unskip and stabilitize log column configuration tests (#58392)
  • Loading branch information
weltenwort authored Feb 25, 2020
1 parent 51dc910 commit c65f2b2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const pageObjects = getPageObjects(['common', 'infraLogs']);
const retry = getService('retry');

// FLAKY: https://github.com/elastic/kibana/issues/58059
describe.skip('Logs Source Configuration', function() {
describe('Logs Source Configuration', function() {
this.tags('smoke');

before(async () => {
Expand Down
30 changes: 21 additions & 9 deletions x-pack/test/functional/services/infra_source_configuration_form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,37 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider
return await testSubjects.find('~addLogColumnPopover');
},
async addTimestampLogColumn() {
await (await this.getAddLogColumnButton()).click();
// try to open the popover
const popover = await retry.try(async () => {
await (await this.getAddLogColumnButton()).click();
return this.getAddLogColumnPopover();
});

// try to select the timestamp field
await retry.try(async () => {
await (
await testSubjects.findDescendant(
'~addTimestampLogColumn',
await this.getAddLogColumnPopover()
)
).click();
await (await testSubjects.findDescendant('~addTimestampLogColumn', popover)).click();
});

// wait for timestamp panel to show up
await testSubjects.findDescendant('~systemLogColumnPanel:Timestamp', await this.getForm());
},
async addFieldLogColumn(fieldName: string) {
await (await this.getAddLogColumnButton()).click();
// try to open the popover
const popover = await retry.try(async () => {
await (await this.getAddLogColumnButton()).click();
return this.getAddLogColumnPopover();
});

// try to select the given field
await retry.try(async () => {
const popover = await this.getAddLogColumnPopover();
await (await testSubjects.findDescendant('~fieldSearchInput', popover)).type(fieldName);
await (
await testSubjects.findDescendant(`~addFieldLogColumn:${fieldName}`, popover)
).click();
});

// wait for field panel to show up
await testSubjects.findDescendant(`~fieldLogColumnPanel:${fieldName}`, await this.getForm());
},
async getLogColumnPanels(): Promise<WebElementWrapper[]> {
return await testSubjects.findAllDescendant('~logColumnPanel', await this.getForm());
Expand Down

0 comments on commit c65f2b2

Please sign in to comment.