diff --git a/src/core_plugins/kibana/public/context/api/__tests__/predecessors.js b/src/core_plugins/kibana/public/context/api/__tests__/predecessors.js index 2e461ff836fe..7caeec57f4cf 100644 --- a/src/core_plugins/kibana/public/context/api/__tests__/predecessors.js +++ b/src/core_plugins/kibana/public/context/api/__tests__/predecessors.js @@ -103,7 +103,7 @@ describe('context app', function () { // should have started at the given time expect(intervals[0].gte).to.eql(MS_PER_DAY * 3000); // should have ended with a half-open interval - expect(_.last(intervals)).to.only.have.key('gte'); + expect(_.last(intervals)).to.only.have.keys('gte', 'format'); expect(intervals.length).to.be.greaterThan(1); expect(hits).to.eql(searchSourceStub._stubHits.slice(0, 3)); diff --git a/src/core_plugins/kibana/public/context/api/__tests__/successors.js b/src/core_plugins/kibana/public/context/api/__tests__/successors.js index 1974d55655e2..e9c3e94829b7 100644 --- a/src/core_plugins/kibana/public/context/api/__tests__/successors.js +++ b/src/core_plugins/kibana/public/context/api/__tests__/successors.js @@ -103,7 +103,7 @@ describe('context app', function () { // should have started at the given time expect(intervals[0].lte).to.eql(MS_PER_DAY * 3000); // should have ended with a half-open interval - expect(_.last(intervals)).to.only.have.key('lte'); + expect(_.last(intervals)).to.only.have.keys('lte', 'format'); expect(intervals.length).to.be.greaterThan(1); expect(hits).to.eql(searchSourceStub._stubHits.slice(-3)); diff --git a/src/core_plugins/kibana/public/context/api/context.js b/src/core_plugins/kibana/public/context/api/context.js index 68ca81e83a20..6b60eea7b767 100644 --- a/src/core_plugins/kibana/public/context/api/context.js +++ b/src/core_plugins/kibana/public/context/api/context.js @@ -216,6 +216,7 @@ function fetchContextProvider(indexPatterns, Private) { filter: { range: { [timeField]: { + format: 'epoch_millis', ...startRange, ...endRange, }