Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { waitForInitialPageload } from './utils';

test.describe('performance events', () => {
test('capture a distributed pageload trace', async ({ page }) => {
await page.goto('/users/123xyz');

const clientTxnEventPromise = waitForTransaction('sveltekit-2', txnEvent => {
return txnEvent?.transaction === '/users/[id]';
});
Expand All @@ -14,7 +12,8 @@ test.describe('performance events', () => {
return txnEvent?.transaction === 'GET /users/[id]';
});

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

test('capture a distributed navigation trace', async ({ page }) => {
await waitForInitialPageload(page);

const clientNavigationTxnEventPromise = waitForTransaction('sveltekit-2', txnEvent => {
return txnEvent?.transaction === '/users' && txnEvent.contexts?.trace?.op === 'navigation';
});
Expand All @@ -66,6 +63,8 @@ test.describe('performance events', () => {
return txnEvent?.transaction === 'GET /users';
});

await waitForInitialPageload(page);

// navigation to page
const clickPromise = page.getByText('Route with Server Load').click();

Expand Down