feat: expand video library into general asset library

This commit is contained in:
xuejianwu
2026-08-05 17:04:06 +08:00
parent ce5ae57abc
commit a054fc3b2c
6 changed files with 157 additions and 109 deletions

View File

@@ -33,10 +33,11 @@ test("生成时长提供 5 到 14 秒全部整数选项", () => {
assert.deepEqual(values, [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
});
test("人物素材支持任选 1 到 3 张,且提供独立视频素材库", () => {
test("人物素材支持任选 1 到 3 张,且提供独立通用素材库", () => {
const html = readFileSync(new URL("../public/index.html", import.meta.url), "utf8");
assert.match(html, /data-module="video-library"/);
assert.match(html, /id="videoAssetForm"/);
assert.match(html, /data-module="generic-library"/);
assert.match(html, /id="genericAssetForm"/);
assert.match(html, /id="genericAssetType"/);
for (const id of ["assetFrontUrl", "assetSideUrl", "assetBackUrl"]) {
const input = html.match(new RegExp(`<input id="${id}"[^>]*>`))?.[0] || "";
assert.ok(input, `缺少 ${id}`);