feat: add customer travel records and browse history

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

No files matched your search

@@ -0,0 +1,30 @@
import { describe, expect, it } from "vitest";
import mineRecentViewsSource from "@/pages/mine/components/MineRecentViews.vue?raw";
import vehicleSource from "@/pages/mine/vehicle-demands/index.vue?raw";
import historySource from "@/pages/mine/browse-history/index.vue?raw";
import routeDetailSource from "@/pages/detail/index.vue?raw";
import teamDetailSource from "@/pages/team-buildings/detail.vue?raw";
import wildDetailSource from "@/pages/wild-archives/detail.vue?raw";
describe("mine customer records pages", () => {
it("keeps MineRecentViews focused on the two record entries", () => {
expect(mineRecentViewsSource).toContain("用车提交记录");
expect(mineRecentViewsSource).toContain("历史浏览记录");
expect(mineRecentViewsSource).not.toContain("v-for=\"(item, index) in items\"");
expect(mineRecentViewsSource).not.toContain("暂无浏览记录");
});
it("uses z-paging query mode for both paginated lists", () => {
for (const source of [vehicleSource, historySource]) {
expect(source).toContain("<z-paging");
expect(source).toContain('@query="queryList"');
expect(source).toContain("completeByTotal");
}
});
it("syncs successful detail visits through the customer history API", () => {
for (const source of [routeDetailSource, teamDetailSource, wildDetailSource]) {
expect(source).toContain("syncRecentlyViewed");
}
});
});