fix(detail-page-structure-progress-actions): 收敛操作面板定位并补充制单诊断
这个提交包含在:
@@ -88,9 +88,19 @@ describe("payment order BIFF8 generator", () => {
|
||||
});
|
||||
|
||||
it("fails closed when the fixed Python runtime is unavailable", () => {
|
||||
expect(() => generatePaymentOrderXls(config, buildBatch(), {
|
||||
pythonBin: "/definitely-missing/payment-order-python",
|
||||
})).toThrow(expect.objectContaining({ code: "payment_order_generator_unavailable" }));
|
||||
let caught;
|
||||
try {
|
||||
generatePaymentOrderXls(config, buildBatch(), {
|
||||
pythonBin: "/definitely-missing/payment-order-python",
|
||||
});
|
||||
} catch (error) {
|
||||
caught = error;
|
||||
}
|
||||
expect(caught).toBeInstanceOf(PaymentOrderXlsError);
|
||||
expect(caught).toMatchObject({ code: "payment_order_generator_unavailable" });
|
||||
expect(caught.diagnostic).toContain("server/requirements/payment-order-biff8.txt");
|
||||
expect(caught.diagnostic).toContain("PAYMENT_ORDER_PYTHON_BIN");
|
||||
expect(JSON.stringify(caught)).not.toContain("payment-order-biff8.txt");
|
||||
});
|
||||
|
||||
it("fails closed when the fixed Python dependencies are unavailable", () => {
|
||||
@@ -102,8 +112,15 @@ describe("payment order BIFF8 generator", () => {
|
||||
"#!/bin/sh\nprintf '%s\\n' '[payment-order-template][ERROR] runtime_dependency_unavailable' >&2\nexit 70\n",
|
||||
{ mode: 0o700 },
|
||||
);
|
||||
expect(() => generatePaymentOrderXls(config, buildBatch(), { pythonBin: fakePython }))
|
||||
.toThrow(expect.objectContaining({ code: "payment_order_generator_unavailable" }));
|
||||
let caught;
|
||||
try {
|
||||
generatePaymentOrderXls(config, buildBatch(), { pythonBin: fakePython });
|
||||
} catch (error) {
|
||||
caught = error;
|
||||
}
|
||||
expect(caught).toMatchObject({ code: "payment_order_generator_unavailable" });
|
||||
expect(caught.diagnostic).toContain("server/requirements/payment-order-biff8.txt");
|
||||
expect(JSON.stringify(caught)).not.toContain("PAYMENT_ORDER_PYTHON_BIN");
|
||||
} finally {
|
||||
fs.rmSync(temporaryRoot, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户