https://www.ludeknovy.tech/blog/http-mocking-in-playwright
In one of my previous articles about decoupling E2E tests I was reasoning about why we should switch from full-blown E2E tests to much more isolated UI tests. And in this article, I will show you how to do it in Playwright. To isolate our UI tests, we need to mock the API.