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();
});
