From 4f36077561667d0f33ac9f3925c4e89abbd18ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 31 Aug 2023 14:10:10 +0300 Subject: [PATCH] Fix TestWebVitalMetricNoInteraction --- tests/webvital_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/webvital_test.go b/tests/webvital_test.go index 8da961ed8..3e80cb35e 100644 --- a/tests/webvital_test.go +++ b/tests/webvital_test.go @@ -112,7 +112,13 @@ func TestWebVitalMetricNoInteraction(t *testing.T) { }() page := browser.NewPage(nil) - resp, err := page.Goto(browser.staticURL("/web_vitals.html"), nil) + resp, err := page.Goto( + browser.staticURL("web_vitals.html"), + browser.toGojaValue(map[string]any{ + // wait until the page is completely loaded. + "waitUntil": "networkidle", + }), + ) require.NoError(t, err) require.NotNil(t, resp)