From 9be85569d95203578866dae2e34531ceb52ad294 Mon Sep 17 00:00:00 2001 From: leiyun Date: Sat, 22 Aug 2026 18:18:53 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A1=A5=E5=85=85=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=E5=85=8B=E9=9A=86=E5=B8=83=E5=B1=80=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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/zipvoice-cloning-ui.spec.ts b/tests/zipvoice-cloning-ui.spec.ts index 253c063..d71c29a 100644 --- a/tests/zipvoice-cloning-ui.spec.ts +++ b/tests/zipvoice-cloning-ui.spec.ts @@ -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()