feat: add customer travel records and browse history
This commit is contained in:
@@ -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",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user