test: add data-testid attributes to Scanner component
This commit is contained in:
@@ -230,7 +230,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
|||||||
</div>
|
</div>
|
||||||
</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 */}
|
{/* Selection UI */}
|
||||||
{isSelecting && capturedImage && (
|
{isSelecting && capturedImage && (
|
||||||
@@ -321,6 +321,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
|||||||
setZoom(nextZoom);
|
setZoom(nextZoom);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
data-testid="zoom-control"
|
||||||
aria-label={`Zoom ${zoom.toFixed(1)}x`}
|
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"
|
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"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user