docs: document the shared redirect and profiling api - #198
Merged
Conversation
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.
#195 moved the redirect and profiling methods up to
Zenstruck\Browser, but the README still documented them underKernelBrowseronly. This audits the whole file against what shipped.The redirect methods and profiling each get a shared section next to
AuthenticationandExceptions, soKernelBrowseris left with what is genuinely its own: the content-type helpers, reboot control, the http methods,HttpOptionsand the json assertions. Profiling was documented in both browser sections and is now in one place.Three other things the audit caught:
playwrightBrowser()call gets its own browser" is no longer true. Each call gets its own isolated context while sharing one browser process, which is what makes several browsers in a test cheap.Custom Browsersection listed onlyKERNEL_BROWSER_CLASS, thoughPLAYWRIGHT_BROWSER_CLASShas existed since feat: AddPlaywrightBrowser#195 and is in the configuration table.BROWSER_FOLLOW_REDIRECTSwas documented as applying to theKernelBrowseronly, which turned out to be true for the wrong reason:HasBrowser::playwrightBrowser()never passed the option, so the variable silently did nothing there. The first commit wires it the same waycatch_exceptionsis wired, and the table entry now applies to both. WithBROWSER_FOLLOW_REDIRECTS=0the redirect tests fail identically for both browsers; unset, the suite is unchanged.The first commit is a
fix:and the second adocs:, so a merge commit would keep the behaviour change visible in the changelog.