-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(replay): Test against CDN bundles in Playwright integration tests #6770
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 📦
|
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.
One suggestion, overall looks good to me! 🚀
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.
Nice! Looking good, and ever improving coverage 🎉
98c7072
to
eac2c75
Compare
eac2c75
to
c010750
Compare
Note: Depending on what we merge first, this or #6793, we should also add one integration test checking the browser+tracing+replay bundle! |
Thanks to #6666 we now can inject integration CDN bundles into our Playwright tests. This PR builds on top of #6666 and #6735 to inject the Replay CDN bundle into our integration tests and test against them.
We still can't get rid of the skip condition at the beginning of Replay tests, as we don't have es5 bundles for replay but I think that's fine for the time being.
Furthermore, for this to work properly, Replay has to be imported from
@sentry/replay
. As a result, tests that run against Replay bundles technically don't check that it is continued to be exported via@sentry/browser
. Hence, I copied the basiccaptureReplay
test and left it once untouched, so we still cover importing Replay via@sentry/browser
.In order to test against the minified CDN bundles (which is most important IMO), I had to exclude the
_replay
variable from being mangled from terser in our bundles, as we're trying to accesswindow.Replay._replay
from the test. I'm fine with this change as long as it doesn't significantly blow up our bundle size but happy to look at better suggestions if necessary.closes #6613