import { render, screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import { Colors } from "~/application/enums/shared/Colors"; import RowSelectedOptionCell from "./RowSelectedOptionCell"; const translations: Record = { "models.contact.status.options.customer": "Kunde", }; vi.mock("react-i18next", () => ({ useTranslation: () => ({ t: (key: string) => translations[key] ?? key, i18n: { exists: (key: string) => key in translations, }, }), })); describe("RowSelectedOptionCell", () => { it("renders seed select option labels through model translation fallbacks", () => { render( ); expect(screen.getByText("Kunde")).toBeTruthy(); expect(screen.queryByText("Customer")).toBeNull(); }); it("keeps custom option labels literal when no model translation exists", () => { render( ); expect(screen.getByText("VIP customer")).toBeTruthy(); }); });