import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('the item should show as checked out', async ({ page }) => { await expect(page.getByText('Out')).toBeVisible(); }); then('the item should show as checked in', async ({ page }) => { await expect(page.getByText('Home')).toBeVisible(); }); then('the check-in form should be visible', async ({ page }) => { await expect(page.getByText('Return to')).toBeVisible(); await expect(page.getByRole('button', { name: 'Check In' })).toBeVisible(); });