| @@ -38,6 +38,18 @@ test('ZipVoice 受控 UI:克隆契约、异步状态、重试与数字形象 | |||||
| const requests: { create?: JsonRecord; retry?: JsonRecord; speech?: JsonRecord; avatarUpdate?: JsonRecord } = {} | const requests: { create?: JsonRecord; retry?: JsonRecord; speech?: JsonRecord; avatarUpdate?: JsonRecord } = {} | ||||
| let capabilities = [ | let capabilities = [ | ||||
| { | |||||
| ...baseCapability, | |||||
| id: 'builtin-voice-male-gentle', | |||||
| name: '温和男声', | |||||
| type: '平台内置音色', | |||||
| builtIn: true, | |||||
| voiceRuntimeMode: 'TTS_SPEAKER', | |||||
| validationStatus: 'AVAILABLE', | |||||
| status: 'ENABLED', | |||||
| mediaUrl: '', | |||||
| referenceText: null, | |||||
| }, | |||||
| { | { | ||||
| ...baseCapability, | ...baseCapability, | ||||
| id: 'clone-sample-only', | id: 'clone-sample-only', | ||||
| @@ -210,6 +222,13 @@ test('ZipVoice 受控 UI:克隆契约、异步状态、重试与数字形象 | |||||
| await expect(page.locator('.capability-card').filter({ hasText: '排队中的男教员' })).toContainText('42%') | await expect(page.locator('.capability-card').filter({ hasText: '排队中的男教员' })).toContainText('42%') | ||||
| await expect(page.locator('.capability-card').filter({ hasText: '待重试音色' })).toContainText('参考音频有效人声时长不足') | await expect(page.locator('.capability-card').filter({ hasText: '待重试音色' })).toContainText('参考音频有效人声时长不足') | ||||
| await expect(page.locator('.capability-card').filter({ hasText: '可用克隆男声' })).toContainText('克隆音色可用') | await expect(page.locator('.capability-card').filter({ hasText: '可用克隆男声' })).toContainText('克隆音色可用') | ||||
| const builtinCard = page.locator('.capability-card').filter({ hasText: '温和男声' }) | |||||
| await expect(builtinCard).toContainText('平台内置') | |||||
| await expect(builtinCard).toContainText('VITS') | |||||
| await expect(builtinCard.getByRole('button', { name: '试听', exact: true })).toBeVisible() | |||||
| await expect(builtinCard.getByRole('button', { name: '编辑', exact: true })).toHaveCount(0) | |||||
| await expect(builtinCard.getByRole('button', { name: '停用', exact: true })).toHaveCount(0) | |||||
| await expect(builtinCard.getByRole('button', { name: '删除', exact: true })).toHaveCount(0) | |||||
| await captureScreenshot(page, testInfo, '01-zipvoice-async-states') | await captureScreenshot(page, testInfo, '01-zipvoice-async-states') | ||||
| const failedCard = page.locator('.capability-card').filter({ hasText: '待重试音色' }) | const failedCard = page.locator('.capability-card').filter({ hasText: '待重试音色' }) | ||||