[TSVB] Stabilize flaky TSVB test (#167848)

## Summary

Closes https://github.com/elastic/kibana/issues/167791

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3282
Flaky runner (50 times)


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
This commit is contained in:
Stratoula Kalafateli 2023-10-03 12:15:34 +03:00 committed by GitHub
parent 084362f6b3
commit 105935ace5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -663,6 +663,7 @@ export class VisualBuilderPageObject extends FtrService {
* @memberof VisualBuilderPage
*/
public async setFieldForAggregation(field: string, aggNth: number = 0): Promise<void> {
await this.visChart.waitForVisualizationRenderingStabilized();
const fieldEl = await this.getFieldForAggregation(aggNth);
await this.comboBox.setElement(fieldEl, field);