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
38422ce8
Commit
38422ce8
authored
Aug 03, 2018
by
Tobias Skarhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All tests passing
parent
35694a76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
public/app/features/dashboard/specs/share_modal_ctrl.jest.ts
+17
-4
No files found.
public/app/features/dashboard/specs/share_modal_ctrl.jest.ts
View file @
38422ce8
...
...
@@ -27,6 +27,14 @@ describe('ShareModalCtrl', () => {
fillVariableValuesForUrl
:
()
=>
{},
},
};
(
<
any
>
window
).
Intl
.
DateTimeFormat
=
()
=>
{
return
{
resolvedOptions
:
()
=>
{
return
{
timeZone
:
'UTC'
};
},
};
};
// function setTime(range) {
// ctx.timeSrv.timeRange = () => range;
// }
...
...
@@ -48,10 +56,6 @@ describe('ShareModalCtrl', () => {
// $compileProvider.preAssignBindingsEnabled(true);
// })
// );
// beforeEach(ctx.providePhase());
// beforeEach(ctx.createControllerPhase('ShareModalCtrl'));
beforeEach
(()
=>
{
ctx
.
ctrl
=
new
ShareModalCtrl
(
ctx
.
scope
,
...
...
@@ -115,6 +119,9 @@ describe('ShareModalCtrl', () => {
});
it
(
'should remove fullscreen from image url when is first param in querystring and modeSharePanel is true'
,
()
=>
{
ctx
.
$location
.
search
=
()
=>
{
return
{
fullscreen
:
true
,
edit
:
true
};
};
ctx
.
$location
.
absUrl
=
()
=>
'http://server/#!/test?fullscreen&edit'
;
ctx
.
scope
.
modeSharePanel
=
true
;
ctx
.
scope
.
panel
=
{
id
:
1
};
...
...
@@ -126,6 +133,9 @@ describe('ShareModalCtrl', () => {
});
it
(
'should remove edit from image url when is first param in querystring and modeSharePanel is true'
,
()
=>
{
ctx
.
$location
.
search
=
()
=>
{
return
{
edit
:
true
,
fullscreen
:
true
};
};
ctx
.
$location
.
absUrl
=
()
=>
'http://server/#!/test?edit&fullscreen'
;
ctx
.
scope
.
modeSharePanel
=
true
;
ctx
.
scope
.
panel
=
{
id
:
1
};
...
...
@@ -137,6 +147,9 @@ describe('ShareModalCtrl', () => {
});
it
(
'should include template variables in url'
,
()
=>
{
ctx
.
$location
.
search
=
()
=>
{
return
{};
};
ctx
.
$location
.
absUrl
=
()
=>
'http://server/#!/test'
;
ctx
.
scope
.
options
.
includeTemplateVars
=
true
;
...
...
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