feat: bootstrap auto virtual tryon admin frontend
This commit is contained in:
24
tests/features/libraries/library-page.test.tsx
Normal file
24
tests/features/libraries/library-page.test.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { expect, test } from "vitest";
|
||||
|
||||
import { LibraryPage } from "@/features/libraries/library-page";
|
||||
import type { LibraryItemVM } from "@/lib/types/view-models";
|
||||
|
||||
const MODEL_ITEMS: LibraryItemVM[] = [
|
||||
{
|
||||
id: "model-ava",
|
||||
libraryType: "models",
|
||||
name: "Ava / Studio",
|
||||
description: "中性棚拍模特占位数据,用于提交页联调。",
|
||||
previewUri: "mock://libraries/models/ava",
|
||||
tags: ["女装", "半身", "mock"],
|
||||
isMock: true,
|
||||
},
|
||||
];
|
||||
|
||||
test("states that the resource library is still backed by mock data", () => {
|
||||
render(<LibraryPage libraryType="models" items={MODEL_ITEMS} />);
|
||||
|
||||
expect(screen.getByText("当前资源库仍使用 mock 数据")).toBeInTheDocument();
|
||||
expect(screen.getByText("Ava / Studio")).toBeInTheDocument();
|
||||
});
|
||||
Reference in New Issue
Block a user