Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
81886799
Unverified
Commit
81886799
authored
Jul 27, 2018
by
Marcus Efraimsson
Committed by
GitHub
Jul 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12745 from dehrax/12224-heatmap-ctrl
Karma to Jest: heatmap_ctrl
parents
710566e1
805dc354
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
public/app/plugins/panel/heatmap/specs/heatmap_ctrl.jest.ts
+19
-18
No files found.
public/app/plugins/panel/heatmap/specs/heatmap_ctrl
_specs
.ts
→
public/app/plugins/panel/heatmap/specs/heatmap_ctrl
.jest
.ts
View file @
81886799
import
{
describe
,
beforeEach
,
it
,
expect
,
angularMocks
}
from
'../../../../../test/lib/common'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
HeatmapCtrl
}
from
'../heatmap_ctrl'
;
import
{
HeatmapCtrl
}
from
'../heatmap_ctrl'
;
import
helpers
from
'../../../../../test/specs/helpers'
;
describe
(
'HeatmapCtrl'
,
function
()
{
describe
(
'HeatmapCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
();
let
ctx
=
<
any
>
{};
let
$injector
=
{
get
:
()
=>
{},
};
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
let
$scope
=
{
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
$on
:
()
=>
{},
beforeEach
(
};
angularMocks
.
module
(
function
(
$compileProvider
)
{
$compileProvider
.
preAssignBindingsEnabled
(
true
);
HeatmapCtrl
.
prototype
.
panel
=
{
})
events
:
{
);
on
:
()
=>
{},
emit
:
()
=>
{},
},
};
beforeEach
(
ctx
.
providePhase
());
beforeEach
(
ctx
.
createPanelController
(
HeatmapCtrl
));
beforeEach
(()
=>
{
beforeEach
(()
=>
{
ctx
.
ctrl
.
annotationsPromise
=
Promise
.
resolve
({});
ctx
.
ctrl
=
new
HeatmapCtrl
(
$scope
,
$injector
,
{});
ctx
.
ctrl
.
updateTimeRange
();
});
});
describe
(
'when time series are outside range'
,
function
()
{
describe
(
'when time series are outside range'
,
function
()
{
...
@@ -36,7 +37,7 @@ describe('HeatmapCtrl', function() {
...
@@ -36,7 +37,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsOutside'
,
function
()
{
it
(
'should set datapointsOutside'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
.
b
e
(
'Data points outside time range'
);
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
B
e
(
'Data points outside time range'
);
});
});
});
});
...
@@ -61,7 +62,7 @@ describe('HeatmapCtrl', function() {
...
@@ -61,7 +62,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsOutside'
,
function
()
{
it
(
'should set datapointsOutside'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
).
to
.
b
e
(
null
);
expect
(
ctx
.
ctrl
.
dataWarning
).
to
B
e
(
null
);
});
});
});
});
...
@@ -72,7 +73,7 @@ describe('HeatmapCtrl', function() {
...
@@ -72,7 +73,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsCount warning'
,
function
()
{
it
(
'should set datapointsCount warning'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
.
b
e
(
'No data points'
);
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
B
e
(
'No data points'
);
});
});
});
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment