Skip to content

Commit 3e179e1

Browse files
author
Luca Forstner
authored
test(e2e): Unflake sveltekit test (#12228)
1 parent 8479698 commit 3e179e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ test.describe('performance events', () => {
185185
});
186186

187187
test('captures a navigation transaction directly after pageload', async ({ page }) => {
188-
await page.goto('/');
189-
190188
const clientPageloadTxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => {
191189
return txnEvent?.contexts?.trace?.op === 'pageload' && txnEvent?.tags?.runtime === 'browser';
192190
});
@@ -195,6 +193,8 @@ test.describe('performance events', () => {
195193
return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser';
196194
});
197195

196+
await page.goto('/');
197+
198198
const navigationClickPromise = page.locator('#routeWithParamsLink').click();
199199

200200
const [pageloadTxnEvent, navigationTxnEvent, _] = await Promise.all([

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ test.describe('performance events', () => {
185185
});
186186

187187
test('captures a navigation transaction directly after pageload', async ({ page }) => {
188-
await page.goto('/');
189-
190188
const clientPageloadTxnPromise = waitForTransaction('sveltekit-2', txnEvent => {
191189
return txnEvent?.contexts?.trace?.op === 'pageload' && txnEvent?.tags?.runtime === 'browser';
192190
});
@@ -195,6 +193,8 @@ test.describe('performance events', () => {
195193
return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser';
196194
});
197195

196+
await page.goto('/');
197+
198198
const navigationClickPromise = page.locator('#routeWithParamsLink').click();
199199

200200
const [pageloadTxnEvent, navigationTxnEvent, _] = await Promise.all([

0 commit comments

Comments
 (0)