import fs from "node:fs"; import path from "node:path"; import { describe, expect, it } from "vitest"; const selectorRoot = path.resolve(process.cwd(), "apps/web/app/components/entities/properties"); function readSelector(relativePath: string) { return fs.readFileSync(path.join(selectorRoot, relativePath), "utf8"); } describe("property selector empty states i18n", () => { it("uses semantic translation keys for empty dropdown states", () => { const sources = [ readSelector("PropertySubtypeSelector.tsx"), readSelector("PropertyTypeSelector.tsx"), readSelector("PropertyFormulaSelector.tsx"), ].join("\n"); expect(sources).toContain("models.property.selectors.noSubtypes"); expect(sources).toContain("models.property.selectors.noFields"); expect(sources).toContain("models.property.selectors.noFormulas"); expect(sources).not.toContain("there_are_no_subtypes"); expect(sources).not.toContain("there_are_no_fields"); expect(sources).not.toContain("there_are_no_formulas"); }); });