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
58e6b118
Unverified
Commit
58e6b118
authored
Apr 16, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some more sort order asserts for permissions store tests
parent
bc8353ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
public/app/stores/PermissionsStore/PermissionsStore.jest.ts
+12
-0
No files found.
public/app/stores/PermissionsStore/PermissionsStore.jest.ts
View file @
58e6b118
...
@@ -74,6 +74,9 @@ describe('PermissionsStore', () => {
...
@@ -74,6 +74,9 @@ describe('PermissionsStore', () => {
});
});
it
(
'should be sorted by sort rank and alphabetically'
,
async
()
=>
{
it
(
'should be sorted by sort rank and alphabetically'
,
async
()
=>
{
expect
(
store
.
items
[
0
].
name
).
toBe
(
'MyTestTeam'
);
expect
(
store
.
items
[
1
].
name
).
toBe
(
'Editor'
);
expect
(
store
.
items
[
2
].
name
).
toBe
(
'Viewer'
);
expect
(
store
.
items
[
3
].
name
).
toBe
(
'MyTestTeam2'
);
expect
(
store
.
items
[
3
].
name
).
toBe
(
'MyTestTeam2'
);
expect
(
store
.
items
[
4
].
name
).
toBe
(
'MyTestUser'
);
expect
(
store
.
items
[
4
].
name
).
toBe
(
'MyTestUser'
);
});
});
...
@@ -96,5 +99,14 @@ describe('PermissionsStore', () => {
...
@@ -96,5 +99,14 @@ describe('PermissionsStore', () => {
it
(
'should add new overriding permission'
,
()
=>
{
it
(
'should add new overriding permission'
,
()
=>
{
expect
(
store
.
items
.
length
).
toBe
(
6
);
expect
(
store
.
items
.
length
).
toBe
(
6
);
});
});
it
(
'should be sorted by sort rank and alphabetically'
,
async
()
=>
{
expect
(
store
.
items
[
0
].
name
).
toBe
(
'MyTestTeam'
);
expect
(
store
.
items
[
1
].
name
).
toBe
(
'Editor'
);
expect
(
store
.
items
[
2
].
name
).
toBe
(
'Viewer'
);
expect
(
store
.
items
[
3
].
name
).
toBe
(
'MyTestTeam'
);
expect
(
store
.
items
[
4
].
name
).
toBe
(
'MyTestTeam2'
);
expect
(
store
.
items
[
5
].
name
).
toBe
(
'MyTestUser'
);
});
});
});
});
});
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