Skip to content

Commit

Permalink
Fix TSVB rollup functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Apr 24, 2020
1 parent 9e190e6 commit 5f9937d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
await PageObjects.header.waitUntilLoadingHasFinished();
}

public async setTimeField(index: number) {
await testSubjects.click('metricsIndexPatternFieldsSelect');
const options = await find.allByCssSelector('.euiFilterSelectItem');
await options[0].click();
await PageObjects.header.waitUntilLoadingHasFinished();
}

public async setIntervalValue(value: string) {
const el = await testSubjects.find('metricsIndexPatternInterval');
await el.clearValue();
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/rollup_job/tsvb.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualBuilder.setIndexPatternValue(rollupTargetIndexName);
await PageObjects.visualBuilder.setIntervalValue('1d');
await PageObjects.visualBuilder.setDropLastBucket(false);
await PageObjects.visualBuilder.setTimeField(0);
await PageObjects.common.sleep(3000);
const newValue = await PageObjects.visualBuilder.getMetricValue();
expect(newValue).to.eql('3');
Expand Down

0 comments on commit 5f9937d

Please sign in to comment.