Skip to content

Commit 049f2a2

Browse files
logaretmclaude
andcommitted
fix(tests): Drop measurements expectations and skip web-vital tests blocked on streaming
- Remove `measurements: expect.any(Object)` lines from e2e pageload tests (not web-vital-specific, just incidentally checked the field). - Skip e2e INP tests in react-17, react-router-6, react-router-7-spa (TODO v11). They relied on the v1 standalone INP envelope path; without span streaming enabled, INP isn't emitted as a separate envelope item. - Skip browser-integration LCP/CLS suites (web-vitals-lcp, web-vitals-cls, handlers-lcp, web-vitals "paint vs TTFB"). These vitals fire at pagehide, after the pageload transaction has already converted in static mode, so the signal isn't captured. The `-streamed-spans` siblings cover the supported flow. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 48171a3 commit 049f2a2

19 files changed

Lines changed: 21 additions & 26 deletions

File tree

dev-packages/browser-integration-tests/suites/tracing/metrics/handlers-lcp/test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
66

77
const bundle = process.env.PW_BUNDLE || '';
88

9-
sentryTest(
9+
// TODO(v11): re-enable once span streaming is the default — see web-vitals-lcp/test.ts.
10+
sentryTest.skip(
1011
'should capture metrics for LCP instrumentation handlers',
1112
async ({ browserName, getLocalTestUrl, page }) => {
1213
// This uses a utility that is not exported in CDN bundles

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ function getClsAttrs(eventData: Event): Record<string, unknown> {
1717
return clsSpan?.data ?? {};
1818
}
1919

20-
sentryTest('should capture a "GOOD" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
20+
// TODO(v11): re-enable once span streaming is the default — see web-vitals-lcp/test.ts.
21+
sentryTest.skip('should capture a "GOOD" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
2122
const url = await getLocalTestUrl({ testDir: __dirname });
2223
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, `${url}#0.05`);
2324

@@ -31,7 +32,8 @@ sentryTest('should capture a "GOOD" CLS vital with its source(s).', async ({ get
3132
expect(clsAttrs['browser.web_vital.cls.source.1']).toBe('body > div#content > p#partial');
3233
});
3334

34-
sentryTest('should capture a "MEH" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
35+
// TODO(v11): re-enable once span streaming is the default — see web-vitals-lcp/test.ts.
36+
sentryTest.skip('should capture a "MEH" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
3537
const url = await getLocalTestUrl({ testDir: __dirname });
3638
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, `${url}#0.21`);
3739

@@ -45,7 +47,8 @@ sentryTest('should capture a "MEH" CLS vital with its source(s).', async ({ getL
4547
expect(clsAttrs['browser.web_vital.cls.source.1']).toBe('body > div#content > p');
4648
});
4749

48-
sentryTest('should capture a "POOR" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
50+
// TODO(v11): re-enable once span streaming is the default — see web-vitals-lcp/test.ts.
51+
sentryTest.skip('should capture a "POOR" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => {
4952
const url = await getLocalTestUrl({ testDir: __dirname });
5053
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, `${url}#0.35`);
5154

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import type { Event } from '@sentry/core';
44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
66

7-
sentryTest('captures LCP vitals with element details', async ({ browserName, getLocalTestUrl, page }) => {
7+
// TODO(v11): re-enable once span streaming is the default — LCP fires at pagehide,
8+
// after the pageload transaction has already converted, so the LCP signal isn't
9+
// captured in static mode. The `web-vitals-lcp-streamed-spans` suite covers the
10+
// supported (streamed) flow.
11+
sentryTest.skip('captures LCP vitals with element details', async ({ browserName, getLocalTestUrl, page }) => {
812
if (shouldSkipTracingTest() || browserName !== 'chromium') {
913
sentryTest.skip();
1014
}

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
1111
* The problem is: We don't always get valid TTFB from the web-vitals library, so we skip the test if that's the case.
1212
* Note: There is another test that covers that we actually report TTFB if it is valid (@see ../web-vitals-lcp/test.ts).
1313
*/
14-
sentryTest('paint web vitals values are greater than TTFB', async ({ browserName, getLocalTestUrl, page }) => {
14+
// TODO(v11): re-enable once span streaming is the default — LCP isn't captured in static mode.
15+
sentryTest.skip('paint web vitals values are greater than TTFB', async ({ browserName, getLocalTestUrl, page }) => {
1516
// Only run in chromium to ensure all vitals are present
1617
if (shouldSkipTracingTest() || browserName !== 'chromium') {
1718
sentryTest.skip();

dev-packages/e2e-tests/test-applications/astro-4/tests/tracing.dynamic.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
4242
},
4343
environment: 'qa',
4444
event_id: expect.stringMatching(/[a-f0-9]{32}/),
45-
measurements: expect.any(Object),
4645
platform: 'javascript',
4746
request: expect.any(Object),
4847
sdk: {

dev-packages/e2e-tests/test-applications/astro-5/tests/tracing.dynamic.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
4242
},
4343
environment: 'qa',
4444
event_id: expect.stringMatching(/[a-f0-9]{32}/),
45-
measurements: expect.any(Object),
4645
platform: 'javascript',
4746
request: expect.any(Object),
4847
sdk: {

dev-packages/e2e-tests/test-applications/astro-6-cf-workers/tests/tracing.dynamic.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
4242
},
4343
environment: 'qa',
4444
event_id: expect.stringMatching(/[a-f0-9]{32}/),
45-
measurements: expect.any(Object),
4645
platform: 'javascript',
4746
request: expect.any(Object),
4847
sdk: {

dev-packages/e2e-tests/test-applications/astro-6/tests/tracing.dynamic.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
4242
},
4343
environment: 'qa',
4444
event_id: expect.stringMatching(/[a-f0-9]{32}/),
45-
measurements: expect.any(Object),
4645
platform: 'javascript',
4746
request: expect.any(Object),
4847
sdk: {

dev-packages/e2e-tests/test-applications/default-browser/tests/performance.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ test('captures a pageload transaction', async ({ page }) => {
2828
},
2929
environment: 'qa',
3030
event_id: expect.stringMatching(/[a-f0-9]{32}/),
31-
measurements: expect.any(Object),
3231
platform: 'javascript',
3332
release: 'e2e-test',
3433
request: {

dev-packages/e2e-tests/test-applications/effect-3-browser/tests/transactions.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ test('captures a pageload transaction', async ({ page }) => {
2828
},
2929
environment: 'qa',
3030
event_id: expect.stringMatching(/[a-f0-9]{32}/),
31-
measurements: expect.any(Object),
3231
platform: 'javascript',
3332
release: 'e2e-test',
3433
request: {

0 commit comments

Comments
 (0)