This commit is contained in:
wujinliang
2026-08-27 21:49:18 +08:00
parent 458c8d5961
commit 22f0528593
14 changed files with 73 additions and 4 deletions
@@ -107,3 +107,12 @@ test('keeps client baseline permissions selected when server resources do not de
assert.match(permissionsViewSource, /:disabled="isRequiredPermission\(item\.code\)"/)
assert.doesNotMatch(permissionsViewSource, /selectedCodes\.value\.unshift\('account:profile:view'\)/)
})
test('exposes all message-center permissions in the enterprise role editor', () => {
for (const permission of ['merchant:notification:view', 'merchant:notification:read', 'merchant:notification:read-all']) {
assert.match(contractsSource, new RegExp(`code: '${permission}'`))
assert.match(contractsSource, new RegExp(`'${permission}': \\['${permission}'\\]`))
}
assert.match(contractsSource, /key: 'notifications'/)
assert.match(storeSource, /const mappedMerchantPermissionCodes = new Set\(Object\.values\(FRONTEND_TO_MERCHANT_PERMISSION_CODES\)\.flat\(\)\)/)
})