Commit 56b9171
feat(platform-web): expose ignoreDefaultArgs in browser config (#119)
## Summary
- Adds `ignoreDefaultArgs` to `WebBrowserConfigSchema`, accepting either
`boolean` or `string[]` to match Playwright's
[`LaunchOptions.ignoreDefaultArgs`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-ignore-default-args).
- Forwards the value into `browserType.launch()` in the web runner so
users can disable Playwright's defaults (e.g. drop
`--enable-automation`) or strip individual default args without having
to fork the runner.
## Motivation
Some test setups need to disable specific Playwright defaults (for
example to keep `--enable-automation` off so DRM / EME stacks behave the
same way they do in a real browser, or to opt out of Playwright's
headless-shell args). Without this option the only workaround is to wrap
the platform and re-implement the launch flow.
## Test plan
- [x] `nx run @react-native-harness/platform-web:typecheck` passes
- [ ] Run a web target with `ignoreDefaultArgs: true` and confirm the
browser launches without Playwright's defaults
- [ ] Run a web target with `ignoreDefaultArgs: ['--enable-automation']`
and confirm only that flag is stripped
---------
Co-authored-by: Szymon Chmal <szymon@chmal.it>1 parent bee4691 commit 56b9171
5 files changed
Lines changed: 10 additions & 0 deletions
File tree
- .nx/version-plans
- packages/platform-web/src
- website/src/docs
- getting-started
- platforms
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
0 commit comments