From 57e8022d7e04814ffef89bf95f1cd4c76eee3248 Mon Sep 17 00:00:00 2001 From: leiyun Date: Sat, 22 Aug 2026 11:06:38 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A1=A5=E5=85=85=E5=86=85=E7=BD=AE?= =?UTF-8?q?=E9=9F=B3=E8=89=B2=E5=8F=AA=E8=AF=BB=E5=9B=9E=E5=BD=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/zipvoice-cloning-ui.spec.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/zipvoice-cloning-ui.spec.ts b/tests/zipvoice-cloning-ui.spec.ts index 5be08b1..253c063 100644 --- a/tests/zipvoice-cloning-ui.spec.ts +++ b/tests/zipvoice-cloning-ui.spec.ts @@ -38,6 +38,18 @@ test('ZipVoice 受控 UI:克隆契约、异步状态、重试与数字形象 const requests: { create?: JsonRecord; retry?: JsonRecord; speech?: JsonRecord; avatarUpdate?: JsonRecord } = {} let capabilities = [ + { + ...baseCapability, + id: 'builtin-voice-male-gentle', + name: '温和男声', + type: '平台内置音色', + builtIn: true, + voiceRuntimeMode: 'TTS_SPEAKER', + validationStatus: 'AVAILABLE', + status: 'ENABLED', + mediaUrl: '', + referenceText: null, + }, { ...baseCapability, 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('参考音频有效人声时长不足') 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') const failedCard = page.locator('.capability-card').filter({ hasText: '待重试音色' })