Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ import {
expectedNavigationPerformanceSpan,
getExpectedReplayEvent,
} from '../../../utils/replayEventTemplates';
import type { PerformanceSpan } from '../../../utils/replayHelpers';
import {
getCustomRecordingEvents,
getReplayEvent,
Expand DownExpand Up@@ -68,6 +69,13 @@ sentryTest(
expectedMemoryPerformanceSpan,
]),
);

const lcpSpan = collectedPerformanceSpans.find(
s => s.description === 'largest-contentful-paint',
) as PerformanceSpan;

// LCP spans should be point-in-time spans
expect(lcpSpan?.startTimestamp).toBeCloseTo(lcpSpan?.endTimestamp);
},
);

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/utils/replayHelpers.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import type { Page, Request } from 'playwright';
import { envelopeRequestParser } from './helpers';

type CustomRecordingEvent = { tag: string; payload: Record<string, unknown> };
type PerformanceSpan = {
export type PerformanceSpan = {
op: string;
description: string;
startTimestamp: number;
Expand Down