From f049fc4816fb808c771a395f9d9628bf93ef401b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 2 Jan 2018 11:02:43 +0100 Subject: [PATCH] mobx: fixed issue with view store, and added missing snapshot --- .../__snapshots__/AlertRuleList.jest.tsx.snap | 72 +++++++++++++++++++ public/app/stores/ViewStore.ts | 4 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap diff --git a/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap b/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap new file mode 100644 index 00000000000..b15a8605b7a --- /dev/null +++ b/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap @@ -0,0 +1,72 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AlertRuleList should render 1 rule 1`] = ` +
  • +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + + + + OK + + + for + 5 minutes + +
    +
    +
    +
    +
  • +`; diff --git a/public/app/stores/ViewStore.ts b/public/app/stores/ViewStore.ts index 8d4df403e72..6095e45fc9d 100644 --- a/public/app/stores/ViewStore.ts +++ b/public/app/stores/ViewStore.ts @@ -2,10 +2,12 @@ import { types } from 'mobx-state-tree'; import _ from 'lodash'; import $ from 'jquery'; +let QueryValueType = types.union(types.string, types.boolean, types.number); + export const ViewStore = types .model({ path: types.string, - query: types.map(types.string), + query: types.map(QueryValueType), }) .views(self => ({ get currentUrl() {