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:
parent
2a93ade197
commit
c09ad5a2ce
@ -17,7 +17,6 @@ import {
|
|||||||
awaitPromise,
|
awaitPromise,
|
||||||
clearInput,
|
clearInput,
|
||||||
closePages,
|
closePages,
|
||||||
closeSinglePage,
|
|
||||||
getAnnotationStorage,
|
getAnnotationStorage,
|
||||||
getComputedStyleSelector,
|
getComputedStyleSelector,
|
||||||
getFirstSerialized,
|
getFirstSerialized,
|
||||||
@ -427,6 +426,10 @@ describe("Interaction", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
await closePages(pages);
|
||||||
|
});
|
||||||
|
|
||||||
it("must execute WillPrint and DidPrint actions", async () => {
|
it("must execute WillPrint and DidPrint actions", async () => {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
pages.map(async ([browserName, page]) => {
|
pages.map(async ([browserName, page]) => {
|
||||||
@ -450,7 +453,6 @@ describe("Interaction", () => {
|
|||||||
await page.waitForFunction(
|
await page.waitForFunction(
|
||||||
`${getQuerySelector("50R")}.value === "DidPrint"`
|
`${getQuerySelector("50R")}.value === "DidPrint"`
|
||||||
);
|
);
|
||||||
await closeSinglePage(page);
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user