mirror of
https://github.com/grafana/grafana.git
synced 2025-01-13 09:32:12 -06:00
Runtime: make sure we don't lose nested default config values (#23560)
* Fixed so we dont miss the deep default options. * removed console log. * remove check of feature toggle and assuming that the new variables are the default ones. * removed e2e statement about used featuretoggles.
This commit is contained in:
parent
ab8305fcb9
commit
ab98a8be3b
@ -24,12 +24,8 @@ const assertDefaultsForNewVariable = () => {
|
||||
e2e()
|
||||
.window()
|
||||
.then((win: any) => {
|
||||
let chainer = 'not.exist';
|
||||
let value: string = undefined;
|
||||
if (win.grafanaBootData.settings.featureToggles.newVariables) {
|
||||
chainer = 'have.text';
|
||||
value = '';
|
||||
}
|
||||
const chainer = 'have.text';
|
||||
const value = '';
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.QueryVariable.queryOptionsDataSourceSelect().within(select => {
|
||||
e2e()
|
||||
@ -85,10 +81,8 @@ const createQueryVariable = ({ name, label, dataSourceName, query }: CreateQuery
|
||||
e2e()
|
||||
.window()
|
||||
.then((win: any) => {
|
||||
let text = `string:${dataSourceName}`;
|
||||
if (win.grafanaBootData.settings.featureToggles.newVariables) {
|
||||
text = `${dataSourceName}`;
|
||||
}
|
||||
const text = `${dataSourceName}`;
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.QueryVariable.queryOptionsDataSourceSelect()
|
||||
.select(text)
|
||||
.blur();
|
||||
@ -352,11 +346,7 @@ const assertUpdateItem = (data: QueryVariableData[]) => {
|
||||
e2e()
|
||||
.window()
|
||||
.then((win: any) => {
|
||||
if (win.grafanaBootData.settings.featureToggles.newVariables) {
|
||||
queryVariables[1].selectedOption = 'A constant';
|
||||
} else {
|
||||
queryVariables[1].selectedOption = 'undefined';
|
||||
}
|
||||
queryVariables[1].selectedOption = 'A constant';
|
||||
assertVariableLabelAndComponent(queryVariables[1]);
|
||||
});
|
||||
|
||||
@ -627,11 +617,5 @@ e2e.scenario({
|
||||
|
||||
// assert that move up works
|
||||
assertMoveUpItem(queryVariables);
|
||||
|
||||
e2e()
|
||||
.window()
|
||||
.then((win: any) => {
|
||||
logSection('This scenario ran with these featureToggles', win.grafanaBootData.settings.featureToggles);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import extend from 'lodash/extend';
|
||||
import merge from 'lodash/merge';
|
||||
import { getTheme } from '@grafana/ui';
|
||||
import { DataSourceInstanceSettings, GrafanaTheme, GrafanaThemeType, PanelPluginMeta } from '@grafana/data';
|
||||
|
||||
@ -128,7 +128,7 @@ export class GrafanaBootConfig {
|
||||
disableSanitizeHtml: false,
|
||||
};
|
||||
|
||||
extend(this, defaults, options);
|
||||
merge(this, defaults, options);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user