Skip to content

Commit a4d2708

Browse files
committed
fix(tests): fixed unit test broken in recent dynamic dashboard fix
1 parent a9cf7cd commit a4d2708

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

public/app/features/dashboard/dynamic_dashboard_srv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class DynamicDashboardSrv {
2424
if (dashboard.templating.list.length === 0) { return; }
2525

2626
this.dashboard = dashboard;
27-
this.iteration = new Date().getTime();
27+
this.iteration = (this.iteration || new Date().getTime()) + 1;
2828

2929
var cleanUpOnly = options.cleanUpOnly;
3030

public/test/specs/dynamicDashboardSrv-specs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
define([
2-
'app/features/dashboard/dynamicDashboardSrv',
2+
'app/features/dashboard/dynamic_dashboard_srv',
33
'app/features/dashboard/dashboardSrv'
44
], function() {
55
'use strict';
@@ -12,6 +12,7 @@ define([
1212
ctx.setup = function (setupFunc) {
1313

1414
beforeEach(module('grafana.services'));
15+
beforeEach(module('grafana.core'));
1516
beforeEach(module(function($provide) {
1617
$provide.value('contextSrv', {
1718
user: { timezone: 'utc'}

0 commit comments

Comments
 (0)