From 93acfaa040b9df1e8bbaf2a52c83f60d57fa6ccb Mon Sep 17 00:00:00 2001 From: Sean Rankine Date: Fri, 26 Jul 2024 13:46:47 +0100 Subject: [PATCH] Fix CDN caching test We should do multiple requests to check that the initial request is cached. Otherwise a single request within a 5 min window will be uncached. --- tests/cdn.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cdn.spec.js b/tests/cdn.spec.js index 074f0cc..77159f8 100644 --- a/tests/cdn.spec.js +++ b/tests/cdn.spec.js @@ -47,6 +47,7 @@ test.describe("CDN", () => { }); test("Check caching behaviour for GET requests", { tag: ["@notcloudfront"] }, async ({ page }) => { + await page.request.get("/"); const response = await page.request.get("/"); expect(parseInt(response.headers()["x-cache-hits"])).toBeGreaterThan(0); });