From d21e71e34737534e9e7f125ef68e068912d1831e Mon Sep 17 00:00:00 2001 From: Catherine Lee <55311782+c298lee@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:09:10 -0400 Subject: [PATCH] add inp test to customEvents --- .../suites/replay/customEvents/test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts index 053c31c3881e..134e0f71fb95 100644 --- a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts @@ -7,6 +7,7 @@ import { expectedFCPPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, + expectedINPPerformanceSpan, expectedLCPPerformanceSpan, expectedMemoryPerformanceSpan, expectedNavigationPerformanceSpan, @@ -51,6 +52,13 @@ sentryTest( await page.locator('#img-button').click(); + // Page hide to trigger INP + await page.evaluate(() => { + window.dispatchEvent(new Event('pagehide')); + }); + + await page.waitForTimeout(500); + const replayEvent1 = getReplayEvent(await reqPromise1); const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(await reqPromise1); @@ -66,6 +74,7 @@ sentryTest( expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, expectedFIDPerformanceSpan, + expectedINPPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, expectedMemoryPerformanceSpan, // two memory spans - once per flush