修正门禁测试定位与动画测量(09-17-company-loan-principal-repayment)

保留原断言、容差及运行配置;两份完整测试定向 61/61 通过,补充可复用规约及失败门禁记录。提交后对固定干净候选重跑 verify-candidate。真实回单、人员与独立业务验收仍待核实;本轮不推送、不部署。
这个提交包含在:
2026-10-08 09:49:20 +08:00
父节点 1dd840655b
当前提交 4c37fceeb4
共修改 4 个文件,包含 34 行新增和 4 行删除
@@ -830,8 +830,14 @@ test.describe("报销付款交接一致性", () => {
}
widths.push((await panel.locator("../..").boundingBox())!.width);
const row = panel.getByTestId("detail-inline-actions");
const primary = await row.locator("a, button").first().boundingBox();
const more = await row.getByRole("button", { name: "更多", exact: true }).boundingBox();
const measuredActions = row.locator("a, button").first()
.or(row.getByRole("button", { name: "更多", exact: true }));
await expect(measuredActions).toHaveCount(2);
// Both positions must come from the same animation frame.
const [primary, more] = await measuredActions.evaluateAll((elements) => elements.map((element) => {
const { x, y, width, height } = element.getBoundingClientRect();
return { x, y, width, height };
}));
expect(Math.abs(primary!.y + primary!.height / 2 - more!.y - more!.height / 2)).toBeLessThan(2);
expect(more!.x).toBeGreaterThan(primary!.x + primary!.width);
await row.getByRole("button", { name: "更多", exact: true }).click();