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,32 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const routeRoot = path.resolve(process.cwd(), "apps/web/app/routes/admin/entities");
|
||||
const componentsRoot = path.resolve(process.cwd(), "apps/web/app/components/entities");
|
||||
|
||||
function read(file: string) {
|
||||
return fs.readFileSync(file, "utf8");
|
||||
}
|
||||
|
||||
describe("admin entity micro labels i18n", () => {
|
||||
it("uses semantic translation keys for remaining small labels", () => {
|
||||
const sources = [
|
||||
read(path.join(componentsRoot, "rows/RowSettingsPermissions.tsx")),
|
||||
read(path.join(routeRoot, "no-code/stats/count.tsx")),
|
||||
read(path.join(routeRoot, "rows.tsx")),
|
||||
read(path.join(routeRoot, "$entity/rows.tsx")),
|
||||
read(path.join(routeRoot, "api.tsx")),
|
||||
read(path.join(routeRoot, "$entity/api.tsx")),
|
||||
].join("\n");
|
||||
|
||||
expect(sources).toContain("shared.remove");
|
||||
expect(sources).toContain("shared.summary");
|
||||
expect(sources).toContain("shared.details");
|
||||
expect(sources).toContain("models.row.payload.object");
|
||||
expect(sources).toContain("models.entity.apiDocs");
|
||||
expect(sources).not.toContain('title="API Docs"');
|
||||
expect(sources).not.toContain('title: "Object"');
|
||||
expect(sources).not.toContain('name: "Remove"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user