import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('the items count should be {string}', async ({ page }, count: string) => { const row = page.locator('.flex.justify-between').filter({ hasText: 'Items' }); await expect(row.locator('.text-white')).toHaveText(count); });