From ccdf0867ba4e87b43fed16afd51344534d4649c0 Mon Sep 17 00:00:00 2001 From: Debbie O'Brien Date: Mon, 30 Oct 2023 12:19:32 +0100 Subject: [PATCH] feature: add readme for api mocking (#7) --- tests/{ => api-mocking}/api-mocking.spec.ts | 0 tests/api-mocking/readme.md | 25 +++++++++++++++++++++ 2 files changed, 25 insertions(+) rename tests/{ => api-mocking}/api-mocking.spec.ts (100%) create mode 100644 tests/api-mocking/readme.md 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)