From a0f72bfeafc4fcf2f6bb2f06bd8f5ac6f5fa9e58 Mon Sep 17 00:00:00 2001 From: pengoosedev <73521518+pengoosedev@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:03:56 +0900 Subject: [PATCH] docs: remove conditional arguments --- docs/src/test-api/class-test.md | 40 --------------------------------- 1 file changed, 40 deletions(-) diff --git a/docs/src/test-api/class-test.md b/docs/src/test-api/class-test.md index dabf03d71e..7ea05d4c56 100644 --- a/docs/src/test-api/class-test.md +++ b/docs/src/test-api/class-test.md @@ -1147,10 +1147,6 @@ To declare a focused "failing" test: * `test.fail.only(title, body)` * `test.fail.only(title, details, body)` -To conditionally focus a "failing" test: -* `test.fail.only(condition, description)` -* `test.fail.only(callback, description)` - **Usage** You can declare a focused failing test, so that Playwright runs only this test and ensures it actually fails. @@ -1166,21 +1162,6 @@ test('not in the focused group', async ({ page }) => { }); ``` -You can mark all tests within a file or [`method: Test.describe`] group as focused "should fail" based on some condition with a single `test.fail.only(callback, description)` call. - -```js -import { test, expect } from '@playwright/test'; - -test.fail.only(({ browserName }) => browserName === 'webkit', 'not implemented yet'); - -test('fail in WebKit 1', async ({ page }) => { - // This test will not run -}); -test('fail in WebKit 2', async ({ page }) => { - // This test will not run -}); -``` - ### param: Test.fail.only.title * since: v1.49 @@ -1206,27 +1187,6 @@ See [`method: Test.describe`] for test details description. Test body that takes one or two arguments: an object with fixtures and optional [TestInfo]. -### param: Test.fail.only.condition -* since: v1.49 - -- `condition` ?<[boolean]> - -Test is marked as "should fail" and focused when the condition is `true`. - -### param: Test.fail.only.callback -* since: v1.49 - -- `callback` ?<[function]\([Fixtures]\):[boolean]> - -A function that returns whether to mark as "should fail" and focused, based on test fixtures. Test or tests are marked as "should fail" and focused when the return value is `true`. - -### param: Test.fail.only.description -* since: v1.49 - -- `description` ?<[string]> - -Optional description that will be reflected in a test report. - ## method: Test.fixme