Skip to content

Commit c707883

Browse files
committed
[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
1 parent 173cae0 commit c707883

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

test/functional/apps/visualize/_tsvb_chart.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
2626
const inspector = getService('inspector');
2727
const retry = getService('retry');
2828
const security = getService('security');
29-
const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker', 'visChart']);
29+
const PageObjects = getPageObjects([
30+
'visualize',
31+
'visualBuilder',
32+
'timePicker',
33+
'visChart',
34+
'common',
35+
]);
3036

3137
describe('visual builder', function describeIndexTests() {
3238
this.tags('includeFirefox');
@@ -132,6 +138,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
132138
await retry.tryForTime(20000, async () => {
133139
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
134140
await PageObjects.visualBuilder.setIndexPatternValue('kibana_sample_data_flights');
141+
await PageObjects.common.sleep(3000);
135142
await PageObjects.visualBuilder.selectIndexPatternTimeField('timestamp');
136143
});
137144
const newValue = await PageObjects.visualBuilder.getMetricValue();

test/functional/page_objects/visual_builder_page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
420420
public async setIndexPatternValue(value: string) {
421421
const el = await testSubjects.find('metricsIndexPatternInput');
422422
await el.clearValue();
423-
await el.type(value);
423+
await el.type(value, { charByChar: true });
424424
await PageObjects.header.waitUntilLoadingHasFinished();
425425
}
426426

0 commit comments

Comments
 (0)