Skip to content

Commit 361fbf3

Browse files
authored
test(nextjs): Unskip blocked cf tests (#20356)
This was broken and blocked upstream. closes #19485
1 parent 104b64e commit 361fbf3

File tree

6 files changed

+16
-24
lines changed

6 files changed

+16
-24
lines changed

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
{
4444
"build-command": "pnpm test:build-latest",
4545
"label": "nextjs-16-cf-workers (latest)"
46+
},
47+
{
48+
"build-command": "pnpm test:build-canary",
49+
"label": "nextjs-16-cf-workers (canary)"
4650
}
4751
]
4852
}

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/cloudflare-runtime.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError } from '@sentry-internal/test-utils';
33

4-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5-
test.describe.skip('Cloudflare Runtime', () => {
4+
test.describe('Cloudflare Runtime', () => {
65
test('Should report cloudflare as the runtime in API route error events', async ({ request }) => {
76
const errorEventPromise = waitForError('nextjs-16-cf-workers', errorEvent => {
87
return !!errorEvent?.exception?.values?.some(value =>

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/isr-routes.test.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

4-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5-
test.skip('should remove sentry-trace and baggage meta tags on ISR dynamic route page load', async ({ page }) => {
4+
test('should remove sentry-trace and baggage meta tags on ISR dynamic route page load', async ({ page }) => {
65
// Navigate to ISR page
76
await page.goto('/isr-test/laptop');
87

@@ -14,8 +13,7 @@ test.skip('should remove sentry-trace and baggage meta tags on ISR dynamic route
1413
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
1514
});
1615

17-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
18-
test.skip('should remove sentry-trace and baggage meta tags on ISR static route', async ({ page }) => {
16+
test('should remove sentry-trace and baggage meta tags on ISR static route', async ({ page }) => {
1917
// Navigate to ISR static page
2018
await page.goto('/isr-test/static');
2119

@@ -27,8 +25,7 @@ test.skip('should remove sentry-trace and baggage meta tags on ISR static route'
2725
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
2826
});
2927

30-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
31-
test.skip('should remove meta tags for different ISR dynamic route values', async ({ page }) => {
28+
test('should remove meta tags for different ISR dynamic route values', async ({ page }) => {
3229
// Test with 'phone' (one of the pre-generated static params)
3330
await page.goto('/isr-test/phone');
3431
await expect(page.locator('#isr-product-id')).toHaveText('phone');
@@ -44,8 +41,7 @@ test.skip('should remove meta tags for different ISR dynamic route values', asyn
4441
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
4542
});
4643

47-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
48-
test.skip('should create unique transactions for ISR pages on each visit', async ({ page }) => {
44+
test('should create unique transactions for ISR pages on each visit', async ({ page }) => {
4945
const traceIds: string[] = [];
5046

5147
// Load the same ISR page 5 times to ensure cached HTML meta tags are consistently removed
@@ -75,8 +71,7 @@ test.skip('should create unique transactions for ISR pages on each visit', async
7571
expect(uniqueTraceIds.size).toBe(5);
7672
});
7773

78-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
79-
test.skip('ISR route should be identified correctly in the route manifest', async ({ page }) => {
74+
test('ISR route should be identified correctly in the route manifest', async ({ page }) => {
8075
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
8176
return transactionEvent.transaction === '/isr-test/:product' && transactionEvent.contexts?.trace?.op === 'pageload';
8277
});

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/parameterized-routes.test.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

4-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5-
test.skip('should create a parameterized transaction when the `app` directory is used', async ({ page }) => {
4+
test('should create a parameterized transaction when the `app` directory is used', async ({ page }) => {
65
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
76
return (
87
transactionEvent.transaction === '/parameterized/:one' && transactionEvent.contexts?.trace?.op === 'pageload'
@@ -41,8 +40,7 @@ test.skip('should create a parameterized transaction when the `app` directory is
4140
});
4241
});
4342

44-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
45-
test.skip('should create a static transaction when the `app` directory is used and the route is not parameterized', async ({
43+
test('should create a static transaction when the `app` directory is used and the route is not parameterized', async ({
4644
page,
4745
}) => {
4846
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
@@ -83,8 +81,7 @@ test.skip('should create a static transaction when the `app` directory is used a
8381
});
8482
});
8583

86-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
87-
test.skip('should create a partially parameterized transaction when the `app` directory is used', async ({ page }) => {
84+
test('should create a partially parameterized transaction when the `app` directory is used', async ({ page }) => {
8885
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
8986
return (
9087
transactionEvent.transaction === '/parameterized/:one/beep' && transactionEvent.contexts?.trace?.op === 'pageload'
@@ -123,8 +120,7 @@ test.skip('should create a partially parameterized transaction when the `app` di
123120
});
124121
});
125122

126-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
127-
test.skip('should create a nested parameterized transaction when the `app` directory is used.', async ({ page }) => {
123+
test('should create a nested parameterized transaction when the `app` directory is used.', async ({ page }) => {
128124
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
129125
return (
130126
transactionEvent.transaction === '/parameterized/:one/beep/:two' &&

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/prefetch-spans.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33
import { isDevMode } from './isDevMode';
44

5-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
6-
test.skip('Prefetch client spans should have a http.request.prefetch attribute', async ({ page }) => {
5+
test('Prefetch client spans should have a http.request.prefetch attribute', async ({ page }) => {
76
test.skip(isDevMode, "Prefetch requests don't have the prefetch header in dev mode");
87

98
const pageloadTransactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/streaming-rsc-error.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33

4-
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5-
test.skip('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
4+
test('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
65
page,
76
}) => {
87
const errorEventPromise = waitForError('nextjs-16-cf-workers', errorEvent => {

0 commit comments

Comments
 (0)