-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(nextjs): Migrate Next SDK's client side tests to Playwright. #6718
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
Conversation
size-limit report 📦
|
73e0c47 to
372d196
Compare
66b1c0c to
46a0403
Compare
9a070d2 to
fb72f5e
Compare
2840a77 to
d5ea798
Compare
d5ea798 to
9ea25b3
Compare
lforst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, these changes seem good to me! 👍
Just saw that @AbhiPrasad merged this but I think I identified some potential flakes we should get rid of.
| page.click('button'), | ||
| getMultipleSentryEnvelopeRequests<Event>(page, 1, { envelopeType: 'event' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential race condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've done this before with no issues:
sentry-javascript/packages/integration-tests/suites/sessions/update-session/test.ts
Line 11 in 59e51bd
| await Promise.all([page.click('#throw-error'), getFirstSentryEnvelopeRequest<SessionContext>(page)]) |
We can adjust this if it is causing flakes.
| await page.waitForTimeout(250); | ||
|
|
||
| const [, events] = await Promise.all([ | ||
| page.click('a#alsoHealthy'), | ||
| getMultipleSentryEnvelopeRequests<Session>(page, 2, { envelopeType: 'session' }), | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential race conditions
| const [, events_2] = await Promise.all([ | ||
| page.click('a#healthy'), | ||
| getMultipleSentryEnvelopeRequests<Session>(page, 2, { envelopeType: 'session' }), | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potential race condition
| page.click('a#server-side-props-page'), | ||
| getMultipleSentryEnvelopeRequests<Transaction>(page, 1, { envelopeType: 'transaction' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential race condition
| page.click('a#initial-props-page'), | ||
| getMultipleSentryEnvelopeRequests<Transaction>(page, 1, { envelopeType: 'transaction' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential race condition
Ref: #6053
This PR migrates NextJS client-side integration tests from Puppeteer to Playwright, removing the dependency on the
puppeteerpackage.countEnvelopesfunction is implemented in our integration-test utilities which gets the number of total envelopes sent in a certain timescale in browser.Will be addressed in other PRs
node-integration-testsutilities.