// oxlint's type-aware pass resolves the `@/test/render` helpers as `error`-typed // only in this file — a tsgo cross-module quirk triggered by importing this // module (tsc and the test itself are green). Scope off the two rules it trips. /* eslint-disable typescript/no-unsafe-call, typescript/no-unsafe-member-access */ import { describe, it, expect, vi } from "vitest"; import { renderWithProviders, screen, fireEvent } from "@/test/render"; import { LinesFooter } from "./line-pagination-footer"; describe("LinesFooter", () => { it("shows the row count and page position and disables First/Prev on the first page", async () => { await renderWithProviders( {}} onPageSizeChange={() => {}} />, { waitForButton: false }, ); expect(await screen.findByText("42 row(s)")).toBeInTheDocument(); expect(screen.getByText("Page 1 / 5")).toBeInTheDocument(); expect(screen.getByRole("button", { name: "First page" })).toBeDisabled(); expect(screen.getByRole("button", { name: "Previous" })).toBeDisabled(); expect(screen.getByRole("button", { name: "Next page" })).toBeEnabled(); }); it("advances the page when Next is clicked", async () => { const onPageChange = vi.fn(); await renderWithProviders( {}} />, { waitForButton: false }, ); fireEvent.click(await screen.findByRole("button", { name: "Next page" })); expect(onPageChange).toHaveBeenCalledWith(1); }); });