Skip to content

Commit af012c7

Browse files
Merge pull request #18567 from timvandermeij/integration-test-otherpages
Remove obsolete `otherPages` variable from the scripting integration tests
2 parents 1828481 + b7b0735 commit af012c7

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

test/integration/scripting_spec.mjs

-49
Original file line numberDiff line numberDiff line change
@@ -2198,20 +2198,13 @@ describe("Interaction", () => {
21982198

21992199
describe("Textfield with a Blur callback", () => {
22002200
let pages;
2201-
let otherPages;
22022201

22032202
beforeAll(async () => {
2204-
otherPages = await Promise.all(
2205-
global.integrationSessions.map(async session =>
2206-
session.browser.newPage()
2207-
)
2208-
);
22092203
pages = await loadAndWait("bug1863910.pdf", getSelector("25R"));
22102204
});
22112205

22122206
afterAll(async () => {
22132207
await closePages(pages);
2214-
await Promise.all(otherPages.map(page => page.close()));
22152208
});
22162209

22172210
it("must check that blur callback is called", async () => {
@@ -2237,20 +2230,13 @@ describe("Interaction", () => {
22372230

22382231
describe("Radio button without T value", () => {
22392232
let pages;
2240-
let otherPages;
22412233

22422234
beforeAll(async () => {
2243-
otherPages = await Promise.all(
2244-
global.integrationSessions.map(async session =>
2245-
session.browser.newPage()
2246-
)
2247-
);
22482235
pages = await loadAndWait("bug1860602.pdf", getSelector("22R"));
22492236
});
22502237

22512238
afterAll(async () => {
22522239
await closePages(pages);
2253-
await Promise.all(otherPages.map(page => page.close()));
22542240
});
22552241

22562242
it("must check that only one radio is selected", async () => {
@@ -2301,20 +2287,13 @@ describe("Interaction", () => {
23012287

23022288
describe("Textfield with a number and some decimals", () => {
23032289
let pages;
2304-
let otherPages;
23052290

23062291
beforeAll(async () => {
2307-
otherPages = await Promise.all(
2308-
global.integrationSessions.map(async session =>
2309-
session.browser.newPage()
2310-
)
2311-
);
23122292
pages = await loadAndWait("issue17540.pdf", getSelector("15R"));
23132293
});
23142294

23152295
afterAll(async () => {
23162296
await closePages(pages);
2317-
await Promise.all(otherPages.map(page => page.close()));
23182297
});
23192298

23202299
it("must check the number has the correct number of decimals", async () => {
@@ -2341,20 +2320,13 @@ describe("Interaction", () => {
23412320

23422321
describe("Textfield with a zip code starting with 0", () => {
23432322
let pages;
2344-
let otherPages;
23452323

23462324
beforeAll(async () => {
2347-
otherPages = await Promise.all(
2348-
global.integrationSessions.map(async session =>
2349-
session.browser.newPage()
2350-
)
2351-
);
23522325
pages = await loadAndWait("bug1889122.pdf", getSelector("24R"));
23532326
});
23542327

23552328
afterAll(async () => {
23562329
await closePages(pages);
2357-
await Promise.all(otherPages.map(page => page.close()));
23582330
});
23592331

23602332
it("must check the zip code is correctly formatted", async () => {
@@ -2376,20 +2348,13 @@ describe("Interaction", () => {
23762348

23772349
describe("Value of event.change when a choice list is modified", () => {
23782350
let pages;
2379-
let otherPages;
23802351

23812352
beforeAll(async () => {
2382-
otherPages = await Promise.all(
2383-
global.integrationSessions.map(async session =>
2384-
session.browser.newPage()
2385-
)
2386-
);
23872353
pages = await loadAndWait("issue17998.pdf", getSelector("7R"));
23882354
});
23892355

23902356
afterAll(async () => {
23912357
await closePages(pages);
2392-
await Promise.all(otherPages.map(page => page.close()));
23932358
});
23942359

23952360
it("must check the properties of the event", async () => {
@@ -2417,20 +2382,13 @@ describe("Interaction", () => {
24172382

24182383
describe("PageOpen and PageClose actions in fields", () => {
24192384
let pages;
2420-
let otherPages;
24212385

24222386
beforeAll(async () => {
2423-
otherPages = await Promise.all(
2424-
global.integrationSessions.map(async session =>
2425-
session.browser.newPage()
2426-
)
2427-
);
24282387
pages = await loadAndWait("issue18305.pdf", getSelector("7R"));
24292388
});
24302389

24312390
afterAll(async () => {
24322391
await closePages(pages);
2433-
await Promise.all(otherPages.map(page => page.close()));
24342392
});
24352393

24362394
it("must check that PageOpen/PageClose actions are correctly executed", async () => {
@@ -2469,20 +2427,13 @@ describe("Interaction", () => {
24692427

24702428
describe("Compute product of different fields", () => {
24712429
let pages;
2472-
let otherPages;
24732430

24742431
beforeAll(async () => {
2475-
otherPages = await Promise.all(
2476-
global.integrationSessions.map(async session =>
2477-
session.browser.newPage()
2478-
)
2479-
);
24802432
pages = await loadAndWait("issue18536.pdf", getSelector("34R"));
24812433
});
24822434

24832435
afterAll(async () => {
24842436
await closePages(pages);
2485-
await Promise.all(otherPages.map(page => page.close()));
24862437
});
24872438

24882439
it("must check that the product are null", async () => {

0 commit comments

Comments
 (0)