How to test PendingReady visibility across service logic, status APIs, and printer-card UI
Use this when a printer should appear in the PendingReady / awaiting-bed-clear state but does not show up correctly in the dashboard, printer cards, or nav attention badges.
TransitionToPendingReadyAsync should set AutoPrintState.PendingReady, keep BedPreConfirmed false, and broadcast autoprintstatechanged with the waiting-for-operator gate.GET /api/auto-print/{printerId}/status and GET /api/auto-print/status return state = PendingReady, queue depth, and a failed Bed Clear Confirmed ready gate.autoprintstatechanged, wire that event into the same React Query cache used by cards/tables (['auto-dispatch', 'all-statuses']) so PendingReady UI does not wait for the next poll interval.useAutoDispatchStatus() reads the bulk /api/auto-print/status payload, and mounts when is true. The overlay should appear both for an explicit state and for a stale summary row whose failed gate still says the operator must clear the bed.CompactPrinterCardBedClearBannerrequiresBedClearConfirmation(status)PendingReadyBed Clear ConfirmedAttentionMessage) on the status DTO instead of making each client reverse-engineer readyGateChecks.CompactPrinterCard should render the BedClearBanner overlay when the hook returns PendingReady.readyGateChecks["Bed Clear Confirmed"] gate as equivalent to PendingReady when deciding whether to show the bed-clear banner or Pending Ready label. Do not trust a single summary state field if the detailed gate says operator action is still required.passed === false) and queued work still exists, keep the PendingReady/banner fallback even when the gate message is blank or omitted. Only the explicit "No confirmation needed yet" copy should suppress the operator alert.src/tests/Farm.Web.Api.Tests/Services/AutoPrint/AutoPrintServiceTests.cssrc/tests/Farm.Web.Api.Tests/Controllers/AutoPrintPendingReadyTests.cssrc/Web/ReactApp/src/test/features/printers/obico-ml-badge.test.tsxsrc/Web/ReactApp/src/test/features/printers/compact-printer-pendingready-live.test.tsxsrc/Web/ReactApp/src/common/utils/printerStateDisplay.tssrc/Web/ReactApp/src/features/printers/hooks/useAutoDispatch.tsMarkPreClearAsync and assuming PendingReady coverage exists./api/auto-print/status payload.autoprintstatechanged.