mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Variables: migrates interval variable type to React/Redux (#22797)
* Feature: migrates interval variable type to React/Redux
This commit is contained in:
@@ -64,7 +64,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption(ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateOptions, updateTags, setCurrentAction] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption('A');
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateOptions, updateTags, setCurrentAction] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -117,7 +117,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption('A');
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateOptions, setCurrentAction] = actions;
|
||||
const expectedNumberOfActions = 2;
|
||||
|
||||
@@ -142,7 +142,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption(ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateOptions, setCurrentAction] = actions;
|
||||
const expectedNumberOfActions = 2;
|
||||
|
||||
@@ -168,7 +168,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption(ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [clearErrors, updateOptions, setCurrentAction] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -193,7 +193,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(setIdInEditor({ id: variable.uuid! }))
|
||||
.whenAsyncActionIsDispatched(updateQueryVariableOptions(toVariablePayload(variable)), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [clearErrors, errorOccurred] = actions;
|
||||
const expectedNumberOfActions = 2;
|
||||
|
||||
@@ -221,7 +221,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(initQueryVariableEditor(toVariablePayload(variable)), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasources, setDatasource, setEditor] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -254,7 +254,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(initQueryVariableEditor(toVariablePayload(variable)), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasources, setDatasource, setEditor] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -286,7 +286,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(initQueryVariableEditor(toVariablePayload(variable)), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasources, setDatasource, setEditor] = actions;
|
||||
const expectedNumberOfActions = 3;
|
||||
|
||||
@@ -312,7 +312,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(initQueryVariableEditor(toVariablePayload(variable)), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasources] = actions;
|
||||
const expectedNumberOfActions = 1;
|
||||
|
||||
@@ -336,7 +336,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(changeQueryVariableDataSource(toVariablePayload(variable), 'datasource'), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasource, updateEditor] = actions;
|
||||
const expectedNumberOfActions = 2;
|
||||
|
||||
@@ -366,7 +366,7 @@ describe('query actions', () => {
|
||||
.whenActionIsDispatched(initDashboardTemplating([variable]))
|
||||
.whenAsyncActionIsDispatched(changeQueryVariableDataSource(toVariablePayload(variable), 'datasource'), true);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [updateDatasource, updateEditor] = actions;
|
||||
const expectedNumberOfActions = 2;
|
||||
|
||||
@@ -400,7 +400,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption(ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [clearError, changeQuery, changeDefinition, updateOptions, updateTags, setOption] = actions;
|
||||
const expectedNumberOfActions = 6;
|
||||
|
||||
@@ -437,7 +437,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption(ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE);
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [clearError, changeQuery, changeDefinition, updateOptions, setOption] = actions;
|
||||
const expectedNumberOfActions = 5;
|
||||
|
||||
@@ -472,7 +472,7 @@ describe('query actions', () => {
|
||||
|
||||
const option = createOption('A');
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [clearError, changeQuery, changeDefinition, updateOptions, setOption] = actions;
|
||||
const expectedNumberOfActions = 5;
|
||||
|
||||
@@ -504,7 +504,7 @@ describe('query actions', () => {
|
||||
|
||||
const errorText = 'Query cannot contain a reference to itself. Variable: $' + variable.name;
|
||||
|
||||
tester.thenDispatchedActionPredicateShouldEqual(actions => {
|
||||
tester.thenDispatchedActionsPredicateShouldEqual(actions => {
|
||||
const [editorError] = actions;
|
||||
const expectedNumberOfActions = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user