[Functional Tests] Adds a wait time between setting the index pattern and the time field on TSVB (#74736)

* Adds a wait time between setting the index pattern and the time field on tsvb

* Char by char to set indexpattern to give more time to load the time field

* Add more time

* uncomment commented lines
This commit is contained in:
Stratoula Kalafateli 2020-08-11 20:17:08 +03:00 committed by GitHub
parent 0cfc7b464c
commit 78689b7ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -26,7 +26,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const inspector = getService('inspector');
const retry = getService('retry');
const security = getService('security');
const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker', 'visChart']);
const PageObjects = getPageObjects([
'visualize',
'visualBuilder',
'timePicker',
'visChart',
'common',
]);
describe('visual builder', function describeIndexTests() {
this.tags('includeFirefox');
@ -132,6 +138,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await retry.tryForTime(20000, async () => {
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.visualBuilder.setIndexPatternValue('kibana_sample_data_flights');
await PageObjects.common.sleep(3000);
await PageObjects.visualBuilder.selectIndexPatternTimeField('timestamp');
});
const newValue = await PageObjects.visualBuilder.getMetricValue();

View file

@ -420,7 +420,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
public async setIndexPatternValue(value: string) {
const el = await testSubjects.find('metricsIndexPatternInput');
await el.clearValue();
await el.type(value);
await el.type(value, { charByChar: true });
await PageObjects.header.waitUntilLoadingHasFinished();
}