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,31 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readRepoFile } from "~/utils/testing/repoPaths";
|
||||
|
||||
const routePath = "apps/web/app/routes/admin/analytics/page-views.tsx";
|
||||
|
||||
function readRoute() {
|
||||
return readRepoFile(routePath);
|
||||
}
|
||||
|
||||
describe("admin analytics page views route DB boundary", () => {
|
||||
it("uses package analytics helpers while preserving route-side filter composition", () => {
|
||||
const source = readRoute();
|
||||
|
||||
expect(source).toContain("@toolctrl/db/analytics.server");
|
||||
expect(source).toContain("getAnalyticsPageViewFilterOptions");
|
||||
expect(source).toContain("getAnalyticsPageViewList");
|
||||
expect(source).toContain("RowFiltersHelper.getFiltersCondition(filters)");
|
||||
expect(source).toContain("portalFiltersEnabled");
|
||||
expect(source).toContain('f.name === "cookie"');
|
||||
expect(source).toContain('f.name === "userId"');
|
||||
});
|
||||
|
||||
it("does not import direct analytics DB wrappers", () => {
|
||||
const source = readRoute();
|
||||
|
||||
expect(source).not.toContain('from "~/utils/db.server"');
|
||||
expect(source).not.toContain('from "~/utils/db/users.db.server"');
|
||||
expect(source).not.toMatch(/\bdb\.analytics(?:UniqueVisitor|PageView)\b/);
|
||||
expect(source).not.toMatch(/\bdb\.portal\b/);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user