-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(test runner): server side mocking #34520
base: main
Are you sure you want to change the base?
Conversation
16427c5
to
1c79cc8
Compare
This comment has been minimized.
This comment has been minimized.
fix linter revert unneeded change
1c79cc8
to
156918e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/playwright-core/src/server/dispatchers/mockingProxyDispatcher.ts
Outdated
Show resolved
Hide resolved
packages/playwright-core/src/server/dispatchers/mockingProxyDispatcher.ts
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @Skn0tt @dgozman Just curios, how does it relates to this PR? Seems like they provide own fixtures for running proxy as well.. |
Their experiment tries to solve the same problem in a very similar manner to this. It doesn't look like a lot happened to that experiment in Next.js, and it's not even in the docs. So I could imagine that they'll recommend our mocking proxy instead. |
cc @dvoytenko @ijjk for visibility |
Third-party implementations, such as msw, playwright-msw and others, have always been available for those who wanted server-side mocking. However, it doesn't compare with having server-side mocking built directly into Playwright which will offer parallel support, bug fixes, and most imporantly peace of mind knowing it will remain working with future releases ❤️ My 2 cents, not a contributor. |
From my understanding of playwright-msw, it's about mocking browser requests. This work is about mocking server requests, which is different. |
275e062
to
a5f4be6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"1 failed 13 flaky37848 passed, 655 skipped Merge workflow run. |
Implements #30766.
Adds an HTTP proxy that application servers can route their network traffic through to make it subject to Playwright routes.