Urls: Parsing key values will not convert to numbers (#33982)

* Urls: Parsing key values will not convert to numbers

* Tests: fixes broken tests

* Tests: fixes broken test

* Tests: fixes broken test

* Chore: forcing drone to rebuild
This commit is contained in:
Hugo Häggmark
2021-05-12 13:40:30 +02:00
committed by GitHub
parent a735c51202
commit 7a55a6385c
5 changed files with 22 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import Wrapper from './Wrapper';
import { configureStore } from '../../store/configureStore';
import { Provider } from 'react-redux';
@@ -52,7 +52,7 @@ describe('Wrapper', () => {
// At this point url should be initialised to some defaults
expect(locationService.getSearchObject()).toEqual({
orgId: 1,
orgId: '1',
left: JSON.stringify(['now-1h', 'now', 'loki', {}]),
});
expect(datasources.loki.query).not.toBeCalled();
@@ -74,7 +74,7 @@ describe('Wrapper', () => {
// We did not change the url
expect(locationService.getSearchObject()).toEqual({
orgId: 1,
orgId: '1',
...query,
});
@@ -141,7 +141,7 @@ describe('Wrapper', () => {
await screen.findByText('elastic Editor input:');
expect(datasources.elastic.query).not.toBeCalled();
expect(locationService.getSearchObject()).toEqual({
orgId: 1,
orgId: '1',
left: JSON.stringify(['now-1h', 'now', 'elastic', {}]),
});
});
@@ -183,7 +183,7 @@ describe('Wrapper', () => {
// We did not change the url
expect(locationService.getSearchObject()).toEqual({
orgId: 1,
orgId: '1',
...query,
});