diff --git a/packages/alfa-scraper/test/scraper.spec.ts b/packages/alfa-scraper/test/scraper.spec.ts index bd731f1b..cd70d462 100644 --- a/packages/alfa-scraper/test/scraper.spec.ts +++ b/packages/alfa-scraper/test/scraper.spec.ts @@ -1,3 +1,4 @@ +import { Device } from "@siteimprove/alfa-device"; import * as path from "path"; import * as url from "url"; @@ -81,15 +82,13 @@ test("#scrape() scrapes a page with a delayed location change", async (t) => test("#scrape() scrapes layout", async (t) => await Scraper.with(async (scraper) => { const url = getTestPageFileUrl("layout.html"); - const result = await scraper.scrape(url); + const page = (await scraper.scrape(url)).getUnsafe(); - const box = getElementDescendants( - result.getUnsafe().document, - Node.fullTree - ) + const box = getElementDescendants(page.document, Node.fullTree) .find((node) => node.id.some((id) => id === "blackbox")) .getUnsafe() - .box.getUnsafe() + .getBoundingBox(page.device) + .getUnsafe() .toJSON(); t.deepEqual(box, {