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.
This commit is contained in:
Tim van der Meij 2025-08-17 15:16:29 +02:00
parent 2a93ade197
commit c09ad5a2ce
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -17,7 +17,6 @@ import {
awaitPromise,
clearInput,
closePages,
closeSinglePage,
getAnnotationStorage,
getComputedStyleSelector,
getFirstSerialized,
@ -427,6 +426,10 @@ describe("Interaction", () => {
});
});
afterEach(async () => {
await closePages(pages);
});
it("must execute WillPrint and DidPrint actions", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
@ -450,7 +453,6 @@ describe("Interaction", () => {
await page.waitForFunction(
`${getQuerySelector("50R")}.value === "DidPrint"`
);
await closeSinglePage(page);
})
);
});