mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 10:30:37 +09:00
merge master into pap-1167-app-ui-bundle
This commit is contained in:
commit
2c2e13eac2
42 changed files with 15528 additions and 428 deletions
|
|
@ -45,6 +45,7 @@ function makeProject(id: string, name: string): Project {
|
|||
leadAgentId: null,
|
||||
targetDate: null,
|
||||
color: null,
|
||||
env: null,
|
||||
pauseReason: null,
|
||||
pausedAt: null,
|
||||
executionWorkspacePolicy: null,
|
||||
|
|
|
|||
|
|
@ -20,4 +20,29 @@ describe("company routes", () => {
|
|||
"/execution-workspaces/workspace-123",
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Regression tests for https://github.com/paperclipai/paperclip/issues/2910
|
||||
*
|
||||
* The Export and Import links on the Company Settings page used plain
|
||||
* `<a href="/company/export">` anchors which bypass the router's Link
|
||||
* wrapper. Without the wrapper, the company prefix is never applied and
|
||||
* the links resolve to `/company/export` instead of `/:prefix/company/export`,
|
||||
* producing a "Company not found" error.
|
||||
*
|
||||
* The fix replaces the `<a>` elements with the prefix-aware `<Link>` from
|
||||
* `@/lib/router`. These tests assert that the underlying `applyCompanyPrefix`
|
||||
* utility (used by that Link) correctly rewrites the export/import paths.
|
||||
*/
|
||||
it("applies company prefix to /company/export", () => {
|
||||
expect(applyCompanyPrefix("/company/export", "PAP")).toBe("/PAP/company/export");
|
||||
});
|
||||
|
||||
it("applies company prefix to /company/import", () => {
|
||||
expect(applyCompanyPrefix("/company/import", "PAP")).toBe("/PAP/company/import");
|
||||
});
|
||||
|
||||
it("does not double-apply the prefix if already present", () => {
|
||||
expect(applyCompanyPrefix("/PAP/company/export", "PAP")).toBe("/PAP/company/export");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue