import "@mantine/core/styles.css"; import "../styles.css"; import { MantineProvider } from "@mantine/core"; // eslint-disable-next-line testing-library/no-manual-cleanup -- Vitest globals are disabled, so RTL cannot register its automatic afterEach cleanup. import { cleanup, render, screen } from "@testing-library/react"; import { afterEach, expect, it } from "vitest"; import { cssVariablesResolver, theme } from "../theme"; import { EntryCard } from "./EntryCard"; afterEach(cleanup); it("shows the full wrapped title without horizontal overflow", () => { const title = "Дивидендная выплата с очень длинным описанием, которое должно переноситься и оставаться доступным полностью"; render( , ); const description = screen.getByText(title); expect(description.clientHeight).toBeGreaterThan(0); expect(description.scrollHeight) .toBeLessThanOrEqual(description.clientHeight); expect(document.documentElement.scrollWidth) .toBeLessThanOrEqual(window.innerWidth); });