Repository navigation
Run defaults for journeys: viewport, user agent and headers - #39
Merged
Merged
Conversation
JourneyOptions.Viewport, UserAgent and Headers (viewport, userAgent, headers in @nullean/journeys; --viewport, --user-agent and --header on cdp run) are in place before the first step, so a harness running against a live site does not repeat them in every journey. A journey's set headers adds to the run's, set device keeps the run's user agent, and set viewport and set useragent replace theirs. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…dows
Disposing the test server while its serve loop starts another read makes Windows throw
ArgumentException ("The handle is invalid") from BeginGetContext. The loop already returns
on the other disposal errors; this adds that one. It failed the Windows build of two PRs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
force-pushed
the
feature/journey-run-defaults
branch
from
November 10, 2026 11:01
afe660b to
98485e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A harness running journeys against a live site needs three things to be true for every journey in the run, without each file repeating them:
Elastic/Synthetics, and a header marks it too, so test traffic doesn't land in real telemetry;find role link click --name "Quick reference" --exactcompleted with no error while the click did nothing (no request, no URL change). Withset viewport 1280 800the same step works.The hosts a run may reach are already a run-level option (
AllowedHosts,--allow), so nothing is added for them.What
JourneyOptions.Viewport,UserAgent,Headers(npmviewport,userAgent,headers; CLI--viewport 1280x800,--user-agent,--header "Name: value"), applied before the first step.set headersadds to the run's headers and wins for a name it repeats (Chrome's call replaces the whole set, which would drop the monitor header);set devicekeeps the run's user agent instead of swapping in the device's;set viewportandset useragentreplace theirs.--headeror--viewportas a usage error.Builds on #34 (
set useragent, merged).Verification
Live tests in both runners against a local server that shows what the page saw and what the server received: defaults applied, no defaults changes nothing, journey headers merge and win, journey user agent and viewport replace, a device keeps the run's user agent. 433 .NET and 325 TS tests pass. Stopped applying the run's headers once in each runner: 2 tests failed in each.
No release or publish.
🤖 Generated with Claude Code