Revert "Merge pull request 'Complete Housekeeping migration and /ase cutover' (#52) from codex/housekeeping-complete into main"
This reverts commit488b6e57c4, reversing changes made tob506b4499a.
This commit is contained in:
1 parent
488b6e57c4
commit
b1ddda66ff
802 files changed
+61370
-76659
No files matched your search
@@ -1,51 +0,0 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { type BcPageData, BcPageDetail } from "./bc-manager";
|
||||
|
||||
vi.mock("@/actions/catalog-bc", () => ({
|
||||
createBcItem: vi.fn(),
|
||||
deleteBcItem: vi.fn(),
|
||||
updateBcItem: vi.fn(),
|
||||
updateBcPage: vi.fn(),
|
||||
}));
|
||||
vi.mock("@/components/admin/confirm-dialog", () => ({
|
||||
useConfirmDialog: () => ({ confirm: vi.fn(), dialog: null }),
|
||||
}));
|
||||
vi.mock("@/hooks/use-server-action", () => ({
|
||||
useServerAction: () => ({ isPending: false, run: vi.fn() }),
|
||||
}));
|
||||
|
||||
const page: BcPageData = {
|
||||
id: 7,
|
||||
parentId: -1,
|
||||
caption: "Builder Club",
|
||||
pageLayout: "default_3x3",
|
||||
iconColor: 0,
|
||||
iconImage: 1,
|
||||
orderNum: 1,
|
||||
visible: "1",
|
||||
enabled: "1",
|
||||
pageHeadline: "",
|
||||
pageTeaser: "",
|
||||
pageSpecial: "",
|
||||
pageText1: "",
|
||||
pageText2: "",
|
||||
pageTextDetails: "",
|
||||
pageTextTeaser: "",
|
||||
};
|
||||
|
||||
describe("BcPageDetail", () => {
|
||||
it("uses the canonical return route when embedded in Housekeeping", () => {
|
||||
const markup = renderToStaticMarkup(
|
||||
<BcPageDetail
|
||||
page={page}
|
||||
items={[]}
|
||||
canEdit={false}
|
||||
returnHref="/ase/economy/catalog"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(markup).toContain('href="/ase/economy/catalog"');
|
||||
expect(markup).not.toContain('href="/admin/catalog?catalog=bc"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user