release Timeline Studio v0.4.1
This commit is contained in:
1 parent
47d5f6315d
commit
20e9f265d8
46 files changed
+2666
-202
No files matched your search
@@ -11,17 +11,32 @@ const VOICE_CASES = [
|
||||
{ language: "Français", voice: "Siwis", text: "Bonjour. Ceci est un test complet de synthèse vocale." },
|
||||
{ language: "Italiano", voice: "Riccardo", text: "Ciao. Questo è un test completo di sintesi vocale." },
|
||||
{ language: "Português", voice: "Faber", text: "Olá. Este é um teste completo de síntese de voz." },
|
||||
{ language: "日本語", voice: "Hikari", text: "こんにちは。これは日本語音声合成の完全なテストです。" },
|
||||
{ language: "한국어", voice: "Minseo", text: "안녕하세요. 이것은 한국어 음성 합성 테스트입니다." },
|
||||
{ language: "Tiếng Việt", voice: "Linh", text: "Xin chào. Đây là bài kiểm tra tổng hợp giọng nói tiếng Việt." },
|
||||
{ language: "Русский", voice: "Irina", text: "Здравствуйте. Это полная проверка синтеза русской речи." },
|
||||
{ language: "ไทย", voice: "Malee", text: "สวัสดี นี่คือการทดสอบการสังเคราะห์เสียงภาษาไทย" },
|
||||
];
|
||||
|
||||
const requestedVoices = process.env.E2E_VOICES?.split(",").map((voice) => voice.trim()).filter(Boolean);
|
||||
const ACTIVE_VOICE_CASES = requestedVoices?.length
|
||||
? VOICE_CASES.filter((voiceCase) => requestedVoices.includes(voiceCase.voice))
|
||||
: VOICE_CASES;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.addInitScript(() => localStorage.setItem("ai-voiceover-ui-language", "zh"));
|
||||
});
|
||||
|
||||
test("every listed language and voice generates a valid WAV through the current editor workflow", async ({ page }) => {
|
||||
test.setTimeout(20 * 60 * 1000);
|
||||
const browserErrors = [];
|
||||
page.on("pageerror", (error) => browserErrors.push(error.message));
|
||||
page.on("console", (message) => {
|
||||
if (message.type() === "error") browserErrors.push(message.text());
|
||||
});
|
||||
await page.goto("/");
|
||||
|
||||
for (const voiceCase of VOICE_CASES) {
|
||||
for (const voiceCase of ACTIVE_VOICE_CASES) {
|
||||
// Generation selects the newly created voice clip and switches the right
|
||||
// panel to its clip inspector; explicitly return to the Audio workflow.
|
||||
await page.locator(".rail-tool").filter({ hasText: "音频" }).click();
|
||||
@@ -35,7 +50,15 @@ test("every listed language and voice generates a valid WAV through the current
|
||||
await expect(page.locator(".voice-card.is-selected strong")).toHaveText(voiceCase.voice);
|
||||
const previousClipCount = await page.locator(".audio-clip:not(.is-source)").count();
|
||||
await page.locator(".generate-button").click();
|
||||
await expect(page.locator(".audio-clip:not(.is-source)")).toHaveCount(previousClipCount + 1, { timeout: 4 * 60 * 1000 });
|
||||
try {
|
||||
await Promise.race([
|
||||
expect(page.locator(".audio-clip:not(.is-source)")).toHaveCount(previousClipCount + 1, { timeout: 4 * 60 * 1000 }),
|
||||
page.waitForFunction(() => document.body.innerText.includes("生成失败,请重试"), null, { timeout: 4 * 60 * 1000 })
|
||||
.then(() => { throw new Error("editor reported generation failure"); }),
|
||||
]);
|
||||
} catch (error) {
|
||||
throw new Error(`${voiceCase.voice} failed to generate: ${browserErrors.slice(-5).join(" | ") || "no browser error was reported"}`, { cause: error });
|
||||
}
|
||||
const clipDownload = page.getByRole("button", { name: "下载片段", exact: true });
|
||||
await expect(clipDownload).toBeEnabled();
|
||||
|
||||
|
||||
Reference in new issue
Block a user