mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed unit tests for grafanaGraph component
This commit is contained in:
parent
8fc5a2785f
commit
d77448d84e
@ -14,10 +14,13 @@ define([
|
||||
function graphScenario(desc, func) {
|
||||
describe(desc, function() {
|
||||
var ctx = {};
|
||||
|
||||
ctx.setup = function (setupFunc) {
|
||||
|
||||
beforeEach(module(function($provide) {
|
||||
$provide.value("timeSrv", new helpers.TimeSrvStub());
|
||||
}));
|
||||
|
||||
beforeEach(inject(function($rootScope, $compile) {
|
||||
var scope = $rootScope.$new();
|
||||
var element = angular.element("<div style='width:500px' grafana-graph><div>");
|
||||
@ -28,10 +31,13 @@ define([
|
||||
grid: {},
|
||||
y_formats: [],
|
||||
seriesOverrides: [],
|
||||
tooltip: {
|
||||
tooltip: {
|
||||
shared: true
|
||||
}
|
||||
};
|
||||
|
||||
scope.appEvent = sinon.spy();
|
||||
scope.onAppEvent = sinon.spy();
|
||||
scope.hiddenSeries = {};
|
||||
scope.dashboard = { timezone: 'browser' };
|
||||
scope.range = {
|
||||
|
@ -10,12 +10,14 @@ define([
|
||||
formatDate: sinon.stub().returns('date'),
|
||||
};
|
||||
var scope = {
|
||||
appEvent: sinon.spy(),
|
||||
onAppEvent: sinon.spy(),
|
||||
panel: {
|
||||
tooltip: {
|
||||
shared: true
|
||||
},
|
||||
y_formats: ['ms', 'none'],
|
||||
stack: true
|
||||
stack: true
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user