Skip to content

Commit

Permalink
[7.4] [Infra and Logs UI] Unskip flaky esarchiver source confi… (elas…
Browse files Browse the repository at this point in the history
…tic#45825)

Backports the following commits to 7.4:
 - [Infra and Logs UI] Unskip flaky esarchiver source config tests (elastic#45397)
  • Loading branch information
weltenwort authored Sep 17, 2019
1 parent af150a1 commit 38c2741
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const infraSourceConfigurationForm = getService('infraSourceConfigurationForm');
const pageObjects = getPageObjects(['common', 'infraLogs']);

// FLAKY: https://github.com/elastic/kibana/issues/42696
describe.skip('Logs Source Configuration', function() {
describe('Logs Source Configuration', function() {
this.tags('smoke');
before(async () => {
await esArchiver.load('empty_kibana');
Expand Down
8 changes: 4 additions & 4 deletions x-pack/test/functional/services/infra_log_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ export function InfraLogStreamProvider({ getService }: FtrProviderContext) {
return {
async getColumnHeaderLabels(): Promise<string[]> {
const columnHeaderElements: WebElementWrapper[] = await testSubjects.findAll(
'logColumnHeader'
'~logColumnHeader'
);
return await Promise.all(columnHeaderElements.map(element => element.getVisibleText()));
},

async getStreamEntries(minimumItems = 1): Promise<WebElementWrapper[]> {
await retry.try(async () => {
const elements = await testSubjects.findAll('streamEntry');
const elements = await testSubjects.findAll('~streamEntry');
if (!elements || elements.length < minimumItems) {
throw new Error();
}
});

return await testSubjects.findAll('streamEntry');
return await testSubjects.findAll('~streamEntry');
},

async getLogColumnsOfStreamEntry(
entryElement: WebElementWrapper
): Promise<WebElementWrapper[]> {
return await testSubjects.findAllDescendant('logColumn', entryElement);
return await testSubjects.findAllDescendant('~logColumn', entryElement);
},
};
}
28 changes: 14 additions & 14 deletions x-pack/test/functional/services/infra_source_configuration_form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider
* Indices and fields
*/
async getNameInput(): Promise<WebElementWrapper> {
return await testSubjects.findDescendant('nameInput', await this.getForm());
return await testSubjects.findDescendant('~nameInput', await this.getForm());
},
async getLogIndicesInput(): Promise<WebElementWrapper> {
return await testSubjects.findDescendant('logIndicesInput', await this.getForm());
return await testSubjects.findDescendant('~logIndicesInput', await this.getForm());
},
async getMetricIndicesInput(): Promise<WebElementWrapper> {
return await testSubjects.findDescendant('metricIndicesInput', await this.getForm());
return await testSubjects.findDescendant('~metricIndicesInput', await this.getForm());
},

/**
* Logs
*/
async getAddLogColumnButton(): Promise<WebElementWrapper> {
return await testSubjects.findDescendant('addLogColumnButton', await this.getForm());
return await testSubjects.findDescendant('~addLogColumnButton', await this.getForm());
},
async getAddLogColumnPopover(): Promise<WebElementWrapper> {
return await testSubjects.find('addLogColumnPopover');
return await testSubjects.find('~addLogColumnPopover');
},
async addTimestampLogColumn() {
await (await this.getAddLogColumnButton()).click();
await retry.try(async () => {
await (await testSubjects.findDescendant(
'addTimestampLogColumn',
'~addTimestampLogColumn',
await this.getAddLogColumnPopover()
)).click();
});
Expand All @@ -48,19 +48,19 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider
await (await this.getAddLogColumnButton()).click();
await retry.try(async () => {
const popover = await this.getAddLogColumnPopover();
await (await testSubjects.findDescendant('fieldSearchInput', popover)).type(fieldName);
await (await testSubjects.findDescendant('~fieldSearchInput', popover)).type(fieldName);
await (await testSubjects.findDescendant(
`addFieldLogColumn:${fieldName}`,
`~addFieldLogColumn:${fieldName}`,
popover
)).click();
});
},
async getLogColumnPanels(): Promise<WebElementWrapper[]> {
return await testSubjects.findAllDescendant('logColumnPanel', await this.getForm());
return await testSubjects.findAllDescendant('~logColumnPanel', await this.getForm());
},
async removeLogColumn(columnIndex: number) {
const logColumnPanel = (await this.getLogColumnPanels())[columnIndex];
await (await testSubjects.findDescendant('removeLogColumnButton', logColumnPanel)).click();
await (await testSubjects.findDescendant('~removeLogColumnButton', logColumnPanel)).click();
await testSubjects.waitForDeleted(logColumnPanel);
},
async removeAllLogColumns() {
Expand All @@ -73,7 +73,7 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider

const logColumnPanel = (await this.getLogColumnPanels())[sourceIndex];
const moveLogColumnHandle = await testSubjects.findDescendant(
'moveLogColumnHandle',
'~moveLogColumnHandle',
logColumnPanel
);
await moveLogColumnHandle.focus();
Expand All @@ -95,17 +95,17 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider
* Form
*/
async getForm(): Promise<WebElementWrapper> {
return await testSubjects.find('sourceConfigurationContent');
return await testSubjects.find('~sourceConfigurationContent');
},
async saveConfiguration() {
await (await testSubjects.findDescendant(
'applySettingsButton',
'~applySettingsButton',
await this.getForm()
)).click();

await retry.try(async () => {
const element = await testSubjects.findDescendant(
'applySettingsButton',
'~applySettingsButton',
await this.getForm()
);
return !(await element.isEnabled());
Expand Down

0 comments on commit 38c2741

Please sign in to comment.