mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
fix(): another test fix
This commit is contained in:
parent
a12de09533
commit
105a678d64
@ -53,7 +53,9 @@ describe('grafanaGraph', function() {
|
|||||||
},
|
},
|
||||||
renderingCompleted: sinon.spy(),
|
renderingCompleted: sinon.spy(),
|
||||||
hiddenSeries: {},
|
hiddenSeries: {},
|
||||||
dashboard: {timezone: 'browser'},
|
dashboard: {
|
||||||
|
getTimezone: sinon.stub().returns('browser')
|
||||||
|
},
|
||||||
range: {
|
range: {
|
||||||
from: moment([2015, 1, 1, 10]),
|
from: moment([2015, 1, 1, 10]),
|
||||||
to: moment([2015, 1, 1, 22]),
|
to: moment([2015, 1, 1, 22]),
|
||||||
|
@ -7,6 +7,10 @@ define([
|
|||||||
var _dashboardSrv;
|
var _dashboardSrv;
|
||||||
|
|
||||||
beforeEach(module('grafana.services'));
|
beforeEach(module('grafana.services'));
|
||||||
|
beforeEach(module(function($provide) {
|
||||||
|
$provide.value('contextSrv', {
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
beforeEach(inject(function(dashboardSrv) {
|
beforeEach(inject(function(dashboardSrv) {
|
||||||
_dashboardSrv = dashboardSrv;
|
_dashboardSrv = dashboardSrv;
|
||||||
|
@ -12,6 +12,11 @@ define([
|
|||||||
ctx.setup = function (setupFunc) {
|
ctx.setup = function (setupFunc) {
|
||||||
|
|
||||||
beforeEach(module('grafana.services'));
|
beforeEach(module('grafana.services'));
|
||||||
|
beforeEach(module(function($provide) {
|
||||||
|
$provide.value('contextSrv', {
|
||||||
|
user: { timezone: 'utc'}
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
beforeEach(inject(function(dynamicDashboardSrv, dashboardSrv) {
|
beforeEach(inject(function(dynamicDashboardSrv, dashboardSrv) {
|
||||||
ctx.dynamicDashboardSrv = dynamicDashboardSrv;
|
ctx.dynamicDashboardSrv = dynamicDashboardSrv;
|
||||||
@ -45,10 +50,10 @@ define([
|
|||||||
value: ['se1', 'se2', 'se3']
|
value: ['se1', 'se2', 'se3']
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
{text: 'se1', value: 'se1', selected: true},
|
{text: 'se1', value: 'se1', selected: true},
|
||||||
{text: 'se2', value: 'se2', selected: true},
|
{text: 'se2', value: 'se2', selected: true},
|
||||||
{text: 'se3', value: 'se3', selected: true},
|
{text: 'se3', value: 'se3', selected: true},
|
||||||
{text: 'se4', value: 'se4', selected: false}
|
{text: 'se4', value: 'se4', selected: false}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -93,7 +98,7 @@ define([
|
|||||||
describe('After a second iteration and selected values reduced', function() {
|
describe('After a second iteration and selected values reduced', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
ctx.dash.templating.list[0].options[1].selected = false;
|
ctx.dash.templating.list[0].options[1].selected = false;
|
||||||
|
|
||||||
ctx.dynamicDashboardSrv.update(ctx.dash);
|
ctx.dynamicDashboardSrv.update(ctx.dash);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user