mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
test fix
Signed-off-by: blalov <boyko.lalov@tick42.com>
This commit is contained in:
parent
f419fba40e
commit
ebe5380433
|
@ -135,7 +135,7 @@ class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelLi
|
||||||
updateURL() {
|
updateURL() {
|
||||||
const query = encodePanelOptionsToQueryString(this.state.panels);
|
const query = encodePanelOptionsToQueryString(this.state.panels);
|
||||||
window.history.pushState({}, '', query);
|
window.history.pushState({}, '', query);
|
||||||
};
|
}
|
||||||
|
|
||||||
addPanel = () => {
|
addPanel = () => {
|
||||||
const { panels } = this.state;
|
const { panels } = this.state;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { decodePanelOptionsFromQueryString, encodePanelOptionsToQueryString } from './urlParams';
|
import { decodePanelOptionsFromQueryString, encodePanelOptionsToQueryString } from './urlParams';
|
||||||
import { PanelType } from '../Panel';
|
import { PanelType } from '../Panel';
|
||||||
|
|
||||||
const panels = [
|
const panels: any = [
|
||||||
{
|
{
|
||||||
key: '0',
|
key: '0',
|
||||||
options: {
|
options: {
|
||||||
|
@ -33,7 +33,7 @@ describe('decodePanelOptionsFromQueryString', () => {
|
||||||
expect(decodePanelOptionsFromQueryString('')).toEqual([]);
|
expect(decodePanelOptionsFromQueryString('')).toEqual([]);
|
||||||
});
|
});
|
||||||
it('returns and array of parsed params when query string is non-empty', () => {
|
it('returns and array of parsed params when query string is non-empty', () => {
|
||||||
expect(decodePanelOptionsFromQueryString(query)).toEqual(panels);
|
expect(decodePanelOptionsFromQueryString(query)).toMatchObject(panels);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue