Fix tsvb chart test (#44657)
* enable switch index patterns test * run ciGroup6 20x times * [page_objects/visual_builder_page] retry selecting index pattern * Revert "run ciGroup6 20x times" This reverts commit2151ea9905
. * [services/combo_box] clear input in seperate function * run ciGroup12 30x times * update logging message * Revert "run ciGroup12 30x times" This reverts commit08fac11139
.
This commit is contained in:
parent
fd2bfe9742
commit
e352f516d7
3 changed files with 18 additions and 3 deletions
|
@ -94,8 +94,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/44132
|
||||
describe.skip('switch index patterns', () => {
|
||||
describe('switch index patterns', () => {
|
||||
beforeEach(async () => {
|
||||
log.debug('Load kibana_sample_data_flights data');
|
||||
await esArchiver.loadIfNeeded('kibana_sample_data_flights');
|
||||
|
|
|
@ -49,6 +49,8 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
await PageObjects.common.navigateToUrl('visualize', 'create?type=metrics');
|
||||
log.debug('Set absolute time range from "' + fromTime + '" to "' + toTime + '"');
|
||||
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
|
||||
// 2 sec sleep until https://github.com/elastic/kibana/issues/46353 is fixed
|
||||
await PageObjects.common.sleep(2000);
|
||||
}
|
||||
|
||||
public async checkTabIsLoaded(testSubj: string, name: string) {
|
||||
|
@ -413,7 +415,10 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
}
|
||||
|
||||
public async selectIndexPatternTimeField(timeField: string) {
|
||||
await comboBox.set('metricsIndexPatternFieldsSelect', timeField);
|
||||
await retry.try(async () => {
|
||||
await comboBox.clearInputField('metricsIndexPatternFieldsSelect');
|
||||
await comboBox.set('metricsIndexPatternFieldsSelect', timeField);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -281,6 +281,17 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
.map(option => $(option).text());
|
||||
return selectedOptions.length === 1 && selectedOptions[0] === value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears input field
|
||||
* @param comboBoxSelector data-test-subj selector
|
||||
*/
|
||||
public async clearInputField(comboBoxSelector: string): Promise<void> {
|
||||
log.debug(`comboBox.clearInputField, comboBoxSelector:${comboBoxSelector}`);
|
||||
const comboBoxElement = await testSubjects.find(comboBoxSelector);
|
||||
const input = await comboBoxElement.findByTagName('input');
|
||||
await input.clearValueWithKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
return new ComboBox();
|
||||
|
|
Loading…
Reference in a new issue