Skip to content

Commit

Permalink
Extend browser launch options test for cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Nov 7, 2022
1 parent f933c5e commit 8bef8b9
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions common/browser_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,38 @@ func TestBrowserLaunchOptionsParse(t *testing.T) {
"defaults_on_cloud": {
onCloud: true,
opts: map[string]any{
// disallow changing the following opts
"headless": false,
"devtools": true,
"executablePath": "something else",
// allow changing the following opts
"args": []string{"any"},
"debug": true,
"env": map[string]string{"some": "thing"},
"ignoreDefaultArgs": []string{"any"},
"logCategoryFilter": "...",
"proxy": ProxyOptions{Server: "srv"},
"slowMo": time.Second,
"timeout": time.Second,
},
assert: func(tb testing.TB, lo *LaunchOptions) {
tb.Helper()
assert.Equal(t, &LaunchOptions{
Env: make(map[string]string),
Headless: true,
LogCategoryFilter: ".*",
Timeout: DefaultTimeout,
onCloud: true,
// disallowed:
Headless: true,
Devtools: false,
ExecutablePath: "",
// allowed:
Args: []string{"any"},
Debug: true,
Env: map[string]string{"some": "thing"},
IgnoreDefaultArgs: []string{"any"},
LogCategoryFilter: "...",
Proxy: ProxyOptions{Server: "srv"},
SlowMo: time.Second,
Timeout: time.Second,

onCloud: true,
}, lo)
},
},
Expand Down

0 comments on commit 8bef8b9

Please sign in to comment.