|
|
|
@@ -244,6 +244,15 @@ test('ZipVoice 受控 UI:克隆契约、异步状态、重试与数字形象 |
|
|
|
|
|
|
|
await page.getByRole('button', { name: /新建克隆音色/ }).click() |
|
|
|
const dialog = page.locator('.admin-form-dialog:visible').last() |
|
|
|
const genderField = dialog.locator('.voice-gender-field') |
|
|
|
const engineField = dialog.locator('.voice-engine-field') |
|
|
|
await expect(engineField).toContainText('Sherpa-ONNX ZipVoice') |
|
|
|
await expect(engineField).toContainText('CPU') |
|
|
|
const [genderBox, engineBox] = await Promise.all([genderField.boundingBox(), engineField.boundingBox()]) |
|
|
|
expect(genderBox).not.toBeNull() |
|
|
|
expect(engineBox).not.toBeNull() |
|
|
|
expect(engineBox!.x).toBeGreaterThan(genderBox!.x) |
|
|
|
expect(genderBox!.x + genderBox!.width).toBeLessThanOrEqual(engineBox!.x) |
|
|
|
await dialog.locator('.capability-form > label').filter({ hasText: '名称' }).locator('input').fill('受控 ZipVoice 男教员') |
|
|
|
await dialog.locator('.capability-form > label').filter({ hasText: '性别' }).locator('.el-select').click() |
|
|
|
await page.locator('.el-select-dropdown:visible .el-select-dropdown__item').filter({ hasText: '男声' }).click() |
|
|
|
@@ -256,6 +265,7 @@ test('ZipVoice 受控 UI:克隆契约、异步状态、重试与数字形象 |
|
|
|
mimeType: 'audio/wav', |
|
|
|
buffer: Buffer.from('RIFF-controlled-wave'), |
|
|
|
}) |
|
|
|
await expect(dialog.locator('.voice-consent .el-checkbox__label')).toHaveCSS('white-space', 'nowrap') |
|
|
|
await dialog.locator('.voice-consent').click() |
|
|
|
await captureScreenshot(page, testInfo, '03-zipvoice-source-and-consent') |
|
|
|
await dialog.getByRole('button', { name: '提交克隆任务' }).click() |
|
|
|
|