Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-playwright-web-spd
Commits
e2785215
Commit
e2785215
authored
Sep 15, 2026
by
liguangyu06
Browse files
Use installed Chrome when PLAYWRIGHT_CHANNEL=chrome on intranet Jenkins.
parent
df35e221
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/browser.config.ts
View file @
e2785215
...
...
@@ -4,9 +4,13 @@ import './load-env';
import
{
resolveRetries
}
from
'
./ci.config
'
;
import
{
timeouts
}
from
'
./timeouts.config
'
;
/** 内网 Jenkins 无法下载官方 Chromium 时,设 PLAYWRIGHT_CHANNEL=chrome 使用本机 Chrome。 */
const
channel
=
(
process
.
env
.
PLAYWRIGHT_CHANNEL
||
''
).
trim
();
/** 与 playwright.config.ts 的 use 互补:截图、trace、视口。 */
export
const
browserUse
:
PlaywrightTestConfig
[
'
use
'
]
=
{
...
devices
[
'
Desktop Chrome
'
],
...(
channel
?
{
channel
}
:
{}),
launchOptions
:
{
...(
process
.
env
.
SLOW_MO
?
{
slowMo
:
Number
(
process
.
env
.
SLOW_MO
)
}
:
{}),
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment