feat: add customer travel records and browse history

This commit is contained in:
duanshuwen
2026-08-27 14:19:03 +08:00
parent 0139fe6382
commit 6d9a546918
79 changed files with 12362 additions and 112 deletions

View File

@@ -1,6 +1,11 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { goWanfaRouteDetail } from "@/lib/navigation";
import {
goCustomerBrowseHistory,
goCustomerVehicleDemandDetail,
goCustomerVehicleDemands,
goWanfaRouteDetail,
} from "@/lib/navigation";
describe("wanfa route detail navigation", () => {
const navigateTo = vi.fn();
@@ -17,4 +22,20 @@ describe("wanfa route detail navigation", () => {
url: "/pages/detail/index?routeId=family%20water",
});
});
it("opens the two customer record entries and encodes detail ids", () => {
goCustomerVehicleDemands();
goCustomerBrowseHistory();
goCustomerVehicleDemandDetail("lead 1");
expect(navigateTo).toHaveBeenNthCalledWith(1, {
url: "/pages/mine/vehicle-demands/index",
});
expect(navigateTo).toHaveBeenNthCalledWith(2, {
url: "/pages/mine/browse-history/index",
});
expect(navigateTo).toHaveBeenNthCalledWith(3, {
url: "/pages/mine/vehicle-demand-detail?id=lead%201",
});
});
});