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
6f43cbf6
Commit
6f43cbf6
authored
Sep 23, 2015
by
ubhatnagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unit tests for all and multi format options.
parent
866f48f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
public/test/specs/templateSrv-specs.js
+10
-0
public/test/specs/templateValuesSrv-specs.js
+11
-0
No files found.
public/test/specs/templateSrv-specs.js
View file @
6f43cbf6
...
@@ -81,6 +81,16 @@ define([
...
@@ -81,6 +81,16 @@ define([
expect
(
result
).
to
.
be
(
'(test|test2)'
);
expect
(
result
).
to
.
be
(
'(test|test2)'
);
});
});
it
(
'multi value and pipe should render pipe string'
,
function
()
{
var
result
=
_templateSrv
.
renderVariableValue
({
multiFormat
:
'pipe'
,
current
:
{
value
:
[
'test'
,
'test2'
],
}
});
expect
(
result
).
to
.
be
(
'test|test2'
);
});
});
});
describe
(
'can check if variable exists'
,
function
()
{
describe
(
'can check if variable exists'
,
function
()
{
...
...
public/test/specs/templateValuesSrv-specs.js
View file @
6f43cbf6
...
@@ -349,6 +349,17 @@ define([
...
@@ -349,6 +349,17 @@ define([
});
});
});
});
describeUpdateVariable
(
'with include all pipe all values'
,
function
(
scenario
)
{
scenario
.
setup
(
function
()
{
scenario
.
variable
=
{
type
:
'query'
,
query
:
'apps.*'
,
name
:
'test'
,
includeAll
:
true
,
allFormat
:
'pipe'
};
scenario
.
queryResult
=
[{
text
:
'backend1'
},
{
text
:
'backend2'
},
{
text
:
'backend3'
}];
});
it
(
'should add pipe delimited string'
,
function
()
{
expect
(
scenario
.
variable
.
options
[
0
].
value
).
to
.
be
(
'backend1|backend2|backend3'
);
});
});
});
});
});
});
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