import { test, expect } from '@playwright/test';
import { ZeroDrop } from 'zerodrop-client';
const mail = new ZeroDrop();
test('user can sign up and verify email', async ({ page }) => {
const inbox = mail.generateInbox();
await page.goto('/signup');
await page.fill('[data-testid="email"]', inbox);
await page.click('[data-testid="submit"]');
const email = await mail.waitForLatest(inbox, { timeout: 30000 });
// OTP already extracted — no regex needed
await page.fill('[data-testid="otp"]', email.otp!);
await page.click('[data-testid="verify"]');
await expect(page).toHaveURL('/dashboard');
});