Prefix tools board routes

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-06-10 13:22:58 +00:00
1 parent 4726aa99a8
commit 0739570fa5
2 files changed
+11

No files matched your search

+10
View File
@@ -72,6 +72,16 @@ describe("company routes", () => {
expect(toCompanyRelativePath("/PAP/artifacts")).toBe("/artifacts");
});
it("treats /tools routes as board routes that need a company prefix", () => {
expect(isBoardPathWithoutPrefix("/tools")).toBe(true);
expect(isBoardPathWithoutPrefix("/tools/runtime")).toBe(true);
expect(extractCompanyPrefixFromPath("/tools")).toBeNull();
expect(applyCompanyPrefix("/tools", "PAP")).toBe("/PAP/tools");
expect(applyCompanyPrefix("/tools/runtime", "PAP")).toBe("/PAP/tools/runtime");
expect(applyCompanyPrefix("/PAP/tools/runtime", "PAP")).toBe("/PAP/tools/runtime");
expect(toCompanyRelativePath("/PAP/tools/runtime")).toBe("/tools/runtime");
});
it("preserves artifact deep-link anchors when applying the company prefix", () => {
expect(applyCompanyPrefix("/issues/PAP-10205#work-product-wp-1", "PAP")).toBe(
"/PAP/issues/PAP-10205#work-product-wp-1",
+1
View File
@@ -13,6 +13,7 @@ const BOARD_ROUTE_ROOTS = new Set([
"routines",
"goals",
"artifacts",
"tools",
"approvals",
"costs",
"usage",