Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 8, 2024

Both SvelteKit e2e test apps have a flaky test that checks for a client-side error to be caught by the SDK. Looks like Kit hydration takes too long in the Playwright env to kick in, leading to our test clicking the error-triggering button before the onclick handler code is registered.

The PR attempts to fix the the flakiness by awaiting the initial pageload, meaning we await

  • going to the specified route
  • a custom hydration flag being set
  • the pageload transaction being sent

This will prolong the test for a couple of ms but I think that's acceptable.

@Lms24 Lms24 requested a review from lforst April 8, 2024 08:57
@Lms24 Lms24 merged commit 6eddfc9 into develop Apr 8, 2024
@Lms24 Lms24 deleted the lms/test-e2e-sveltekit-waitForInitialPageload branch April 8, 2024 09:07
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
…on (getsentry#11469)

Attempt to fix the Kit test flakiness by awaiting the initial
pageload and hydration, meaning we await
- going to the specified route
- a custom hydration flag being set
- the pageload transaction being sent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants