import { test, expect } from "@playwright/test";
import { USERS, login } from "./helpers";

/**
 * Issue #44 — the PO line-item unit dropdown must offer months and year(s)
 * (previously only days/short units).
 */
test("#44 line-item unit dropdown includes month and year options", async ({ page }) => {
  await login(page, USERS.TECH);
  await page.goto("/po/new");

  // The line-items editor renders at least one unit <select>; assert the new options.
  await expect(page.locator('option[value="month"]').first()).toBeAttached();
  await expect(page.locator('option[value="year"]').first()).toBeAttached();
});
