File tree Expand file tree Collapse file tree 4 files changed +26
-16
lines changed
dev-packages/browser-integration-tests Expand file tree Collapse file tree 4 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
22import type { LogEnvelope } from '@sentry/core' ;
33import { sentryTest } from '../../../../utils/fixtures' ;
4- import { getFirstSentryEnvelopeRequest , properFullEnvelopeRequestParser } from '../../../../utils/helpers' ;
4+ import {
5+ getFirstSentryEnvelopeRequest ,
6+ properFullEnvelopeRequestParser ,
7+ testingCdnBundle ,
8+ } from '../../../../utils/helpers' ;
59
610sentryTest ( 'should capture console object calls' , async ( { getLocalTestUrl, page } ) => {
7- const bundle = process . env . PW_BUNDLE || '' ;
811 // Only run this for npm package exports
9- if ( bundle . startsWith ( 'bundle' ) || bundle . startsWith ( 'loader' ) ) {
10- sentryTest . skip ( ) ;
11- }
12+ sentryTest . skip ( testingCdnBundle ( ) ) ;
1213
1314 const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
1415
Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
22import type { LogEnvelope } from '@sentry/core' ;
33import { sentryTest } from '../../../../utils/fixtures' ;
4- import { getFirstSentryEnvelopeRequest , properFullEnvelopeRequestParser } from '../../../../utils/helpers' ;
4+ import {
5+ getFirstSentryEnvelopeRequest ,
6+ properFullEnvelopeRequestParser ,
7+ testingCdnBundle ,
8+ } from '../../../../utils/helpers' ;
59
610sentryTest ( 'captures logs with scope attributes' , async ( { getLocalTestUrl, page } ) => {
7- const bundle = process . env . PW_BUNDLE || '' ;
8- // Only run this for npm package exports
9- if ( bundle . startsWith ( 'bundle' ) || bundle . startsWith ( 'loader' ) ) {
10- sentryTest . skip ( ) ;
11- }
11+ sentryTest . skip ( testingCdnBundle ( ) ) ;
1212
1313 const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
1414
Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
22import type { LogEnvelope } from '@sentry/core' ;
33import { sentryTest } from '../../../../utils/fixtures' ;
4- import { getFirstSentryEnvelopeRequest , properFullEnvelopeRequestParser } from '../../../../utils/helpers' ;
4+ import {
5+ getFirstSentryEnvelopeRequest ,
6+ properFullEnvelopeRequestParser ,
7+ testingCdnBundle ,
8+ } from '../../../../utils/helpers' ;
59
610sentryTest ( 'should capture all logging methods' , async ( { getLocalTestUrl, page } ) => {
7- const bundle = process . env . PW_BUNDLE || '' ;
811 // Only run this for npm package exports
9- if ( bundle . startsWith ( 'bundle' ) || bundle . startsWith ( 'loader' ) ) {
10- sentryTest . skip ( ) ;
11- }
12+ sentryTest . skip ( testingCdnBundle ( ) ) ;
1213
1314 const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
1415
Original file line number Diff line number Diff line change @@ -314,6 +314,14 @@ export function shouldSkipTracingTest(): boolean {
314314 return bundle != null && ! bundle . includes ( 'tracing' ) && ! bundle . includes ( 'esm' ) && ! bundle . includes ( 'cjs' ) ;
315315}
316316
317+ /**
318+ * @returns `true` if we are testing a CDN bundle
319+ */
320+ export function testingCdnBundle ( ) : boolean {
321+ const bundle = process . env . PW_BUNDLE ;
322+ return bundle != null && ( bundle . startsWith ( 'bundle' ) || bundle . startsWith ( 'loader' ) ) ;
323+ }
324+
317325/**
318326 * Today we always run feedback tests, but this can be used to guard this if we ever need to.
319327 */
You can’t perform that action at this time.
0 commit comments