Skip to content

Commit f26f641

Browse files
enable e2e/app-pages-router tests to run in CI (#315)
1 parent ef8d5b6 commit f26f641

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

examples/e2e/app-pages-router/e2e/host.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import { expect, test } from "@playwright/test";
22

33
/**
44
* Tests that the request.url is the deployed host and not localhost
5+
*
6+
* This test is skipped since e2e tests for the cloudflare adapter
7+
* run only locally to the baseURL doesn't match
58
*/
6-
test("Request.url is host", async ({ baseURL, page }) => {
9+
test.skip("Request.url is host", async ({ baseURL, page }) => {
710
await page.goto("/api/host");
811

912
const el = page.getByText(`{"url":"${baseURL}/api/host"}`);

examples/e2e/app-pages-router/e2e/image-optimization.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "@playwright/test";
22

3-
test("Image Optimization", async ({ page }) => {
3+
// Image Optimization is currently not supported: https://github.com/opennextjs/opennextjs-cloudflare/issues/106
4+
test.skip("Image Optimization", async ({ page }) => {
45
await page.goto("/");
56

67
const imageResponsePromise = page.waitForResponse(/corporate_holiday_card.jpg/);

examples/e2e/app-pages-router/e2e/isr.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "@playwright/test";
22

3-
test("Incremental Static Regeneration", async ({ page }) => {
3+
// ISR is currently not supported: https://github.com/opennextjs/opennextjs-cloudflare/issues/105
4+
test.skip("Incremental Static Regeneration", async ({ page }) => {
45
test.setTimeout(60000);
56
await page.goto("/");
67
await page.locator('[href="/isr"]').click();

examples/e2e/app-pages-router/e2e/pages_isr.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "@playwright/test";
22

3-
test("Incremental Static Regeneration", async ({ page }) => {
3+
// ISR is currently not supported: https://github.com/opennextjs/opennextjs-cloudflare/issues/105
4+
test.skip("Incremental Static Regeneration", async ({ page }) => {
45
test.setTimeout(60000);
56
await page.goto("/");
67
await page.locator('[href="/pages_isr"]').click();

examples/e2e/app-pages-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build:worker": "pnpm opennextjs-cloudflare",
1313
"dev:worker": "wrangler dev --port 8792 --inspector-port 9352",
1414
"preview": "pnpm build:worker && pnpm dev:worker",
15-
"e2e-fix": "playwright test -c e2e/playwright.config.ts"
15+
"e2e": "playwright test -c e2e/playwright.config.ts"
1616
},
1717
"dependencies": {
1818
"@opennextjs/cloudflare": "workspace:*",

0 commit comments

Comments
 (0)