mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
wait for rendering
This commit is contained in:
parent
d13af852ed
commit
006a651318
2 changed files with 9 additions and 10 deletions
|
@ -39,7 +39,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
// FAILING: https://github.com/elastic/kibana/issues/34299
|
||||
// FAILING: https://github.com/elastic/kibana/issues/34292
|
||||
describe.skip('visual builder', function describeIndexTests() {
|
||||
describe('visual builder', function describeIndexTests() {
|
||||
describe('Time Series', () => {
|
||||
before(async () => {
|
||||
await PageObjects.visualBuilder.resetPage();
|
||||
|
@ -47,7 +47,6 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
it('should show the correct count in the legend', async () => {
|
||||
await retry.try(async () => {
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const actualCount = await PageObjects.visualBuilder.getRhythmChartLegendValue();
|
||||
expect(actualCount).to.be('156');
|
||||
});
|
||||
|
@ -56,14 +55,12 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('should show the correct count in the legend with 2h offset', async () => {
|
||||
await PageObjects.visualBuilder.clickSeriesOption();
|
||||
await PageObjects.visualBuilder.enterOffsetSeries('2h');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const actualCount = await PageObjects.visualBuilder.getRhythmChartLegendValue();
|
||||
expect(actualCount).to.be('293');
|
||||
});
|
||||
|
||||
it('should show the correct count in the legend with -2h offset', async () => {
|
||||
await PageObjects.visualBuilder.enterOffsetSeries('-2h');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const actualCount = await PageObjects.visualBuilder.getRhythmChartLegendValue();
|
||||
expect(actualCount).to.be('53');
|
||||
});
|
||||
|
|
|
@ -39,6 +39,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
await PageObjects.visualize.clickVisualBuilder();
|
||||
log.debug('Set absolute time range from "' + fromTime + '" to "' + toTime + '"');
|
||||
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async clickMetric() {
|
||||
|
@ -159,23 +160,24 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
public async clickSeriesOption(nth = 0) {
|
||||
const el = await testSubjects.findAll('seriesOptions');
|
||||
await el[nth].click();
|
||||
await PageObjects.common.sleep(500);
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async clearOffsetSeries() {
|
||||
const el = await testSubjects.find('offsetTimeSeries');
|
||||
await el.clearValue();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async enterOffsetSeries(value: string) {
|
||||
const el = await testSubjects.find('offsetTimeSeries');
|
||||
await el.clearValue();
|
||||
await el.type(value);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async getRhythmChartLegendValue() {
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
const metricValue = await find.byCssSelector('.tvbLegend__itemValue');
|
||||
await metricValue.moveMouseTo();
|
||||
return await metricValue.getVisibleText();
|
||||
|
@ -183,7 +185,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
|
||||
public async clickGauge() {
|
||||
await testSubjects.click('gaugeTsvbTypeBtn');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async getGaugeLabel() {
|
||||
|
@ -198,7 +200,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
|
||||
public async clickTopN() {
|
||||
await testSubjects.click('top_nTsvbTypeBtn');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async getTopNLabel() {
|
||||
|
@ -213,7 +215,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
|
|||
|
||||
public async clickTable() {
|
||||
await testSubjects.click('tableTsvbTypeBtn');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualizationRenderingStabilized();
|
||||
}
|
||||
|
||||
public async createNewAgg(nth = 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue