import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('I should see {int} item cards', async ({ page }, count: number) => { const cards = page.locator('button.bg-slate-800'); await expect(cards).toHaveCount(count); }); when('I select category {string}', async ({ page }, category: string) => { await page.locator('select').filter({ hasText: 'All Categories' }).selectOption(category); }); when('I select type {string}', async ({ page }, type: string) => { await page.locator('select').filter({ hasText: 'All Types' }).selectOption(type); }); when('I select status {string}', async ({ page }, status: string) => { await page.locator('select').filter({ hasText: 'All Status' }).selectOption(status); });