Skip to content

test(e2e): Attempt to fix sveltekit timeouts #11394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2024
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 @@ -26,8 +26,6 @@ test('sends a pageload transaction', async ({ page }) => {
});

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

const clientTxnEventPromise = waitForTransaction('sveltekit', txnEvent => {
return txnEvent?.transaction === '/users/[id]';
});
Expand All @@ -36,6 +34,8 @@ test('captures a distributed pageload trace', async ({ page }) => {
return txnEvent?.transaction === 'GET /users/[id]';
});

await page.goto('/users/123xyz');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add this to the Promise.all array underneath?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine honestly.


const [clientTxnEvent, serverTxnEvent] = await Promise.all([clientTxnEventPromise, serverTxnEventPromise]);

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

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

const clientNavigationTxnEventPromise = waitForTransaction('sveltekit', txnEvent => {
return txnEvent?.transaction === '/users/[id]';
});
Expand All @@ -81,6 +79,8 @@ test('captures a distributed navigation trace', async ({ page }) => {
return txnEvent?.transaction === 'GET /users/[id]';
});

await waitForInitialPageload(page);

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

Expand Down