fix: 统一报销与付款详情整体宽度(09-04-reimbursement-state-gap-finance-view)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-09-12 08:51:31 +08:00
父节点 1eeda7cd92
当前提交 7bfc25461f
共修改 6 个文件,包含 36 行新增和 3 行删除
@@ -762,12 +762,13 @@ test.describe("报销付款交接一致性", () => {
});
}
for (const width of [1280, 1440]) {
for (const width of [1280, 1440, 1920]) {
test(`桌面${width}付款与报销侧栏等宽且更多紧随主按钮`, async ({ page }, testInfo) => {
await page.setViewportSize({ width, height: 960 });
await mockSystemActionApis(page, { reimbursementStatus: "approved", reimbursementProgress: () => progress("reviewed") });
await login(page, user);
const widths: number[] = [];
const boundaries: { left: number; right: number }[] = [];
for (const [url, panelId] of [
[`/reimbursements/${reimbursementId}`, "reimbursement-action-panel"],
[`/payment-batches?id=${paymentBatchId}`, "payment-batch-action-panel"],
@@ -776,6 +777,14 @@ test.describe("报销付款交接一致性", () => {
const panel = page.getByTestId(panelId);
await expect(panel).toBeVisible();
await page.evaluate(() => document.fonts.ready);
const grid = page.locator(".detail-workspace-grid--payment");
const gridBounds = (await grid.boundingBox())!;
boundaries.push({ left: gridBounds.x, right: gridBounds.x + gridBounds.width });
if (panelId === "reimbursement-action-panel") {
const heroBounds = (await page.getByTestId("reimbursement-desktop-workspace").locator(".workbench-hero").boundingBox())!;
expect(Math.abs(gridBounds.x - heroBounds.x)).toBeLessThan(2);
expect(Math.abs(gridBounds.x + gridBounds.width - heroBounds.x - heroBounds.width)).toBeLessThan(2);
}
widths.push((await panel.locator("../..").boundingBox())!.width);
const row = panel.getByTestId("detail-inline-actions");
const primary = await row.locator("a, button").first().boundingBox();
@@ -789,6 +798,8 @@ test.describe("报销付款交接一致性", () => {
await page.screenshot({ path: testInfo.outputPath(`${panelId}.png`), fullPage: true });
}
expect(widths).toEqual([320, 320]);
expect(Math.abs(boundaries[0].left - boundaries[1].left)).toBeLessThan(2);
expect(Math.abs(boundaries[0].right - boundaries[1].right)).toBeLessThan(2);
});
test(`桌面${width}创建批次按钮短文案按内容宽度且只导航不组批`, async ({ page }, testInfo) => {