Skip to content

fix: merge proxy into project-level contextOptions#315

Merged
mayank-at-sauce merged 1 commit intomainfrom
fix/merge-project-level-context-options
Mar 2, 2026
Merged

fix: merge proxy into project-level contextOptions#315
mayank-at-sauce merged 1 commit intomainfrom
fix/merge-project-level-context-options

Conversation

@anupam-sl
Copy link
Contributor

@anupam-sl anupam-sl commented Feb 18, 2026

Summary

  • When a Playwright project defines its own use.contextOptions (e.g. { reducedMotion: 'reduce' }), Playwright replaces the root-level contextOptions entirely instead of deep-merging them
  • This causes the SC tunnel proxy settings injected by the runner to be lost, resulting in getaddrinfo ENOTFOUND errors for scripted requests
  • This fix iterates over all user-defined projects and merges proxy/ignoreHTTPSErrors into each project's contextOptions, so both the user's settings and the proxy coexist

Fixes INT-11

Test plan

  • Verify existing tests pass (npm test)
  • Test with a Playwright config that defines contextOptions at the project level (e.g. reducedMotion: 'reduce') and confirm the SC tunnel proxy is preserved
  • Test with a Playwright config that defines contextOptions only at the root level (existing behavior, should be unchanged)
  • Test with a Playwright config that has no contextOptions at all (existing behavior, should be unchanged)

@anupam-sl anupam-sl requested a review from a team as a code owner February 18, 2026 11:29
Playwright resolves project config by replacing root-level `use`
properties with project-level ones. When a project defines its own
`use.contextOptions` (e.g. reducedMotion), it completely overrides
the root-level contextOptions — losing the SC tunnel proxy settings
and causing scripted requests to fail with ENOTFOUND.

This iterates over user-defined projects and merges proxy settings
into each project's contextOptions so both coexist.

Fixes INT-11

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mayank-at-sauce mayank-at-sauce force-pushed the fix/merge-project-level-context-options branch from 77f6bbf to a2acba2 Compare March 2, 2026 16:18
@mayank-at-sauce mayank-at-sauce merged commit 82ab146 into main Mar 2, 2026
37 checks passed
@mayank-at-sauce mayank-at-sauce deleted the fix/merge-project-level-context-options branch March 2, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants