瀏覽代碼

test: 补充内置音色只读回归

main
leiyun 4 週之前
父節點
當前提交
57e8022d7e
共有 1 個文件被更改,包括 19 次插入0 次删除
  1. +19
    -0
      tests/zipvoice-cloning-ui.spec.ts

+ 19
- 0
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: '待重试音色' })


Loading…
取消
儲存