import { test, expect, type Page } from '@playwright/test'; // ── Pieces editor (custom piece CRUD via the UI) E2E ────────────────────────── // // REQUIRES `npm run test:e2e` + a running server (ui/playwright.config.ts boots // the real orchestrator with auth OFF → synthetic 'local' user). This does NOT // run in the sandbox — there is no live server here. // // The Pieces page (page=pieces) is NOT auth-gated (NAV_ITEMS: pieces // requiresAuth:false). The published-tested `splitPieces` lib covers the // custom/default split; this proves the actual editor wiring that has no e2e: // create a custom piece from the sidebar, then edit + save it through the editor. // // Selector grounding (read from the real components): // - PiecesPage.tsx: the "+" button next to the "Custom Pieces" section opens an // inline input with placeholder="piece-name"; Enter creates the piece via // POST /api/pieces and selects it. // - PieceEditor.tsx: a Visual/YAML mode toggle ("Visual" / "YAML" literal // buttons), a