From 7bb38d6fad369fdd91f04f5455b4a79d16d85da1 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Tue, 11 Aug 2020 20:17:08 +0300 Subject: [PATCH] [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 --- test/functional/apps/visualize/_tsvb_chart.ts | 9 ++++++++- test/functional/page_objects/visual_builder_page.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts index f1082bf618b90..601e841efefe4 100644 --- a/test/functional/apps/visualize/_tsvb_chart.ts +++ b/test/functional/apps/visualize/_tsvb_chart.ts @@ -27,7 +27,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'); @@ -133,6 +139,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(); diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index 2771982fecdea..f376c39ff67bb 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -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(); }