This commit is contained in:
2026-08-14 16:06:33 +08:00
parent 09e44e6520
commit 610cc1abf9
17 changed files with 135 additions and 41 deletions
@@ -70,6 +70,15 @@ test('starts empty and only loads server role and member records', () => {
test('shares the merchant permission map and preserves resources not rendered by the role editor', () => {
assert.match(contractsSource, /export const FRONTEND_TO_MERCHANT_PERMISSION_CODES/)
assert.match(contractsSource, /'order:first-leg:cancel': \['merchant:order:cancel'\]/)
assert.match(contractsSource, /'company:member:create': \['merchant:member:create'\]/)
assert.match(contractsSource, /'company:member:edit': \['merchant:member:edit'\]/)
assert.match(contractsSource, /'company:member:grant-role': \['merchant:member:grant-role'\]/)
assert.match(contractsSource, /'company:member:status': \['merchant:member:status'\]/)
assert.match(contractsSource, /'company:role:create': \['merchant:role:create'\]/)
assert.match(contractsSource, /'company:role:edit': \['merchant:role:edit'\]/)
assert.match(contractsSource, /'company:role:status': \['merchant:role:status'\]/)
assert.match(contractsSource, /'company:role:delete': \['merchant:role:delete'\]/)
assert.doesNotMatch(contractsSource, /company:(?:member|role):write/)
assert.match(storeSource, /from '@\/modules\/tenant-management\/contracts'/)
assert.match(authSource, /FRONTEND_TO_MERCHANT_PERMISSION_CODES/)
assert.match(authSource, /from '@\/modules\/tenant-management\/public'/)