import { expect } from '@playwright/test'; import { createBdd } from 'playwright-bdd'; const { Given: given, When: when, Then: then } = createBdd(); then('the submit button should be disabled', async ({ page }) => { await expect(page.getByRole('button', { name: 'Create Item' })).toBeDisabled(); }); then('the submit button should be enabled', async ({ page }) => { await expect(page.getByRole('button', { name: 'Create Item' })).toBeEnabled(); });