diff --git a/tests/api-mocking.spec.ts b/tests/api-mocking/api-mocking.spec.ts similarity index 100% rename from tests/api-mocking.spec.ts rename to tests/api-mocking/api-mocking.spec.ts diff --git a/tests/api-mocking/readme.md b/tests/api-mocking/readme.md new file mode 100644 index 0000000..5bbcaf4 --- /dev/null +++ b/tests/api-mocking/readme.md @@ -0,0 +1,25 @@ +--- +name: Playwright - API Mocking +description: "This sample demonstrates how to mock API calls in Playwright tests" +page_type: sample +languages: +- typescript +- javascript +products: +- playwright +urlFragment: api-mocking +--- + +# API Mocking + +This sample demonstrates how to +- mock API calls in Playwright tests +- intercept the request and modifying it +- mock using HAR files + +For more information about the sample see: + +- [Playwright API Mocking demo](https://demo.playwright.dev/api-mocking) +- [Blog post on API Mocking](https://dev.to/playwright/api-mocking-for-your-playwright-tests-47ah) +- [Docs on API Mocking](https://playwright.dev/docs/mock) +- [Release video on our Network Annotations feature which gives you a clearer view of what your API call and fulfillments are doing](https://youtu.be/pJiirfyJwcA)