Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 8bef8b9

Browse files
committed
Extend browser launch options test for cloud
1 parent f933c5e commit 8bef8b9

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

common/browser_options_test.go

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,38 @@ func TestBrowserLaunchOptionsParse(t *testing.T) {
3535
"defaults_on_cloud": {
3636
onCloud: true,
3737
opts: map[string]any{
38+
// disallow changing the following opts
3839
"headless": false,
3940
"devtools": true,
4041
"executablePath": "something else",
42+
// allow changing the following opts
43+
"args": []string{"any"},
44+
"debug": true,
45+
"env": map[string]string{"some": "thing"},
46+
"ignoreDefaultArgs": []string{"any"},
47+
"logCategoryFilter": "...",
48+
"proxy": ProxyOptions{Server: "srv"},
49+
"slowMo": time.Second,
50+
"timeout": time.Second,
4151
},
4252
assert: func(tb testing.TB, lo *LaunchOptions) {
4353
tb.Helper()
4454
assert.Equal(t, &LaunchOptions{
45-
Env: make(map[string]string),
46-
Headless: true,
47-
LogCategoryFilter: ".*",
48-
Timeout: DefaultTimeout,
49-
onCloud: true,
55+
// disallowed:
56+
Headless: true,
57+
Devtools: false,
58+
ExecutablePath: "",
59+
// allowed:
60+
Args: []string{"any"},
61+
Debug: true,
62+
Env: map[string]string{"some": "thing"},
63+
IgnoreDefaultArgs: []string{"any"},
64+
LogCategoryFilter: "...",
65+
Proxy: ProxyOptions{Server: "srv"},
66+
SlowMo: time.Second,
67+
Timeout: time.Second,
68+
69+
onCloud: true,
5070
}, lo)
5171
},
5272
},

0 commit comments

Comments
 (0)