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
36b44d69
Commit
36b44d69
authored
May 20, 2014
by
Harald Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved init calls to setup method
parent
dcea2c5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/test/specs/filterSrv-specs.js
+4
-6
No files found.
src/test/specs/filterSrv-specs.js
View file @
36b44d69
...
...
@@ -19,9 +19,12 @@ define([
_filterSrv
=
filterSrv
;
}));
describe
(
'init'
,
function
()
{
beforeEach
(
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
});
describe
(
'init'
,
function
()
{
beforeEach
(
function
()
{
_filterSrv
.
addTemplateParameter
({
name
:
'test'
,
current
:
{
value
:
'oogle'
}
});
});
...
...
@@ -33,7 +36,6 @@ define([
describe
(
'templateOptionSelected'
,
function
()
{
beforeEach
(
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
_filterSrv
.
addTemplateParameter
({
name
:
'test'
});
_filterSrv
.
templateOptionSelected
(
_filterSrv
.
templateParameters
[
0
],
{
value
:
'muuuu'
});
});
...
...
@@ -45,7 +47,6 @@ define([
describe
(
'timeRange'
,
function
()
{
it
(
'should return unparsed when parse is false'
,
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
_filterSrv
.
setTime
({
from
:
'now'
,
to
:
'now-1h'
});
var
time
=
_filterSrv
.
timeRange
(
false
);
expect
(
time
.
from
).
to
.
be
(
'now'
);
...
...
@@ -53,7 +54,6 @@ define([
});
it
(
'should return parsed when parse is true'
,
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
_filterSrv
.
setTime
({
from
:
'now'
,
to
:
'now-1h'
});
var
time
=
_filterSrv
.
timeRange
(
true
);
expect
(
_
.
isDate
(
time
.
from
)).
to
.
be
(
true
);
...
...
@@ -63,7 +63,6 @@ define([
describe
(
'setTime'
,
function
()
{
it
(
'should return disable refresh for absolute times'
,
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
_dashboard
.
current
.
refresh
=
true
;
_filterSrv
.
setTime
({
from
:
'2011-01-01'
,
to
:
'2015-01-01'
});
...
...
@@ -71,7 +70,6 @@ define([
});
it
(
'should restore refresh after relative time range is set'
,
function
()
{
_filterSrv
.
init
(
_dashboard
.
current
);
_dashboard
.
current
.
refresh
=
true
;
_filterSrv
.
setTime
({
from
:
'2011-01-01'
,
to
:
'2015-01-01'
});
expect
(
_dashboard
.
current
.
refresh
).
to
.
be
(
false
);
...
...
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