Skip to content

Commit 92ae4ac

Browse files
committed
skip cdn tests
1 parent 0329858 commit 92ae4ac

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

  • dev-packages/browser-integration-tests
    • suites/tracing/browserTracingIntegration
      • spotlight-interaction-filter-streamed
      • spotlight-interaction-filter
    • utils

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/spotlight-interaction-filter-streamed/test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { expect } from '@playwright/test';
22
import { sentryTest } from '../../../../utils/fixtures';
3-
import { shouldSkipTracingTest } from '../../../../utils/helpers';
3+
import { shouldSkipCdnBundleTest, shouldSkipTracingTest } from '../../../../utils/helpers';
44
import { getSpanOp, observeStreamedSpan, waitForStreamedSpan, waitForStreamedSpans } from '../../../../utils/spanUtils';
55

66
sentryTest(
77
'filters ui.interaction.click spans for spotlight elements via ignoreSpans in streaming mode',
88
async ({ getLocalTestUrl, page }) => {
9-
if (shouldSkipTracingTest()) {
9+
// spotlightBrowserIntegration is not available in CDN bundles
10+
if (shouldSkipTracingTest() || shouldSkipCdnBundleTest()) {
1011
sentryTest.skip();
1112
}
1213

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/spotlight-interaction-filter/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getFirstSentryEnvelopeRequest,
66
getMultipleSentryEnvelopeRequests,
7+
shouldSkipCdnBundleTest,
78
shouldSkipTracingTest,
89
} from '../../../../utils/helpers';
910

1011
sentryTest(
1112
'filters ui.interaction.click spans for spotlight elements via ignoreSpans',
1213
async ({ getLocalTestUrl, page }) => {
13-
if (shouldSkipTracingTest()) {
14+
// spotlightBrowserIntegration is not available in CDN bundles
15+
if (shouldSkipTracingTest() || shouldSkipCdnBundleTest()) {
1416
sentryTest.skip();
1517
}
1618

dev-packages/browser-integration-tests/utils/helpers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,14 @@ export function shouldSkipFeedbackTest(): boolean {
421421
* @returns `true` if we should skip the feature flags test
422422
*/
423423
export function shouldSkipFeatureFlagsTest(): boolean {
424+
return shouldSkipCdnBundleTest();
425+
}
426+
427+
/**
428+
* Returns true if we're running in a CDN bundle environment (not ESM/CJS).
429+
* Use this to skip tests for integrations that are only available via npm, not CDN bundles.
430+
*/
431+
export function shouldSkipCdnBundleTest(): boolean {
424432
const bundle = process.env.PW_BUNDLE;
425433
return bundle != null && !bundle.includes('esm') && !bundle.includes('cjs');
426434
}

0 commit comments

Comments
 (0)