修复bug

This commit is contained in:
2026-08-03 20:50:18 +08:00
parent d2370650e7
commit fa922ca96f
13 changed files with 357 additions and 736 deletions
+15
View File
@@ -1,6 +1,7 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { http } from '@/shared/api/http'
import {
approveEnterpriseReview,
assignPlatformInternalUserRoles,
changePlatformManagedUserStatus,
changePlatformInternalUserStatus,
@@ -311,6 +312,20 @@ describe('platform IAM roles', () => {
expect(http.post).toHaveBeenNthCalledWith(2, '/platform/v1/iam/tenants/8/submit-review', {})
})
it('preserves long review identifiers and returns one-time administrator credentials', async () => {
const reviewId = '190000000000000001'
const approval = {
tenantId: '190000000000000099',
administratorCreated: true,
administratorUsername: 'merchant_owner',
temporaryPassword: 'Temporary#2026',
}
vi.mocked(http.post).mockResolvedValue({ code: '200', message: 'success', data: approval })
await expect(approveEnterpriseReview(reviewId, '资料完整')).resolves.toEqual(approval)
expect(http.post).toHaveBeenCalledWith(`/platform/v1/iam/reviews/${reviewId}/approve`, { comment: '资料完整' })
})
it('downloads a qualification with the platform file endpoint and a safe filename', async () => {
const blob = new Blob(['image'], { type: 'image/png' })
vi.mocked(http.get).mockResolvedValue(blob)