完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)

这个提交包含在:
2026-07-18 15:46:14 +08:00
父节点 58c8decef9
当前提交 5d0a5f9a38
共修改 134 个文件,包含 10790 行新增和 1413 行删除
@@ -7,6 +7,10 @@ import { expect, test } from "./helpers/fixtures";
test.use({ serviceWorkers: "block" });
const outputDir = path.resolve(process.cwd(), "../output/playwright/pc-finance-admin-visual-wave4");
const taskOutputDir = path.resolve(
process.cwd(),
"../output/playwright/07-18-small-team-internal-readiness",
);
const visualUser = {
identifier: "[email protected]",
@@ -123,7 +127,7 @@ function paymentBatch(status: "draft" | "reviewed" | "failed", suffix: string) {
completedReviewCount: status === "draft" ? 0 : 1,
nextStep: status === "reviewed" ? "ready_for_execute" : "first_review",
makerCheckerRequired: false,
reviewerPermission: "risk.review.manage",
reviewerPermission: "payment.batch.review",
},
reviewComment: null,
secondaryReviewComment: null,
@@ -999,6 +1003,11 @@ async function capture(page: Page, name: string) {
await page.screenshot({ path: path.join(outputDir, `${name}.png`), fullPage: true });
}
async function captureTaskEvidence(page: Page, name: string) {
mkdirSync(taskOutputDir, { recursive: true });
await page.screenshot({ path: path.join(taskOutputDir, `${name}.png`), fullPage: true });
}
const pages = [
{ path: "/payment-batches", proof: "data-testid=payment-batches-table", screenshot: "01-payment-batches", expectStatusStrip: false },
{ path: "/ap-operations", proof: "text=异常付款", screenshot: "02-ap-operations", expectStatusStrip: false },
@@ -1058,6 +1067,39 @@ test("PC 财务列表使用明确动作入口", async ({ page }) => {
await expect(page.getByTestId("invoice-export-csv")).toBeVisible();
});
test("/payment-batches 在 768x1024 与 1024x768 下操作列可达", async ({ page }) => {
await mockWave4Apis(page);
await login(page);
for (const viewport of [
{ width: 768, height: 1024 },
{ width: 1024, height: 768 },
]) {
await page.setViewportSize(viewport);
await page.goto("/payment-batches");
await expect(page.getByRole("heading", { name: "付款", exact: true })).toBeVisible();
const table = page.getByTestId("payment-batches-table");
await expect(table).toBeVisible();
const scrollRegion = table.locator("xpath=ancestor::*[@data-testid='business-table-scroll']").first();
const metrics = await scrollRegion.evaluate((element) => {
element.scrollLeft = element.scrollWidth;
return {
overflowX: window.getComputedStyle(element).overflowX,
clientWidth: element.clientWidth,
scrollWidth: element.scrollWidth,
documentOverflow: document.documentElement.scrollWidth - document.documentElement.clientWidth,
};
});
expect(["auto", "scroll"]).toContain(metrics.overflowX);
expect(metrics.scrollWidth).toBeGreaterThanOrEqual(metrics.clientWidth);
expect(metrics.documentOverflow).toBeLessThanOrEqual(2);
const operation = table.getByRole("button").last();
await expect(operation).toBeVisible();
await operation.click({ trial: true });
await captureTaskEvidence(page, `payment-batches-${viewport.width}x${viewport.height}`);
}
});
test("PC 票据辅助核验动作可提交并重试", async ({ page }) => {
const failedVerification: MockVerificationRecord = {
...(invoiceListItem.verification as MockVerificationRecord),