mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Merge pull request #18566 from calixteman/issue18561
Don't stop calculating field values when a Calculate callback throws
This commit is contained in:
commit
341a0b6d47
4 changed files with 39 additions and 1 deletions
|
@ -2461,4 +2461,32 @@ describe("Interaction", () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Calculate field value even if one callback throws", () => {
|
||||
let pages;
|
||||
|
||||
beforeAll(async () => {
|
||||
pages = await loadAndWait("issue18561.pdf", getSelector("24R"));
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await closePages(pages);
|
||||
});
|
||||
|
||||
it("must check that the product is computed although a callback threw", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page], i) => {
|
||||
await waitForScripting(page);
|
||||
|
||||
const inputSelector = getSelector("24R");
|
||||
await page.click(inputSelector);
|
||||
await page.type(inputSelector, "123");
|
||||
await page.click(getSelector("25R"));
|
||||
await page.waitForFunction(
|
||||
`${getQuerySelector("28R")}.value === "12300"`
|
||||
);
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue