Skip to content

Commit d21e71e

Browse files
committed
add inp test to customEvents
1 parent 136f496 commit d21e71e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • dev-packages/browser-integration-tests/suites/replay/customEvents

dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
expectedFCPPerformanceSpan,
88
expectedFIDPerformanceSpan,
99
expectedFPPerformanceSpan,
10+
expectedINPPerformanceSpan,
1011
expectedLCPPerformanceSpan,
1112
expectedMemoryPerformanceSpan,
1213
expectedNavigationPerformanceSpan,
@@ -51,6 +52,13 @@ sentryTest(
5152

5253
await page.locator('#img-button').click();
5354

55+
// Page hide to trigger INP
56+
await page.evaluate(() => {
57+
window.dispatchEvent(new Event('pagehide'));
58+
});
59+
60+
await page.waitForTimeout(500);
61+
5462
const replayEvent1 = getReplayEvent(await reqPromise1);
5563
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(await reqPromise1);
5664

@@ -66,6 +74,7 @@ sentryTest(
6674
expectedLCPPerformanceSpan,
6775
expectedCLSPerformanceSpan,
6876
expectedFIDPerformanceSpan,
77+
expectedINPPerformanceSpan,
6978
expectedFPPerformanceSpan,
7079
expectedFCPPerformanceSpan,
7180
expectedMemoryPerformanceSpan, // two memory spans - once per flush

0 commit comments

Comments
 (0)