Skip to content

Commit abfd01a

Browse files
author
Luca Forstner
authored
1 parent b7cebd1 commit abfd01a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ test.describe('performance events', () => {
193193
return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser';
194194
});
195195

196-
await page.goto('/');
196+
await waitForInitialPageload(page, { route: '/' });
197197

198198
const navigationClickPromise = page.locator('#routeWithParamsLink').click();
199199

@@ -252,8 +252,6 @@ test.describe('performance events', () => {
252252
});
253253

254254
test('captures one navigation transaction per redirect', async ({ page }) => {
255-
await page.goto('/');
256-
257255
const clientNavigationRedirect1TxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => {
258256
return (
259257
txnEvent?.contexts?.trace?.op === 'navigation' &&
@@ -278,6 +276,8 @@ test.describe('performance events', () => {
278276
);
279277
});
280278

279+
await waitForInitialPageload(page, { route: '/' });
280+
281281
const navigationClickPromise = page.locator('#redirectLink').click();
282282

283283
const [redirect1TxnEvent, redirect2TxnEvent, redirect3TxnEvent, _] = await Promise.all([

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ test.describe('performance events', () => {
193193
return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser';
194194
});
195195

196-
await page.goto('/');
196+
await waitForInitialPageload(page, { route: '/' });
197197

198198
const navigationClickPromise = page.locator('#routeWithParamsLink').click();
199199

@@ -252,8 +252,6 @@ test.describe('performance events', () => {
252252
});
253253

254254
test('captures one navigation transaction per redirect', async ({ page }) => {
255-
await page.goto('/');
256-
257255
const clientNavigationRedirect1TxnPromise = waitForTransaction('sveltekit-2', txnEvent => {
258256
return (
259257
txnEvent?.contexts?.trace?.op === 'navigation' &&
@@ -278,6 +276,8 @@ test.describe('performance events', () => {
278276
);
279277
});
280278

279+
await waitForInitialPageload(page, { route: '/' });
280+
281281
const navigationClickPromise = page.locator('#redirectLink').click();
282282

283283
const [redirect1TxnEvent, redirect2TxnEvent, redirect3TxnEvent, _] = await Promise.all([

0 commit comments

Comments
 (0)