Document Precedence of Mocked Routes if Multiple are Matching#39190
Document Precedence of Mocked Routes if Multiple are Matching#39190Skn0tt merged 3 commits intomicrosoft:mainfrom
Conversation
Clarify route handling precedence in class-page documentation. Signed-off-by: jklingen <jklingen@users.noreply.github.com>
Skn0tt
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I verified we test this behaviour in
playwright/tests/page/page-route.spec.ts
Line 41 in bfd1ec6
|
can you run |
|
@microsoft-github-policy-service agree |
|
@Skn0tt thanks for the heads-up, I just ran the build and pushed the updated files |
Test results for "tests 1"5 failed 3 flaky38551 passed, 843 skipped Merge workflow run. |
Test results for "MCP"1467 passed, 45 skipped Merge workflow run. |
I have been looking for a documentation of the behavior and couldn't find it anywhere in the docs. (Maybe I looked in the wrong place, but I would have expected to find it in this document.)
According to this commit, the most recently registered route wins, which confirms what I assumed after a bit trial and error.
It would be helpful to have this behavior officially documented for the following use cases: