Repository navigation
docs: explain the throttling of soft navigations and how to set it for a flow - #12
Merged
Merged
Conversation
Resolving the default config copied every default setting into the result. user-flow merges its project settings under the flow config's, so each of them was replaced by its default without a warning. Lighthouse fills in the defaults itself. Closes #8
…r a flow Explain why a soft navigation step can't use simulated throttling, why the package can't switch it per step, how to set it on each step or for the whole flow or project, and what each costs. Add an e2e test of a flow with DevTools throttling for the whole flow. Closes #6
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.
Closes #6
Note
Builds on #11, whose commit is the first one here. Merge #11 first; this PR's diff then shrinks to the second commit. The project-wide setup documented here only works with #11.
What
The README's Throttling section now explains:
devtoolsorprovided:simulateestimates from the document request, and a soft navigation has none. It also says whatdevtoolsandprovidedeach do.softNavigationConfig({ extends, settings: { throttlingMethod: 'devtools' } }).simulate, Lighthouse waits at least 5.25 s instead of 1 s after FCP, after load and for network and CPU quiet (nonSimulatedSettingsOverridesin Lighthouse'sconfig.js). This came up while testing fix: return only the settings softNavigationConfig is given #11..user-flowrc.json(the Settings section, now withthrottlingMethodin its example).Usage points to the Throttling section for the flow-wide setup.
Test
throttling.e2e-test.tsrunsfixtures/flow-wide-throttling.mjs: a stock Lighthouse flow with DevTools throttling in the config and no step options. It has a page load and soft navigations from a callback and fromstartNavigation/endNavigation. Every step is observed, both soft navigations are reported and scored, and no step has an errored audit or a run warning.The project-wide user-flow setup is covered by the
project-settingse2e test in #11.Verified
pnpm nx run-many -t lint test build typecheck e2eandpnpm nx format:checkpass: 79 unit tests and 50 e2e tests.