Skip to content

Commit f06c5ce

Browse files
committed
Use the closePages helper function more in the integration test code
This test called `closeSinglePage` manually at the end of the test, which is inconsistent with all other tests that call `closePages` in an `afterEach` block. This commit fixes the difference for consistency.
1 parent bde01f0 commit f06c5ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/integration/scripting_spec.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
awaitPromise,
1818
clearInput,
1919
closePages,
20-
closeSinglePage,
2120
getAnnotationStorage,
2221
getComputedStyleSelector,
2322
getFirstSerialized,
@@ -427,6 +426,10 @@ describe("Interaction", () => {
427426
});
428427
});
429428

429+
afterEach(async () => {
430+
await closePages(pages);
431+
});
432+
430433
it("must execute WillPrint and DidPrint actions", async () => {
431434
await Promise.all(
432435
pages.map(async ([browserName, page]) => {
@@ -450,7 +453,6 @@ describe("Interaction", () => {
450453
await page.waitForFunction(
451454
`${getQuerySelector("50R")}.value === "DidPrint"`
452455
);
453-
await closeSinglePage(page);
454456
})
455457
);
456458
});

0 commit comments

Comments
 (0)