Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(dotnet): enable api response assertions (#16799)

Max Schmitt9341bf12c68b
diff --git a/docs/src/api/class-apiresponseassertions.md b/docs/src/api/class-apiresponseassertions.md
index c4ef4edb53..27e699073f 100644
--- a/docs/src/api/class-apiresponseassertions.md
+++ b/docs/src/api/class-apiresponseassertions.md
@@ -1,6 +1,5 @@
# class: APIResponseAssertions
* since: v1.18
-* langs: js, java, python
The [APIResponseAssertions] class provides assertion methods that can be used to make assertions about the [APIResponse] in the tests. A new instance of [APIResponseAssertions] is created by calling [`method: PlaywrightAssertions.expectAPIResponse`]:
@@ -50,7 +49,7 @@ def test_navigates_to_login_page(page: Page) -> None:
## property: APIResponseAssertions.not
* since: v1.20
-* langs: java, js
+* langs: java, js, csharp
- returns: <[APIResponseAssertions]>
Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:
@@ -74,7 +73,7 @@ The opposite of [`method: APIResponseAssertions.toBeOK`].
* langs:
- alias-java: isOK
-Ensures the response status code is within [200..299] range.
+Ensures the response status code is within `200..299` range.
```js
await expect(response).toBeOK();
diff --git a/docs/src/api/class-playwrightassertions.md b/docs/src/api/class-playwrightassertions.md
index 9fa8856f90..416fc4ccf0 100644
--- a/docs/src/api/class-playwrightassertions.md
+++ b/docs/src/api/class-playwrightassertions.md
@@ -74,7 +74,7 @@ By default, the timeout for assertions is set to 5 seconds.
## method: PlaywrightAssertions.expectAPIResponse
* since: v1.18
-* langs: js, java, python
+* langs:
- alias-java: assertThat
- alias-python: expect
- alias-js: expect
diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts
index 5471fed48f..68eec36758 100644
--- a/packages/playwright-test/types/test.d.ts
+++ b/packages/playwright-test/types/test.d.ts
@@ -3180,7 +3180,7 @@ interface APIResponseAssertions {
not: APIResponseAssertions;
/**
- * Ensures the response status code is within [200..299] range.
+ * Ensures the response status code is within `200..299` range.
*
* ```js
* await expect(response).toBeOK();