Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Mar 3, 2020
1 parent c8125d8 commit 63b80fd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ const initialState: IndexPatternPrivateState = {
},
},
};

const dslQuery = '{"bool":{"must":[{"match_all":{}}],"filter":[],"should":[],"must_not":[]}}';

describe('IndexPattern Data Panel', () => {
let defaultProps: Parameters<typeof InnerIndexPatternDataPanel>[0];
let core: ReturnType<typeof coreMock['createSetup']>;
Expand Down Expand Up @@ -400,6 +403,7 @@ describe('IndexPattern Data Panel', () => {
expect(core.http.get).toHaveBeenCalledWith({
path: '/api/lens/existing_fields/a',
query: {
dslQuery,
fromDate: '2019-01-01',
toDate: '2020-01-01',
timeFieldName: 'atime',
Expand All @@ -409,6 +413,7 @@ describe('IndexPattern Data Panel', () => {
expect(core.http.get).toHaveBeenCalledWith({
path: '/api/lens/existing_fields/a',
query: {
dslQuery,
fromDate: '2019-01-01',
toDate: '2020-01-02',
timeFieldName: 'atime',
Expand Down Expand Up @@ -441,6 +446,7 @@ describe('IndexPattern Data Panel', () => {
expect(core.http.get).toHaveBeenCalledWith({
path: '/api/lens/existing_fields/a',
query: {
dslQuery,
fromDate: '2019-01-01',
toDate: '2020-01-01',
timeFieldName: 'atime',
Expand All @@ -450,6 +456,7 @@ describe('IndexPattern Data Panel', () => {
expect(core.http.get).toHaveBeenCalledWith({
path: '/api/lens/existing_fields/b',
query: {
dslQuery,
fromDate: '2019-01-01',
toDate: '2020-01-01',
timeFieldName: 'btime',
Expand Down

0 comments on commit 63b80fd

Please sign in to comment.