-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
dev-packages/e2e-tests/test-applications/nextjs-13/app/prefetchable-page/loading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function Page() { | ||
return <p>loading</p>; | ||
} | ||
|
||
export async function generateMetadata() { | ||
const res = (await fetch('http://example.com/')).text(); | ||
|
||
return { | ||
title: res, | ||
}; | ||
} |
15 changes: 15 additions & 0 deletions
15
dev-packages/e2e-tests/test-applications/nextjs-13/app/prefetchable-page/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export const dynamic = 'force-dynamic'; | ||
|
||
export default async function Page() { | ||
await new Promise(resolve => setTimeout(resolve, 100)); | ||
await (await fetch('http://example.com/', { cache: 'no-cache' })).text(); | ||
return <p>hello</p>; | ||
} | ||
|
||
export async function generateMetadata() { | ||
const res = (await fetch('http://example.com/')).text(); | ||
|
||
return { | ||
title: res, | ||
}; | ||
} |
14 changes: 14 additions & 0 deletions
14
dev-packages/e2e-tests/test-applications/nextjs-13/tests/isomorphic/prefetch-tracing.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { waitForTransaction } from '@sentry-internal/test-utils'; | ||
|
||
test('Should capture transactions with `http.server.prefetch` op for prefetch traces', async ({ page }) => { | ||
const serverPrefetchTransactionPromise = waitForTransaction('nextjs-13', async transactionEvent => { | ||
console.log('t', transactionEvent.transaction); | ||
return transactionEvent?.transaction === 'GET /prefetchable-page'; | ||
}); | ||
|
||
await page.goto(`/page-with-prefetch`); | ||
|
||
const serverPrefetchTransaction = await serverPrefetchTransactionPromise; | ||
expect(serverPrefetchTransaction.contexts?.trace?.op).toBe('http.server.prefetch'); | ||
}); |
3 changes: 0 additions & 3 deletions
3
dev-packages/e2e-tests/test-applications/nextjs-15/app/prefetchable-page/page.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
dev-packages/e2e-tests/test-applications/nextjs-15/tests/prefetch-tracing.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters