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
4dd9b8f3
Commit
4dd9b8f3
authored
Jun 13, 2018
by
Tobias Skarhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Karma to Jest: playlist_edit_ctrl
parent
94b8cbdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
public/app/features/playlist/specs/playlist_edit_ctrl.jest.ts
+12
-13
No files found.
public/app/features/playlist/specs/playlist_edit_ctrl
_specs
.ts
→
public/app/features/playlist/specs/playlist_edit_ctrl
.jest
.ts
View file @
4dd9b8f3
import
'../playlist_edit_ctrl'
;
import
{
describe
,
beforeEach
,
it
,
expect
}
from
'test/lib/common'
;
import
{
PlaylistEditCtrl
}
from
'../playlist_edit_ctrl'
;
describe
(
'PlaylistEditCtrl'
,
()
=>
{
...
...
@@ -20,13 +19,13 @@ describe('PlaylistEditCtrl', () => {
describe
(
'searchresult returns 2 dashboards, '
,
()
=>
{
it
(
'found dashboard should be 2'
,
()
=>
{
expect
(
ctx
.
dashboardresult
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
dashboardresult
.
length
).
to
B
e
(
2
);
});
it
(
'filtred result should be 2'
,
()
=>
{
ctx
.
filterFoundPlaylistItems
();
expect
(
ctx
.
filteredDashboards
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
filteredTags
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
filteredDashboards
.
length
).
to
B
e
(
2
);
expect
(
ctx
.
filteredTags
.
length
).
to
B
e
(
2
);
});
describe
(
'adds one dashboard to playlist, '
,
()
=>
{
...
...
@@ -37,16 +36,16 @@ describe('PlaylistEditCtrl', () => {
});
it
(
'playlistitems should be increased by one'
,
()
=>
{
expect
(
ctx
.
playlistItems
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
playlistItems
.
length
).
to
B
e
(
2
);
});
it
(
'filtred playlistitems should be reduced by one'
,
()
=>
{
expect
(
ctx
.
filteredDashboards
.
length
).
to
.
b
e
(
1
);
expect
(
ctx
.
filteredTags
.
length
).
to
.
b
e
(
1
);
expect
(
ctx
.
filteredDashboards
.
length
).
to
B
e
(
1
);
expect
(
ctx
.
filteredTags
.
length
).
to
B
e
(
1
);
});
it
(
'found dashboard should be 2'
,
()
=>
{
expect
(
ctx
.
dashboardresult
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
dashboardresult
.
length
).
to
B
e
(
2
);
});
describe
(
'removes one dashboard from playlist, '
,
()
=>
{
...
...
@@ -57,14 +56,14 @@ describe('PlaylistEditCtrl', () => {
});
it
(
'playlistitems should be increased by one'
,
()
=>
{
expect
(
ctx
.
playlistItems
.
length
).
to
.
b
e
(
0
);
expect
(
ctx
.
playlistItems
.
length
).
to
B
e
(
0
);
});
it
(
'found dashboard should be 2'
,
()
=>
{
expect
(
ctx
.
dashboardresult
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
filteredDashboards
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
filteredTags
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
tagresult
.
length
).
to
.
b
e
(
2
);
expect
(
ctx
.
dashboardresult
.
length
).
to
B
e
(
2
);
expect
(
ctx
.
filteredDashboards
.
length
).
to
B
e
(
2
);
expect
(
ctx
.
filteredTags
.
length
).
to
B
e
(
2
);
expect
(
ctx
.
tagresult
.
length
).
to
B
e
(
2
);
});
});
});
...
...
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