test: Refactor utils into @sentry-internal/test-utils#12277
Conversation
| integrations: [Sentry.browserTracingIntegration({})], | ||
| tunnel: `http://localhost:3031/`, // proxy server | ||
| debug: true, | ||
| debug: !!process.env.DEBUG, |
There was a problem hiding this comment.
Made this opt-in everywhere to not pollute logs in regular runs.
There was a problem hiding this comment.
this might break - I think angular isn't smart enough to reason about process.env at build time 😬
But we'll see it anyway in CI 😅
There was a problem hiding this comment.
IIRC I hard-coded the DSN a couple of lines above for the same reason (should have left a comment)
There was a problem hiding this comment.
ah, I see xD well if it break I will remove it :D
There was a problem hiding this comment.
it failed locally as well now, so I removed this - and also added a comment for future us :D
@sentry-internal/test-utils@sentry-internal/test-utils
| { | ||
| name: 'chromium', | ||
| use: { | ||
| // This comes from `devices["Desktop Chrome"] |
There was a problem hiding this comment.
I just inlined this because playwright kept complaining that it was being imported multiple times, and/or there would be version mismatches etc. So now, I simply inlined the values we are using here, which seems simple enough.
| /* Run your local dev server before starting the tests */ | ||
| webServer: [ | ||
| { | ||
| command: `node ${eventProxyFile}`, |
There was a problem hiding this comment.
there is probably some way we can make this event-proxy starting thing more convenient, but it's fine to do this as a followup.
There was a problem hiding this comment.
yeah, agreed, I guess if it is abstracted away this way it is less of a problem at least!
size-limit report 📦
|
Re-use this for playwright config in E2E tests.
Re-use this for playwright config in E2E tests. Now, instead of repeating the whole playwright config, we can import the util from `@sentry-internal/test-utils` and pass it some config. I left the places where do not yet use the proxy, because for simplicity I built the util in a way that assumes the proxy (you can override it, but I figured not worth it for stuff that we will refactor soon anyhow). While at it, I also streamlined the playwright version used everywhere to an up-to-date version.
Re-use this for playwright config in E2E tests. Now, instead of repeating the whole playwright config, we can import the util from `@sentry-internal/test-utils` and pass it some config. I left the places where do not yet use the proxy, because for simplicity I built the util in a way that assumes the proxy (you can override it, but I figured not worth it for stuff that we will refactor soon anyhow). While at it, I also streamlined the playwright version used everywhere to an up-to-date version.
Re-use this for playwright config in E2E tests.
Now, instead of repeating the whole playwright config, we can import the util from
@sentry-internal/test-utilsand pass it some config.I left the places where do not yet use the proxy, because for simplicity I built the util in a way that assumes the proxy (you can override it, but I figured not worth it for stuff that we will refactor soon anyhow).
While at it, I also streamlined the playwright version used everywhere to an up-to-date version.