import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { join } from "node:path"; /** * POS cart quantity entry (`public/pos/pos-app.js` + `public/pos/pos.html`). * * Ringing up 800 of something means typing 800, and the only route to the * quantity field used to be a 600ms long-press on the row. The number * itself was a plain `
` — exactly the thing a cashier reaches * for — so it rendered inert. The sheet it opens is unchanged and still * reachable both ways; these guards exist because the *discoverability* is * what regressed, and that is invisible in a code review: nothing throws, * the build is green, and the control is simply dead to a first-time user. * * Same shape of problem as `pos-inline-handlers.test.ts`: assert the * affordance exists rather than trusting that it was left in place. */ const POS_APP = readFileSync(join(process.cwd(), "public", "pos", "pos-app.js"), "utf8"); const POS_HTML = readFileSync(join(process.cwd(), "public", "pos", "pos.html"), "utf8"); describe("POS cart quantity is directly settable", () => { it("renders the quantity as a button, not an inert div", () => { expect(POS_APP).toMatch(/