Skip to content

Commit

Permalink
wait for vis update before asserting chart (#131304)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored May 2, 2022
1 parent abd615a commit 8ace5e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/functional/apps/visualize/_tsvb_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.selectAggType('derivative', 1);
await visualBuilder.setFieldForAggregation('Max of machine.ram', 1);

await visChart.waitForVisualizationRenderingStabilized();
const value = await visualBuilder.getMetricValue();

expect(value).to.eql('0');
Expand Down Expand Up @@ -197,6 +198,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.selectAggType('derivative', 1);
await visualBuilder.setFieldForAggregation('Max of machine.ram', 1);

await visChart.waitForVisualizationRenderingStabilized();
const value = await visualBuilder.getGaugeCount();

expect(value).to.eql('0');
Expand Down Expand Up @@ -226,6 +228,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.clickSeriesOption();
await visualBuilder.changeDataFormatter('number');

await visChart.waitForVisualizationRenderingStabilized();
const gaugeLabel = await visualBuilder.getGaugeLabel();
const gaugeCount = await visualBuilder.getGaugeCount();

Expand All @@ -239,6 +242,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.clickPanelOptions('gauge');
await visualBuilder.setMetricsDataTimerangeMode('Last value');

await visChart.waitForVisualizationRenderingStabilized();
const gaugeLabel = await visualBuilder.getGaugeLabel();
const gaugeCount = await visualBuilder.getGaugeCount();

Expand Down Expand Up @@ -351,6 +355,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.selectAggType('derivative', 1);
await visualBuilder.setFieldForAggregation('Max of machine.ram', 1);

await visChart.waitForVisualizationRenderingStabilized();
const value = await visualBuilder.getTopNCount();

expect(value).to.eql('0');
Expand Down Expand Up @@ -579,6 +584,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
];
await visualBuilder.clickSeriesOption();
await visualBuilder.changeDataFormatter('number');
await visChart.waitForVisualizationRenderingStabilized();
const legendItems = await visualBuilder.getLegendItemsContent();

expect(legendItems).to.eql(expectedLegendItems);
Expand Down Expand Up @@ -615,6 +621,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.clickTopN();
await visualBuilder.checkTopNTabIsPresent();

await visChart.waitForVisualizationRenderingStabilized();
const topNLabel = await visualBuilder.getTopNLabel();
const topNCount = await visualBuilder.getTopNCount();

Expand All @@ -626,6 +633,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.clickGauge();
await visualBuilder.checkGaugeTabIsPresent();

await visChart.waitForVisualizationRenderingStabilized();
const gaugeLabel = await visualBuilder.getGaugeLabel();
const gaugeCount = await visualBuilder.getGaugeCount();

Expand Down

0 comments on commit 8ace5e4

Please sign in to comment.