Skip to content

Commit eb8c57a

Browse files
author
Luca Forstner
authored
test(e2e): Attempt to fix sveltekit timeouts (#11394)
1 parent 4085728 commit eb8c57a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev-packages/e2e-tests/test-applications/sveltekit/test/performance.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ test('sends a pageload transaction', async ({ page }) => {
2626
});
2727

2828
test('captures a distributed pageload trace', async ({ page }) => {
29-
await page.goto('/users/123xyz');
30-
3129
const clientTxnEventPromise = waitForTransaction('sveltekit', txnEvent => {
3230
return txnEvent?.transaction === '/users/[id]';
3331
});
@@ -36,6 +34,8 @@ test('captures a distributed pageload trace', async ({ page }) => {
3634
return txnEvent?.transaction === 'GET /users/[id]';
3735
});
3836

37+
await page.goto('/users/123xyz');
38+
3939
const [clientTxnEvent, serverTxnEvent] = await Promise.all([clientTxnEventPromise, serverTxnEventPromise]);
4040

4141
expect(clientTxnEvent).toMatchObject({
@@ -71,8 +71,6 @@ test('captures a distributed pageload trace', async ({ page }) => {
7171
});
7272

7373
test('captures a distributed navigation trace', async ({ page }) => {
74-
await waitForInitialPageload(page);
75-
7674
const clientNavigationTxnEventPromise = waitForTransaction('sveltekit', txnEvent => {
7775
return txnEvent?.transaction === '/users/[id]';
7876
});
@@ -81,6 +79,8 @@ test('captures a distributed navigation trace', async ({ page }) => {
8179
return txnEvent?.transaction === 'GET /users/[id]';
8280
});
8381

82+
await waitForInitialPageload(page);
83+
8484
// navigation to page
8585
const clickPromise = page.getByText('Route with Params').click();
8686

0 commit comments

Comments
 (0)