mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
wip: writing tests for permission sorting
This commit is contained in:
@@ -17,6 +17,22 @@ describe('PermissionsStore', () => {
|
|||||||
teamId: 1,
|
teamId: 1,
|
||||||
teamName: 'MyTestTeam',
|
teamName: 'MyTestTeam',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
dashboardId: 10,
|
||||||
|
permission: 1,
|
||||||
|
permissionName: 'View',
|
||||||
|
userId: 1,
|
||||||
|
userName: 'MyTestUser',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
dashboardId: 10,
|
||||||
|
permission: 1,
|
||||||
|
permissionName: 'Edit',
|
||||||
|
teamId: 2,
|
||||||
|
teamName: 'MyTestTeam2',
|
||||||
|
},
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -32,7 +48,10 @@ describe('PermissionsStore', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(store);
|
||||||
|
|
||||||
await store.load(1, false, false);
|
await store.load(1, false, false);
|
||||||
|
console.log(store);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should save update on permission change', async () => {
|
it('should save update on permission change', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user