Regrouper les réglages de la carte dans un panneau unique à onglets, volet en bas sur téléphone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -850,7 +850,7 @@ def test_ui_offers_generation_controls():
|
||||
"""L'interface embarque les contrôles de génération (+ Zone, options, run)."""
|
||||
from lidar_pipeline.mapui import _MAP_CSS, _MAP_HTML, _MAP_JS
|
||||
assert 'id="btnZone"' in _MAP_HTML and 'id="btnComplete"' in _MAP_HTML
|
||||
assert 'id="gencard"' in _MAP_HTML and 'id="genGo"' in _MAP_HTML
|
||||
assert 'id="tab-gen"' in _MAP_HTML and 'id="genGo"' in _MAP_HTML
|
||||
assert 'id="genStop"' in _MAP_HTML and 'id="genQueueClear"' in _MAP_HTML
|
||||
assert 'id="genViz"' in _MAP_HTML
|
||||
# Classification et raccord des bords imposés : plus de réglage
|
||||
@ -937,7 +937,7 @@ def test_ign_metadata_cached_and_resilient(tmp_path, monkeypatch):
|
||||
|
||||
def test_ui_tile_card_and_wind_rose():
|
||||
from lidar_pipeline.mapui import _MAP_HTML, _MAP_JS
|
||||
assert 'id="rose"' in _MAP_HTML and 'id="roseCanvas"' in _MAP_HTML
|
||||
assert 'id="legendBlock"' in _MAP_HTML and 'id="roseCanvas"' in _MAP_HTML
|
||||
assert "api/map/ign?col=" in _MAP_JS and "Télécharger le nuage LiDAR" in _MAP_JS
|
||||
assert "compass + 90" in _MAP_JS # même repère que le rendu (aspect = boussole + 90°)
|
||||
|
||||
@ -1325,8 +1325,8 @@ def test_export_pdf_never_delegated(tmp_path, monkeypatch):
|
||||
|
||||
def test_map_ui_has_pdf_export():
|
||||
from lidar_pipeline.mapui import _MAP_CSS, _MAP_HTML, _MAP_JS
|
||||
for id_ in ("btnPrint", "printcard", "printPaper", "printOrient", "printScale",
|
||||
"printTitle", "printGo", "printMsg", "printClose", "printInfo"):
|
||||
for id_ in ("tab-print", "printPaper", "printOrient", "printScale",
|
||||
"printTitle", "printGo", "printMsg", "printInfo"):
|
||||
assert f'id="{id_}"' in _MAP_HTML, id_
|
||||
for scale in ("1000", "2000", "5000", "10000"):
|
||||
assert f'value="{scale}"' in _MAP_HTML
|
||||
@ -1338,9 +1338,14 @@ def test_map_ui_has_pdf_export():
|
||||
assert "PRINT.center" in _MAP_JS
|
||||
for id_ in ("printHere", "printFit"):
|
||||
assert f'id="{id_}"' in _MAP_HTML, id_
|
||||
assert "#printcard" in _MAP_CSS
|
||||
# bouton toujours visible : indépendant de /api/status.available
|
||||
assert 'id="btnPrint"' in _MAP_HTML and 'id="btnPrint" hidden' not in _MAP_HTML
|
||||
# onglet toujours proposé (indépendant de /api/status.available) ; plus de
|
||||
# bouton ⎙ ni de carte hors du panneau
|
||||
assert 'data-tab="print"' in _MAP_HTML
|
||||
for gone in ('id="btnPrint"', 'id="printcard"', 'id="printClose"'):
|
||||
assert gone not in _MAP_HTML, gone
|
||||
tools = _MAP_HTML.split('<nav id="tools">')[1].split("</nav>")[0]
|
||||
assert "⎙" not in tools
|
||||
assert "e.detail.visible === 'print'" in _MAP_JS
|
||||
|
||||
|
||||
def test_ui_tokens_themes_and_components():
|
||||
@ -1371,3 +1376,30 @@ def test_ui_tokens_themes_and_components():
|
||||
rules = rules[rules.index("}") + 1:]
|
||||
for hard in ("#0b0e13", "#10141b", "#f4a261", "#4cc9f0", "#e76f51", "rgba(90, 160, 255"):
|
||||
assert hard not in rules, hard
|
||||
|
||||
|
||||
def test_ui_single_tabbed_panel():
|
||||
from lidar_pipeline.mapui import _MAP_CSS, _MAP_HTML, _MAP_JS
|
||||
for id_ in ("panel", "panelTabs", "panelBody", "panelCollapse", "sheetGrip",
|
||||
"tab-view", "tab-print", "tab-gen", "tab-share"):
|
||||
assert f'id="{id_}"' in _MAP_HTML, id_
|
||||
for tab in ("view", "print", "gen", "share"):
|
||||
assert f'data-tab="{tab}"' in _MAP_HTML, tab
|
||||
# Plus d'éléments flottants : tout passe dans le panneau
|
||||
for gone in ('id="layercard"', 'id="printcard"', 'id="gencard"', 'id="usecard"',
|
||||
'id="gentools"', 'id="btnPrint"', 'id="rose"', 'id="btnUse"'):
|
||||
assert gone not in _MAP_HTML, gone
|
||||
# Réglages et boutons déplacés, identifiants conservés
|
||||
for id_ in ("printPaper", "printGo", "genGo", "btnZone", "btnComplete", "btnShare",
|
||||
"btnDefault", "btnReset", "useBody", "modeSeg", "roseCanvas", "baseOpacity"):
|
||||
assert f'id="{id_}"' in _MAP_HTML, id_
|
||||
assert "const PANEL_LS = 'lidar-panel'" in _MAP_JS
|
||||
for fn in ("function panelTabs(", "function openTab(", "function setSheet(",
|
||||
"function setCollapsed(", "function panelVisibleTab("):
|
||||
assert fn in _MAP_JS, fn
|
||||
assert "'panel:tab'" in _MAP_JS
|
||||
# Génération masquée : onglet retiré de la liste (touches 1–4 comprises)
|
||||
assert "GEN.available && GEN.allowed" in _MAP_JS.split("function panelTabs(")[1].split("}")[0]
|
||||
assert "@media (max-width: 720px)" in _MAP_CSS and "#panel" in _MAP_CSS
|
||||
for state in ('data-sheet="closed"', 'data-sheet="half"', 'data-sheet="full"'):
|
||||
assert state.split('"')[1] in _MAP_CSS, state
|
||||
|
||||
Reference in New Issue
Block a user