Skip to content

Commit

Permalink
Updated tests to match updated behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Mar 30, 2020
1 parent 4924c3b commit 8006513
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function validateInterval(
timeBase?: string
) {
if (definedOption) {
return { isValid: true };
return { isValid: true, interval: agg.buckets?.getInterval() };
}

if (!value) {
Expand Down
5 changes: 5 additions & 0 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ export default function({ getService, getPageObjects }) {

it('should update scaled label text after custom interval is set and time range is changed', async () => {
await PageObjects.visEditor.setInterval('10s', { type: 'custom' });
await testSubjects.clickWhenNotDisabled('visualizeEditorRenderButton');
const isHelperScaledLabelExists = await find.existsByCssSelector(
'[data-test-subj="currentlyScaledText"]'
);
expect(isHelperScaledLabelExists).to.be(true);
let helperScaledLabelText = await testSubjects.getVisibleText('currentlyScaledText');
expect(helperScaledLabelText).to.include.string('to 10 minutes');
const fromTime = 'Sep 20, 2015 @ 21:30:00.000';
Expand Down

0 comments on commit 8006513

Please sign in to comment.