Playwright MSW Vscode extension record test usage #2570
Replies: 1 comment 4 replies
-
|
Hi, @JoepKockelkorn. That's interesting! I was under the impression that PW doesn't run the cleanup hooks in the recording mode as the cleanup can generally render your app unusable. In the API mocking context, I agree with you that the mocks should continue to affect your app so you can interact with it and record those interactions in tests. I wonder if PW provides any guidelines as to how to handle fixture cleanups in the context of "record at cursor". I recommend asking the Playwright team about that on GitHub/their Discord. I would be happy to follow their guidelines to make sure |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
We're using the
createNetworkFixturemethod from@msw/playwrightto run MSW together with Playwright. This works great. However, this setup callsworker.stop()under the hood which means that MSW stops intercepting requests once the test has run. This means we can't use the Playwright VSCode extension feature "Record at cursor" to extend an existing test, since MSW won't intercept any requests made when clicking in the UI during the Recording session.Is this something that can be solved via a setting, or is this currently impossible without changes to
@msw/playwright?Beta Was this translation helpful? Give feedback.
All reactions