feat(M10-B): 完成可复算经营报表与日汇总
This commit is contained in:
@@ -9,13 +9,14 @@ import {
|
||||
|
||||
assert.deepEqual(
|
||||
ADMIN_NAVIGATION.map(({ path }) => path),
|
||||
['/overview', '/stores', '/orders', '/products', '/notifications', '/payments', '/third-party', '/people',
|
||||
['/reports', '/overview', '/stores', '/orders', '/products', '/notifications', '/payments', '/third-party', '/people',
|
||||
'/cleaning', '/devices', '/apps', '/content', '/franchise', '/system']
|
||||
);
|
||||
assert.equal(pathForMenu('platformApps'), '/apps');
|
||||
assert.equal(pathForMenu('thirdParty'), '/third-party');
|
||||
assert.equal(pathForMenu('products'), '/products');
|
||||
assert.equal(pathForMenu('notifications'), '/notifications');
|
||||
assert.equal(pathForMenu('reports'), '/reports');
|
||||
|
||||
const storeOperator = {
|
||||
roles: ['STORE_ADMIN'],
|
||||
@@ -39,6 +40,11 @@ const notificationOperator = {
|
||||
};
|
||||
assert.equal(resolveAuthorizedPath(notificationOperator, 'notifications'), '/notifications');
|
||||
|
||||
const reportOperator = {
|
||||
roles: ['STORE_ADMIN'], capabilities: ['report.read'], menus: ['reports']
|
||||
};
|
||||
assert.equal(resolveAuthorizedPath(reportOperator, 'reports'), '/reports');
|
||||
|
||||
const forgedSystemMenu = {
|
||||
roles: ['STORE_ADMIN'],
|
||||
capabilities: ['store.operation.read'],
|
||||
|
||||
Reference in New Issue
Block a user