test: add data-testid attributes to Scanner component

This commit is contained in:
2026-04-19 09:26:51 +03:00
parent c2edc4a704
commit cbfe6a22be

View File

@@ -230,7 +230,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
</div>
</div>
<div id={scannerId} className="w-full h-full bg-surface object-cover" />
<div id={scannerId} data-testid="camera-indicator" className="w-full h-full bg-surface object-cover" />
{/* Selection UI */}
{isSelecting && capturedImage && (
@@ -321,6 +321,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
setZoom(nextZoom);
}
}}
data-testid="zoom-control"
aria-label={`Zoom ${zoom.toFixed(1)}x`}
className="h-14 px-5 bg-slate-800/80 hover:bg-slate-700 border border-slate-700 text-white rounded-2xl flex flex-col items-center justify-center shadow-lg cursor-pointer transition-all active:scale-95 shrink-0 focus:ring-2 focus:ring-blue-500 focus:outline-none"
>