Skip to content

Commit 8e349aa

Browse files
authored
test(e2e): Fix sveltekit-2 test timeouts (#11396)
1 parent eb8c57a commit 8e349aa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { waitForInitialPageload } from './utils';
44

55
test.describe('performance events', () => {
66
test('capture a distributed pageload trace', async ({ page }) => {
7-
await page.goto('/users/123xyz');
8-
97
const clientTxnEventPromise = waitForTransaction('sveltekit-2', txnEvent => {
108
return txnEvent?.transaction === '/users/[id]';
119
});
@@ -14,7 +12,8 @@ test.describe('performance events', () => {
1412
return txnEvent?.transaction === 'GET /users/[id]';
1513
});
1614

17-
const [clientTxnEvent, serverTxnEvent, _] = await Promise.all([
15+
const [_, clientTxnEvent, serverTxnEvent] = await Promise.all([
16+
page.goto('/users/123xyz'),
1817
clientTxnEventPromise,
1918
serverTxnEventPromise,
2019
expect(page.getByText('User id: 123xyz')).toBeVisible(),
@@ -56,8 +55,6 @@ test.describe('performance events', () => {
5655
});
5756

5857
test('capture a distributed navigation trace', async ({ page }) => {
59-
await waitForInitialPageload(page);
60-
6158
const clientNavigationTxnEventPromise = waitForTransaction('sveltekit-2', txnEvent => {
6259
return txnEvent?.transaction === '/users' && txnEvent.contexts?.trace?.op === 'navigation';
6360
});
@@ -66,6 +63,8 @@ test.describe('performance events', () => {
6663
return txnEvent?.transaction === 'GET /users';
6764
});
6865

66+
await waitForInitialPageload(page);
67+
6968
// navigation to page
7069
const clickPromise = page.getByText('Route with Server Load').click();
7170

0 commit comments

Comments
 (0)