修复购物车位置操作的版本绑定与冲突确认
前端验证 / verify (push) Failing after 15m3s

This commit is contained in:
cieanyau committed 2026-11-07 08:27:36 +08:00
1 parent e27f08e36e
commit b788f890f8
5 files changed
+288 -59

No files matched your search

+15 -9
View File
@@ -3,6 +3,7 @@
* 所有内容来自生产已有的本地 HTTP 边界;尺寸断言读取实际 DOM,不检查源码形状。
*/
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { test } from "node:test";
import { firefox } from "playwright";
import {
@@ -118,17 +119,22 @@ async function layoutBoundary(
create_time: 1700000000,
},
});
if (path === "/cart")
if (path === "/cart") {
const list = Array.from({ length: 14 }, (_, index) => ({
product_id: 123,
qty: 1,
name: `云产品 ${index + 1}`,
config_options: { cpu: index + 1 },
customfield: {},
self_defined_field: {},
}));
return reply({
list: Array.from({ length: 14 }, (_, index) => ({
product_id: 123,
qty: 1,
name: `云产品 ${index + 1}`,
config_options: { cpu: index + 1 },
customfield: {},
self_defined_field: {},
})),
list,
revision: createHash("sha256")
.update(JSON.stringify(list))
.digest("hex"),
});
}
if (path === "/product/123/config_option")
return reply({
price_total: "10.00",