修复bug

This commit is contained in:
2026-07-31 15:34:22 +08:00
parent 151d76f77c
commit be7675954a
25 changed files with 224 additions and 204 deletions
+6 -3
View File
@@ -33,9 +33,12 @@ test('uses membershipId and full replacement arrays in authorization writes', ()
assert.doesNotMatch(source, /data: \{ userId, roleIds \}/)
})
test('clears mock records before loading server role and member lists', () => {
assert.match(storeSource, /rolesLoadedFromApi\.value = true\s+roles\.value = \[\]/)
assert.match(storeSource, /membersLoadedFromApi\.value = true\s+members\.value = \[\]/)
test('starts empty and only loads server role and member records', () => {
assert.match(storeSource, /const members = ref<TenantMember\[]>\(\[\]\)/)
assert.match(storeSource, /const roles = ref<TenantRole\[]>\(\[\]\)/)
assert.match(storeSource, /async function loadRoles\(\) \{\s+roles\.value = \[\]/)
assert.match(storeSource, /async function loadMembers\(\) \{\s+members\.value = \[\]/)
assert.doesNotMatch(storeSource, /initialRoles|initialMembers|示例贸易|演示大道/)
assert.match(storeSource, /await createMerchantRole/)
assert.match(storeSource, /await updateMerchantRole/)
assert.match(storeSource, /await changeMerchantRoleStatus/)