feat: expand video library into general asset library
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user