From 5d828de8e3e1f44f4d7d3edcedd48ba219fc3105 Mon Sep 17 00:00:00 2001 From: Vitaliy Potapov Date: Wed, 10 Jul 2024 17:44:33 +0400 Subject: [PATCH] update cucumber style examples --- examples/cucumber-style/features/steps/fixtures.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/cucumber-style/features/steps/fixtures.ts b/examples/cucumber-style/features/steps/fixtures.ts index 31c223cb..07110cfa 100644 --- a/examples/cucumber-style/features/steps/fixtures.ts +++ b/examples/cucumber-style/features/steps/fixtures.ts @@ -2,7 +2,10 @@ import { test as base, createBdd } from 'playwright-bdd'; import { World } from './world'; export const test = base.extend<{ world: World }>({ - world: ({ page }, use, testInfo) => use(new World(page, testInfo)), + world: async ({ page }, use, testInfo) => { + const world = new World(page, testInfo); + await use(world); + }, }); export const { Given, When, Then } = createBdd(test, { worldFixture: 'world' });