From b5c4e98a77da0952475b694e9a66ad6c1430fbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 25 Jan 2024 14:36:39 +0300 Subject: [PATCH] Fix TestBrowserOptionsSlowMo dispatch event --- tests/launch_options_slowmo_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/launch_options_slowmo_test.go b/tests/launch_options_slowmo_test.go index 5d6fe312e..42e9402a3 100644 --- a/tests/launch_options_slowmo_test.go +++ b/tests/launch_options_slowmo_test.go @@ -4,7 +4,6 @@ import ( "context" "testing" - "github.com/dop251/goja" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -13,7 +12,6 @@ import ( func TestBrowserOptionsSlowMo(t *testing.T) { t.Parallel() - t.Skip("TODO: fix goja escape") if testing.Short() { t.Skip() @@ -47,7 +45,8 @@ func TestBrowserOptionsSlowMo(t *testing.T) { t.Parallel() tb := newTestBrowser(t, withFileServer()) testPageSlowMoImpl(t, tb, func(_ *testBrowser, p *common.Page) { - p.DispatchEvent("button", "click", goja.Null(), nil) + err := p.DispatchEvent("button", "click", nil, common.NewFrameDispatchEventOptions(p.Timeout())) + require.NoError(t, err) }) }) t.Run("emulateMedia", func(t *testing.T) { @@ -195,7 +194,8 @@ func TestBrowserOptionsSlowMo(t *testing.T) { t.Parallel() tb := newTestBrowser(t, withFileServer()) testFrameSlowMoImpl(t, tb, func(_ *testBrowser, f *common.Frame) { - f.DispatchEvent("button", "click", goja.Null(), nil) + err := f.DispatchEvent("button", "click", nil, common.NewFrameDispatchEventOptions(f.Timeout())) + require.NoError(t, err) }) }) t.Run("evaluate", func(t *testing.T) {