From bb870979ee1c33f747d2326f5a6a02f134c7e1ce Mon Sep 17 00:00:00 2001 From: Vitaliy Potapov Date: Tue, 19 Mar 2024 14:25:03 +0400 Subject: [PATCH] docs: note about several step files, see #109 --- docs/writing-steps/playwright-style.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/writing-steps/playwright-style.md b/docs/writing-steps/playwright-style.md index 45240982..dc14e61a 100644 --- a/docs/writing-steps/playwright-style.md +++ b/docs/writing-steps/playwright-style.md @@ -26,6 +26,8 @@ When('I click link {string}', async ({ page }, name: string) => { > Usually step functions are async, but it is not required +?> Calling `const { Given, When, Then } = createBdd()` at the top of each step file is totally ok, because it returns lightweight wrappers without heavy operations + ## Fixtures To use [fixtures](https://playwright.dev/docs/test-fixtures#with-fixtures) in step definitions: