import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('the custody badge should show {string}', async ({ page }, text: string) => { const badge = page.locator('[class*="bg-emerald"], [class*="bg-amber"]').filter({ hasText: text }); await expect(badge).toBeVisible(); }); then('I should see the quantity bar', async ({ page }) => { const bar = page.locator('.bg-slate-700 .rounded-full'); await expect(bar).toBeVisible(); }); then('the quantity should show {string}', async ({ page }, text: string) => { await expect(page.getByText(text)).toBeVisible(); });