fix: 统一报销与付款详情整体宽度(09-04-reimbursement-state-gap-finance-view)
这个提交包含在:
@@ -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) => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户