From c09ad5a2ce47d79e2e8f451e1b697bb262eab3be Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 17 Aug 2025 15:16:29 +0200 Subject: [PATCH] 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. --- test/integration/scripting_spec.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/integration/scripting_spec.mjs b/test/integration/scripting_spec.mjs index 3736216bf..ddba46151 100644 --- a/test/integration/scripting_spec.mjs +++ b/test/integration/scripting_spec.mjs @@ -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); }) ); });