Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const sourcePath = path.resolve(process.cwd(), "apps/web/app/modules/rows/fetchers/RowSelectorFetcher.tsx");
|
||||
|
||||
describe("RowSelectorFetcher i18n", () => {
|
||||
it("uses entity translation helpers for dynamic labels", () => {
|
||||
const source = fs.readFileSync(sourcePath, "utf8");
|
||||
|
||||
expect(source).toContain("translateEntityTitle");
|
||||
expect(source).toContain("const { t, i18n } = useTranslation()");
|
||||
expect(source).toContain("entityLabel");
|
||||
expect(source).toContain("models.row.actions.addForEntity");
|
||||
expect(source).toContain("models.row.actions.createForEntity");
|
||||
expect(source).not.toContain("t(entity.title)");
|
||||
expect(source).not.toContain("t(data?.rowsData?.entity.title");
|
||||
expect(source).not.toContain("` - ${t(\"shared.add\")} ${entityLabel} - `");
|
||||
expect(source).not.toContain('t("shared.create") + " "');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user