import { render, screen } from "@testing-library/react";
import { describe, it, expect, vi } from "vitest";
import type { GalleryImage } from "./ImageGallery";
vi.mock("@/app/lib/ThemeContext", () => ({ useTheme: () => ({ isDark: false }) }));
import EventGallerySection from "./EventGallerySection";
const img = (id: string): GalleryImage => ({
id,
title: `Doc ${id}`,
gradient: "linear-gradient(145deg,#000,#fff)",
src: `https://example.com/${id}.png`,
});
describe("EventGallerySection — availability header", () => {
it("reads 'N Available' without the word 'Downloads'", () => {
render();
expect(screen.getByText("2 Available")).toBeInTheDocument();
expect(screen.queryByText(/Downloads/)).not.toBeInTheDocument();
});
it("uses the same 'N Available' wording for a single image", () => {
render();
expect(screen.getByText("1 Available")).toBeInTheDocument();
expect(screen.queryByText(/Download/)).not.toBeInTheDocument();
});
});