From 44bb475c2a73b19f205f9fb95c9b5e59eecd0c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 21 Oct 2024 11:39:13 -0400 Subject: [PATCH] Add TestSetDownloadsPath.non_empty_path --- common/browser_context_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/browser_context_test.go b/common/browser_context_test.go index fcd4c78fc..7203b191c 100644 --- a/common/browser_context_test.go +++ b/common/browser_context_test.go @@ -59,6 +59,14 @@ func TestSetDownloadsPath(t *testing.T) { assert.Contains(t, bc.DownloadsPath, artifactsDirectory) assert.DirExists(t, bc.DownloadsPath) }) + t.Run("non_empty_path", func(t *testing.T) { + t.Parallel() + + var bc BrowserContext + path := "/my/directory" + require.NoError(t, bc.setDownloadsPath(path)) + assert.Equal(t, path, bc.DownloadsPath) + }) } func TestFilterCookies(t *testing.T) {