修正门禁测试定位与动画测量(09-17-company-loan-principal-repayment)
保留原断言、容差及运行配置;两份完整测试定向 61/61 通过,补充可复用规约及失败门禁记录。提交后对固定干净候选重跑 verify-candidate。真实回单、人员与独立业务验收仍待核实;本轮不推送、不部署。
这个提交包含在:
@@ -332,7 +332,7 @@ test.describe("R92 手机端票据与报销可用性", () => {
|
||||
await expect(page.getByTestId("invoice-pool-table")).toBeHidden();
|
||||
await page.getByTestId("invoice-mobile-detail-button").click();
|
||||
await expect(page.getByTestId("invoice-detail-panel")).toBeVisible();
|
||||
await expect(page.getByText("票据详情")).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "票据详情", exact: true })).toBeVisible();
|
||||
await attachScreenshot(page, testInfo, "r97-invoice-pool-mobile.png");
|
||||
|
||||
await page.goto("/invoice-pool");
|
||||
|
||||
@@ -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();
|
||||
|
||||
在新工单中引用
屏蔽一个用户