Rétablir l'onglet Génération mémorisé et ignorer le repli du panneau sur téléphone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1403,3 +1403,17 @@ def test_ui_single_tabbed_panel():
|
||||
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
|
||||
|
||||
|
||||
def test_ui_panel_restores_tab_and_ignores_collapse_on_phone():
|
||||
from lidar_pipeline.mapui import _MAP_JS
|
||||
render = _MAP_JS.split("function panelRender(")[1].split("\nfunction ")[0]
|
||||
# Onglet choisi gardé à part : Génération rétablie une fois /api/status connu
|
||||
assert "PANEL.want = PANEL.tab;" in _MAP_JS
|
||||
assert "PANEL.tab = tabs.includes(PANEL.want) ? PANEL.want : 'view';" in render
|
||||
assert "tab: PANEL.want" in _MAP_JS.split("function panelSave(")[1].split("\n")[0]
|
||||
assert "PANEL.want = PANEL.tab = tab;" in _MAP_JS.split("function openTab(")[1].split("\nfunction ")[0]
|
||||
# Repli en bande d'icônes : ordinateur seulement
|
||||
assert "PANEL.collapsed && !isPhone()" in render
|
||||
assert "toggle('collapsed', PANEL.collapsed)" not in render
|
||||
assert "toggle('panel-collapsed', PANEL.collapsed)" not in render
|
||||
|
||||
Reference in New Issue
Block a user