Merge pull request #19705 from timvandermeij/integration-tests-scripting-isolate

Isolate the scripting integration tests
This commit is contained in:
Tim van der Meij 2025-03-22 20:38:50 +01:00 committed by GitHub
commit 72212a892b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,11 +74,11 @@ describe("Interaction", () => {
describe("in 160F-2019.pdf", () => { describe("in 160F-2019.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("160F-2019.pdf", getSelector("416R")); pages = await loadAndWait("160F-2019.pdf", getSelector("416R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -150,15 +150,12 @@ describe("Interaction", () => {
await page.type(getSelector("416R"), "3.14159"); await page.type(getSelector("416R"), "3.14159");
await page.click(getSelector("419R")); await page.click(getSelector("419R"));
await page.waitForFunction(
const valueFnStr = `${getQuerySelector("416R")}.value !== "3.14159"`; `${getQuerySelector("416R")}.value === "3,14"`
await page.waitForFunction(valueFnStr); );
await page.waitForFunction(
const text = await page.$eval(getSelector("416R"), el => el.value); `${getQuerySelector("427R")}.value === "3,14"`
expect(text).withContext(`In ${browserName}`).toEqual("3,14"); );
const sum = await page.$eval(getSelector("427R"), el => el.value);
expect(sum).withContext(`In ${browserName}`).toEqual("3,14");
}) })
); );
}); });
@ -170,36 +167,23 @@ describe("Interaction", () => {
await page.type(getSelector("448R"), "61803"); await page.type(getSelector("448R"), "61803");
await page.click(getSelector("419R")); await page.click(getSelector("419R"));
await page.waitForFunction(
const valueOneFnStr = `${getQuerySelector("448R")}.value !== "61803"`; `${getQuerySelector("448R")}.value === "61.803,00"`
await page.waitForFunction(valueOneFnStr); );
let text = await page.$eval(getSelector("448R"), el => el.value);
expect(text).withContext(`In ${browserName}`).toEqual("61.803,00");
await page.click(getSelector("448R")); await page.click(getSelector("448R"));
await page.waitForFunction(
const valueTwoFnStr = `${getQuerySelector( `${getQuerySelector("448R")}.value === "61803"`
"448R" );
)}.value !== "61.803,00"`;
await page.waitForFunction(valueTwoFnStr);
text = await page.$eval(getSelector("448R"), el => el.value);
expect(text).withContext(`In ${browserName}`).toEqual("61803");
// Clear the textfield // Clear the textfield
await clearInput(page, getSelector("448R")); await clearInput(page, getSelector("448R"));
await page.type(getSelector("448R"), "1.61803"); await page.type(getSelector("448R"), "1.61803");
await page.click(getSelector("419R")); await page.click(getSelector("419R"));
await page.waitForFunction(
const valueThreeFnStr = `${getQuerySelector( `${getQuerySelector("448R")}.value === "1,62"`
"448R" );
)}.value !== "1.61803"`;
await page.waitForFunction(valueThreeFnStr);
text = await page.$eval(getSelector("448R"), el => el.value);
expect(text).withContext(`In ${browserName}`).toEqual("1,62");
}) })
); );
}); });
@ -209,24 +193,14 @@ describe("Interaction", () => {
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
await waitForScripting(page); await waitForScripting(page);
const prevSum = await page.$eval(getSelector("427R"), el => el.value);
await page.type(getSelector("422R"), "2.7182818"); await page.type(getSelector("422R"), "2.7182818");
await page.keyboard.press("Tab"); await page.keyboard.press("Tab");
await page.waitForFunction( await page.waitForFunction(
`${getQuerySelector("422R")}.value !== "2.7182818"` `${getQuerySelector("422R")}.value === "2,72"`
); );
const text = await page.$eval(getSelector("422R"), el => el.value);
expect(text).withContext(`In ${browserName}`).toEqual("2,72");
await page.waitForFunction( await page.waitForFunction(
`${getQuerySelector("427R")}.value !== "${prevSum}"` `${getQuerySelector("427R")}.value === "2,72"`
); );
const sum = await page.$eval(getSelector("427R"), el => el.value);
expect(sum).withContext(`In ${browserName}`).toEqual("5,86");
}) })
); );
}); });
@ -236,21 +210,14 @@ describe("Interaction", () => {
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
await waitForScripting(page); await waitForScripting(page);
let sum = await page.$eval(getSelector("471R"), el => el.value);
expect(sum).withContext(`In ${browserName}`).toEqual("4,24");
await page.type(getSelector("436R"), "0.69314"); await page.type(getSelector("436R"), "0.69314");
await page.keyboard.press("Escape"); await page.keyboard.press("Escape");
const text = await page.$eval(getSelector("436R"), el => el.value);
expect(text).withContext(`In ${browserName}`).toEqual("0.69314");
await page.waitForFunction( await page.waitForFunction(
`${getQuerySelector("471R")}.value !== "${sum}"` `${getQuerySelector("436R")}.value === "0.69314"`
);
await page.waitForFunction(
`${getQuerySelector("471R")}.value === "0,69"`
); );
sum = await page.$eval(getSelector("471R"), el => el.value);
expect(sum).withContext(`In ${browserName}`).toEqual("3,55");
}) })
); );
}); });
@ -260,19 +227,14 @@ describe("Interaction", () => {
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
await waitForScripting(page); await waitForScripting(page);
const prevSum = await page.$eval(getSelector("427R"), el => el.value);
await page.type(getSelector("419R"), "0.577215"); await page.type(getSelector("419R"), "0.577215");
await page.keyboard.press("Enter"); await page.keyboard.press("Enter");
const text = await page.$eval(getSelector("419R"), el => el.value);
expect(text).toEqual("0.577215");
await page.waitForFunction( await page.waitForFunction(
`${getQuerySelector("427R")}.value !== "${prevSum}"` `${getQuerySelector("419R")}.value === "0.577215"`
);
await page.waitForFunction(
`${getQuerySelector("427R")}.value === "0,58"`
); );
const sum = await page.$eval(getSelector("427R"), el => el.value);
expect(sum).toEqual("6,44");
}) })
); );
}); });
@ -329,11 +291,11 @@ describe("Interaction", () => {
describe("in js-buttons.pdf", () => { describe("in js-buttons.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("js-buttons.pdf", getSelector("80R")); pages = await loadAndWait("js-buttons.pdf", getSelector("80R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -456,7 +418,7 @@ describe("Interaction", () => {
describe("in doc_actions.pdf for printing", () => { describe("in doc_actions.pdf for printing", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("doc_actions.pdf", getSelector("47R"), null, { pages = await loadAndWait("doc_actions.pdf", getSelector("47R"), null, {
earlySetup: () => { earlySetup: () => {
// No need to trigger the print dialog. // No need to trigger the print dialog.
@ -497,11 +459,11 @@ describe("Interaction", () => {
describe("in doc_actions.pdf for saving", () => { describe("in doc_actions.pdf for saving", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("doc_actions.pdf", getSelector("47R")); pages = await loadAndWait("doc_actions.pdf", getSelector("47R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -544,11 +506,11 @@ describe("Interaction", () => {
describe("in doc_actions.pdf for page actions", () => { describe("in doc_actions.pdf for page actions", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("doc_actions.pdf", getSelector("47R")); pages = await loadAndWait("doc_actions.pdf", getSelector("47R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -601,11 +563,11 @@ describe("Interaction", () => {
describe("in js-authors.pdf", () => { describe("in js-authors.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("js-authors.pdf", getSelector("25R")); pages = await loadAndWait("js-authors.pdf", getSelector("25R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -632,11 +594,11 @@ describe("Interaction", () => {
describe("in listbox_actions.pdf", () => { describe("in listbox_actions.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("listbox_actions.pdf", getSelector("33R")); pages = await loadAndWait("listbox_actions.pdf", getSelector("33R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -774,11 +736,11 @@ describe("Interaction", () => {
describe("in js-colors.pdf", () => { describe("in js-colors.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("js-colors.pdf", getSelector("34R")); pages = await loadAndWait("js-colors.pdf", getSelector("34R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -847,11 +809,11 @@ describe("Interaction", () => {
describe("in issue13132.pdf", () => { describe("in issue13132.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue13132.pdf", getSelector("171R")); pages = await loadAndWait("issue13132.pdf", getSelector("171R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -906,11 +868,11 @@ describe("Interaction", () => {
describe("Check field properties", () => { describe("Check field properties", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("evaljs.pdf", getSelector("55R")); pages = await loadAndWait("evaljs.pdf", getSelector("55R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -981,11 +943,11 @@ describe("Interaction", () => {
describe("in issue13269.pdf", () => { describe("in issue13269.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue13269.pdf", getSelector("27R")); pages = await loadAndWait("issue13269.pdf", getSelector("27R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1016,13 +978,14 @@ describe("Interaction", () => {
describe("in secHandler.pdf", () => { describe("in secHandler.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("secHandler.pdf", getSelector("25R")); pages = await loadAndWait("secHandler.pdf", getSelector("25R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
it("must print securityHandler value in a text field", async () => { it("must print securityHandler value in a text field", async () => {
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
@ -1044,7 +1007,7 @@ describe("Interaction", () => {
describe("in issue14307.pdf (1)", () => { describe("in issue14307.pdf (1)", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue14307.pdf", getSelector("30R")); pages = await loadAndWait("issue14307.pdf", getSelector("30R"));
pages.map(async ([, page]) => { pages.map(async ([, page]) => {
page.on("dialog", async dialog => { page.on("dialog", async dialog => {
@ -1053,7 +1016,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1087,7 +1050,7 @@ describe("Interaction", () => {
describe("in issue14307.pdf (2)", () => { describe("in issue14307.pdf (2)", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue14307.pdf", getSelector("30R")); pages = await loadAndWait("issue14307.pdf", getSelector("30R"));
pages.map(async ([, page]) => { pages.map(async ([, page]) => {
page.on("dialog", async dialog => { page.on("dialog", async dialog => {
@ -1096,7 +1059,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1132,7 +1095,7 @@ describe("Interaction", () => {
describe("in issue14307.pdf (3)", () => { describe("in issue14307.pdf (3)", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue14307.pdf", getSelector("30R")); pages = await loadAndWait("issue14307.pdf", getSelector("30R"));
pages.map(async ([, page]) => { pages.map(async ([, page]) => {
page.on("dialog", async dialog => { page.on("dialog", async dialog => {
@ -1141,7 +1104,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1177,7 +1140,7 @@ describe("Interaction", () => {
describe("in issue14862.pdf", () => { describe("in issue14862.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue14862.pdf", getSelector("27R")); pages = await loadAndWait("issue14862.pdf", getSelector("27R"));
pages.map(async ([, page]) => { pages.map(async ([, page]) => {
page.on("dialog", async dialog => { page.on("dialog", async dialog => {
@ -1186,7 +1149,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1272,7 +1235,7 @@ describe("Interaction", () => {
describe("in issue14705.pdf", () => { describe("in issue14705.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue14705.pdf", getSelector("29R")); pages = await loadAndWait("issue14705.pdf", getSelector("29R"));
pages.map(async ([, page]) => { pages.map(async ([, page]) => {
page.on("dialog", async dialog => { page.on("dialog", async dialog => {
@ -1281,7 +1244,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1316,11 +1279,11 @@ describe("Interaction", () => {
describe("in bug1766987.pdf", () => { describe("in bug1766987.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1766987.pdf", getSelector("75R")); pages = await loadAndWait("bug1766987.pdf", getSelector("75R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1348,11 +1311,11 @@ describe("Interaction", () => {
describe("in issue15053.pdf", () => { describe("in issue15053.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue15053.pdf", getSelector("44R")); pages = await loadAndWait("issue15053.pdf", getSelector("44R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1401,11 +1364,11 @@ describe("Interaction", () => {
describe("in bug1675139.pdf", () => { describe("in bug1675139.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1675139.pdf", getSelector("48R")); pages = await loadAndWait("bug1675139.pdf", getSelector("48R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1447,11 +1410,11 @@ describe("Interaction", () => {
describe("in issue15092.pdf", () => { describe("in issue15092.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue15092.pdf", getSelector("39R")); pages = await loadAndWait("issue15092.pdf", getSelector("39R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1482,11 +1445,11 @@ describe("Interaction", () => {
describe("in bug1782564.pdf", () => { describe("in bug1782564.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1782564.pdf", getSelector("7R")); pages = await loadAndWait("bug1782564.pdf", getSelector("7R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1527,11 +1490,11 @@ describe("Interaction", () => {
describe("in bug1802888.pdf", () => { describe("in bug1802888.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1802888.pdf", getSelector("30R")); pages = await loadAndWait("bug1802888.pdf", getSelector("30R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1557,11 +1520,11 @@ describe("Interaction", () => {
describe("in issue15753.pdf", () => { describe("in issue15753.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue15753.pdf", getSelector("27R")); pages = await loadAndWait("issue15753.pdf", getSelector("27R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1602,11 +1565,11 @@ describe("Interaction", () => {
describe("in issue15815.pdf", () => { describe("in issue15815.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue15815.pdf", getSelector("24R")); pages = await loadAndWait("issue15815.pdf", getSelector("24R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1649,11 +1612,11 @@ describe("Interaction", () => {
describe("in issue15818.pdf", () => { describe("in issue15818.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue15818.pdf", getSelector("27R")); pages = await loadAndWait("issue15818.pdf", getSelector("27R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1696,7 +1659,7 @@ describe("Interaction", () => {
describe("in autoprint.pdf", () => { describe("in autoprint.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
// Autoprinting is triggered by the `Open` event, which is one of the // Autoprinting is triggered by the `Open` event, which is one of the
// first events to be dispatched to the sandbox, even before scripting // first events to be dispatched to the sandbox, even before scripting
// is reported to be ready. It's therefore important that `loadAndWait` // is reported to be ready. It's therefore important that `loadAndWait`
@ -1725,7 +1688,7 @@ describe("Interaction", () => {
}); });
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1747,11 +1710,11 @@ describe("Interaction", () => {
describe("in bug1811694.pdf", () => { describe("in bug1811694.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1811694.pdf", getSelector("25R")); pages = await loadAndWait("bug1811694.pdf", getSelector("25R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1779,11 +1742,11 @@ describe("Interaction", () => {
describe("in bug1811510.pdf", () => { describe("in bug1811510.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1811510.pdf", getSelector("22R")); pages = await loadAndWait("bug1811510.pdf", getSelector("22R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1819,11 +1782,11 @@ describe("Interaction", () => {
describe("in issue16067.pdf", () => { describe("in issue16067.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue16067.pdf", getSelector("6R")); pages = await loadAndWait("issue16067.pdf", getSelector("6R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1854,11 +1817,11 @@ describe("Interaction", () => {
describe("in bug1825002.pdf", () => { describe("in bug1825002.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1825002.pdf", getSelector("23R")); pages = await loadAndWait("bug1825002.pdf", getSelector("23R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1908,11 +1871,11 @@ describe("Interaction", () => {
describe("in bug1844576.pdf", () => { describe("in bug1844576.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1844576.pdf", getSelector("9R")); pages = await loadAndWait("bug1844576.pdf", getSelector("9R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -1963,14 +1926,14 @@ describe("Interaction", () => {
describe("in annotation_hidden_noview.pdf", () => { describe("in annotation_hidden_noview.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait( pages = await loadAndWait(
"annotation_hidden_noview.pdf", "annotation_hidden_noview.pdf",
getSelector("11R") getSelector("11R")
); );
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2022,11 +1985,11 @@ describe("Interaction", () => {
describe("in issue16863.pdf", () => { describe("in issue16863.pdf", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue16863.pdf", getSelector("334R")); pages = await loadAndWait("issue16863.pdf", getSelector("334R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2086,7 +2049,7 @@ describe("Interaction", () => {
let pages; let pages;
let otherPages; let otherPages;
beforeAll(async () => { beforeEach(async () => {
otherPages = await Promise.all( otherPages = await Promise.all(
global.integrationSessions.map(async session => global.integrationSessions.map(async session =>
session.browser.newPage() session.browser.newPage()
@ -2095,7 +2058,7 @@ describe("Interaction", () => {
pages = await loadAndWait("evaljs.pdf", getSelector("55R")); pages = await loadAndWait("evaljs.pdf", getSelector("55R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
await Promise.all(otherPages.map(page => page.close())); await Promise.all(otherPages.map(page => page.close()));
}); });
@ -2129,11 +2092,11 @@ describe("Interaction", () => {
describe("Textfield with a Blur callback", () => { describe("Textfield with a Blur callback", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1863910.pdf", getSelector("25R")); pages = await loadAndWait("bug1863910.pdf", getSelector("25R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2161,11 +2124,11 @@ describe("Interaction", () => {
describe("Radio button without T value", () => { describe("Radio button without T value", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1860602.pdf", getSelector("22R")); pages = await loadAndWait("bug1860602.pdf", getSelector("22R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2218,11 +2181,11 @@ describe("Interaction", () => {
describe("Textfield with a number and some decimals", () => { describe("Textfield with a number and some decimals", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue17540.pdf", getSelector("15R")); pages = await loadAndWait("issue17540.pdf", getSelector("15R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2251,11 +2214,11 @@ describe("Interaction", () => {
describe("Textfield with a zip code starting with 0", () => { describe("Textfield with a zip code starting with 0", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1889122.pdf", getSelector("24R")); pages = await loadAndWait("bug1889122.pdf", getSelector("24R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2279,11 +2242,11 @@ describe("Interaction", () => {
describe("Value of event.change when a choice list is modified", () => { describe("Value of event.change when a choice list is modified", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue17998.pdf", getSelector("7R")); pages = await loadAndWait("issue17998.pdf", getSelector("7R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2313,11 +2276,11 @@ describe("Interaction", () => {
describe("PageOpen and PageClose actions in fields", () => { describe("PageOpen and PageClose actions in fields", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue18305.pdf", getSelector("7R")); pages = await loadAndWait("issue18305.pdf", getSelector("7R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2358,11 +2321,11 @@ describe("Interaction", () => {
describe("Compute product of different fields", () => { describe("Compute product of different fields", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue18536.pdf", getSelector("34R")); pages = await loadAndWait("issue18536.pdf", getSelector("34R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2395,11 +2358,11 @@ describe("Interaction", () => {
describe("Calculate field value even if one callback throws", () => { describe("Calculate field value even if one callback throws", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue18561.pdf", getSelector("24R")); pages = await loadAndWait("issue18561.pdf", getSelector("24R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2423,11 +2386,11 @@ describe("Interaction", () => {
describe("Correctly format numbers", () => { describe("Correctly format numbers", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1918115.pdf", getSelector("33R")); pages = await loadAndWait("bug1918115.pdf", getSelector("33R"));
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2451,11 +2414,11 @@ describe("Interaction", () => {
describe("Change radio property", () => { describe("Change radio property", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1922766.pdf", "[data-annotation-id='44R']"); pages = await loadAndWait("bug1922766.pdf", "[data-annotation-id='44R']");
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2494,11 +2457,11 @@ describe("Interaction", () => {
describe("Date creation must be timezone consistent", () => { describe("Date creation must be timezone consistent", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("bug1934157.pdf", "[data-annotation-id='24R']"); pages = await loadAndWait("bug1934157.pdf", "[data-annotation-id='24R']");
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });
@ -2532,11 +2495,11 @@ describe("Interaction", () => {
describe("Skip throwing actions (issue 19505)", () => { describe("Skip throwing actions (issue 19505)", () => {
let pages; let pages;
beforeAll(async () => { beforeEach(async () => {
pages = await loadAndWait("issue19505.pdf", "[data-annotation-id='24R']"); pages = await loadAndWait("issue19505.pdf", "[data-annotation-id='24R']");
}); });
afterAll(async () => { afterEach(async () => {
await closePages(pages); await closePages(pages);
}); });