Pannello visione operatore: barra senza input file con camera, Salva, Registra conta le quote, svg al posto del canvas, NaN
Refs #118 #119 #120 #121 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,8 +42,12 @@ def test_image_is_object_contain_without_h_auto():
|
||||
img = _tag_with(panel, 'x-ref="img"')
|
||||
assert "object-contain" in img
|
||||
assert "h-auto" not in img
|
||||
canvas = _tag_with(panel, 'x-ref="overlay"')
|
||||
assert "object-contain" in canvas # stesso fit dell'img: overlay allineato
|
||||
# #121: l'overlay e' un svg (non piu' un canvas) con viewBox naturale e preserveAspectRatio="none":
|
||||
# riempie il wrapper come l'img (che e' esattamente naturale x zoom), quindi resta allineato
|
||||
overlay = _tag_with(panel, 'x-ref="overlay"')
|
||||
assert overlay.startswith("<svg") and "<canvas" not in panel
|
||||
assert 'preserveAspectRatio="none"' in overlay and "pointer-events-none" in overlay
|
||||
assert "absolute" in overlay and "inset-0" in overlay and "w-full" in overlay and "h-full" in overlay
|
||||
|
||||
|
||||
def test_zoom_viewport_scrolls_inside_the_box():
|
||||
@@ -74,7 +78,7 @@ def test_quote_table_shows_nominal_and_tolerances():
|
||||
|
||||
|
||||
def test_overlay_script_loaded_before_vision_execute_and_labels_layer():
|
||||
# #116: vision_overlay.js prima di vision_execute.js; strato etichette dentro il wrapper dello zoom, dopo il canvas
|
||||
# #116: vision_overlay.js prima di vision_execute.js; strato etichette dentro il wrapper dello zoom, dopo l'svg
|
||||
src = TEMPLATE.read_text(encoding="utf-8")
|
||||
assert src.index("js/vision_overlay.js") < src.index("js/vision_execute.js")
|
||||
panel = _panel()
|
||||
|
||||
Reference in New Issue
Block a user