import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('I should see {int} items at the selected location', async ({ page }, count: number) => { const items = page.locator('button.bg-slate-800'); await expect(items).toHaveCount(count); }); then('the location tree should show item counts', async ({ page }) => { // Item counts appear in the tree nodes const counts = page.locator('.text-slate-500').filter({ hasText: /\d+ items?/ }); await expect(counts.first()).toBeVisible(); });