diff --git a/packages/tests-e2e/tests/appPagesRouter/host.test.ts b/packages/tests-e2e/tests/appPagesRouter/host.test.ts index 98141106c..d2dd1729e 100644 --- a/packages/tests-e2e/tests/appPagesRouter/host.test.ts +++ b/packages/tests-e2e/tests/appPagesRouter/host.test.ts @@ -4,6 +4,12 @@ import { expect, test } from "@playwright/test"; * Tests that the request.url is the deployed host and not localhost */ test("Request.url is host", async ({ baseURL, page }) => { + // We skip this test when E2E is run locally with `http` as protocol. + // The cause can be seen here: https://github.com/opennextjs/opennextjs-aws/issues/969#issuecomment-3239569901 + test.skip( + (baseURL ?? "").startsWith("http://localhost"), + "Skipping test on localhost", + ); await page.goto("/api/host"); const el = page.getByText(`{"url":"${baseURL}/api/host"}`); diff --git a/packages/tests-e2e/tests/appRouter/host.test.ts b/packages/tests-e2e/tests/appRouter/host.test.ts index 98141106c..d2dd1729e 100644 --- a/packages/tests-e2e/tests/appRouter/host.test.ts +++ b/packages/tests-e2e/tests/appRouter/host.test.ts @@ -4,6 +4,12 @@ import { expect, test } from "@playwright/test"; * Tests that the request.url is the deployed host and not localhost */ test("Request.url is host", async ({ baseURL, page }) => { + // We skip this test when E2E is run locally with `http` as protocol. + // The cause can be seen here: https://github.com/opennextjs/opennextjs-aws/issues/969#issuecomment-3239569901 + test.skip( + (baseURL ?? "").startsWith("http://localhost"), + "Skipping test on localhost", + ); await page.goto("/api/host"); const el = page.getByText(`{"url":"${baseURL}/api/host"}`);