From 6329ffdfdbbb2fc0efbfefdf4bc88e46df87380d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Tue, 1 Jun 2021 15:48:33 +0200 Subject: [PATCH] Add 100ms between navigation events to capture some duration between events --- .../nextjs/test/integration/test/browser/sessionNavigate.js | 6 +++++- .../nextjs/test/integration/test/browser/tracingNavigate.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/test/integration/test/browser/sessionNavigate.js b/packages/nextjs/test/integration/test/browser/sessionNavigate.js index 6b7796ae767c..954e94ef5bb0 100644 --- a/packages/nextjs/test/integration/test/browser/sessionNavigate.js +++ b/packages/nextjs/test/integration/test/browser/sessionNavigate.js @@ -1,4 +1,4 @@ -const { expectRequestCount, waitForAll, isSessionRequest, expectSession } = require('../utils'); +const { expectRequestCount, waitForAll, isSessionRequest, expectSession, sleep } = require('../utils'); module.exports = async ({ page, url, requests }) => { await waitForAll([page.goto(`${url}/healthy`), page.waitForRequest(isSessionRequest)]); @@ -9,6 +9,8 @@ module.exports = async ({ page, url, requests }) => { errors: 0, }); + await sleep(100); + await waitForAll([ page.click('a#alsoHealthy'), page.waitForRequest(isSessionRequest), @@ -27,6 +29,8 @@ module.exports = async ({ page, url, requests }) => { errors: 0, }); + await sleep(100); + await waitForAll([ page.click('a#healthy'), page.waitForRequest(isSessionRequest), diff --git a/packages/nextjs/test/integration/test/browser/tracingNavigate.js b/packages/nextjs/test/integration/test/browser/tracingNavigate.js index 8753d831eec9..8f89c869c9d7 100644 --- a/packages/nextjs/test/integration/test/browser/tracingNavigate.js +++ b/packages/nextjs/test/integration/test/browser/tracingNavigate.js @@ -15,6 +15,7 @@ module.exports = async ({ page, url, requests }) => { }); await sleep(100); + await page.click('a#alsoHealthy'); await page.waitForRequest(isTransactionRequest); @@ -32,6 +33,7 @@ module.exports = async ({ page, url, requests }) => { }); await sleep(100); + await page.click('a#healthy'); await page.waitForRequest(isTransactionRequest);