import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; import { buildItem, buildCheckedOutItem, buildConsumableItem } from '../../support/item-factory'; import { seedAndNavigate } from '../../support/seed'; const { Given: given, When: when, Then: then } = createBdd(); then('I should see {int} stat cards', async ({ page }, count: number) => { const cards = page.locator('.grid .bg-slate-800'); await expect(cards).toHaveCount(count); }); then('the {string} stat should show {string}', async ({ page }, label: string, value: string) => { const card = page.locator('.bg-slate-800').filter({ hasText: label }); await expect(card.locator('.text-2xl')).toHaveText(value); });