fix(web): 管理价格与创作空态 - 合并 PR #373 并保留 create 路由
This commit is contained in:
@@ -29,12 +29,12 @@ describe("workspace route loading", () => {
|
||||
expect(navigation).toContain("onFocus={() => preloadWorkspaceRoute(linkTo)}");
|
||||
});
|
||||
|
||||
test("uses the creation page as the root entry without legacy home or create routes", () => {
|
||||
test("keeps the creation page at root and preserves the create compatibility route", () => {
|
||||
const router = source("../src/router.tsx");
|
||||
const navigation = source("../src/components/layout/workspace-sidebar-nav.tsx");
|
||||
|
||||
expect(router).toContain('{ path: "/", element: <RequireAuth>{deferred(<CreatePage />)}</RequireAuth> }');
|
||||
expect(router).not.toContain('path: "/create"');
|
||||
expect(router).toContain('{ path: "/create", element: <RequireAuth>{deferred(<CreatePage />)}</RequireAuth> }');
|
||||
expect(router).not.toContain('path: "/home"');
|
||||
expect(router).not.toContain("HomePage");
|
||||
expect(navigation).toContain('{ id: "home", title: "首页", icon: Home, to: "/" }');
|
||||
|
||||
Reference in New Issue
Block a user