feat(M10-A): 完成统一通知中心与投递闭环
This commit is contained in:
@@ -9,12 +9,13 @@ import {
|
||||
|
||||
assert.deepEqual(
|
||||
ADMIN_NAVIGATION.map(({ path }) => path),
|
||||
['/overview', '/stores', '/orders', '/products', '/payments', '/third-party', '/people',
|
||||
['/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');
|
||||
|
||||
const storeOperator = {
|
||||
roles: ['STORE_ADMIN'],
|
||||
@@ -33,6 +34,11 @@ const goodsOperator = {
|
||||
assert.equal(resolveAuthorizedPath(goodsOperator, 'products'), '/products');
|
||||
assert.equal(firstAuthorizedPath(goodsOperator), '/products');
|
||||
|
||||
const notificationOperator = {
|
||||
roles: ['STORE_ADMIN'], capabilities: ['notification.read'], menus: ['notifications']
|
||||
};
|
||||
assert.equal(resolveAuthorizedPath(notificationOperator, 'notifications'), '/notifications');
|
||||
|
||||
const forgedSystemMenu = {
|
||||
roles: ['STORE_ADMIN'],
|
||||
capabilities: ['store.operation.read'],
|
||||
|
||||
Reference in New Issue
Block a user