test(tableaux): adapter test post-abandon sticky headers #82
Le test ne vérifie plus position:sticky sur th (sticky abandonné car incompatible avec scroll contenu). Vérifie à la place que overflow-x:hidden est bien en place sur le conteneur Dash — garantit l'absence de scrollbar navigateur en bas de page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,15 +2,17 @@ from dash.testing.composite import DashComposite
|
|||||||
|
|
||||||
|
|
||||||
def test_tableau_hscroll_bar_present(dash_duo: DashComposite):
|
def test_tableau_hscroll_bar_present(dash_duo: DashComposite):
|
||||||
"""La barre miroir est injectée et l'en-tête est collant sur /tableau."""
|
"""La barre de défilement est injectée et le conteneur scroll horizontalement."""
|
||||||
from src.app import app
|
from src.app import app
|
||||||
|
|
||||||
dash_duo.start_server(app)
|
dash_duo.start_server(app)
|
||||||
dash_duo.wait_for_page(f"{dash_duo.server_url}/tableau")
|
dash_duo.wait_for_page(f"{dash_duo.server_url}/tableau")
|
||||||
dash_duo.wait_for_element(".marches_table", timeout=20)
|
dash_duo.wait_for_element(".marches_table", timeout=20)
|
||||||
# Barre miroir injectée par table_hscroll.js
|
# Barre injectée par table_hscroll.js
|
||||||
dash_duo.wait_for_element(".marches_table .dt-hscroll", timeout=10)
|
dash_duo.wait_for_element(".marches_table .dt-hscroll", timeout=10)
|
||||||
|
dash_duo.wait_for_element(".marches_table .dt-hscroll-thumb", timeout=5)
|
||||||
|
|
||||||
header = dash_duo.find_element(".marches_table th.dash-header")
|
# Le conteneur Dash doit avoir overflow-x:hidden (scroll contenu, pas de scrollbar page)
|
||||||
position = header.value_of_css_property("position")
|
container = dash_duo.find_element(".marches_table .dash-spreadsheet-container")
|
||||||
assert position == "sticky"
|
overflow = container.value_of_css_property("overflow-x")
|
||||||
|
assert overflow == "hidden"
|
||||||
|
|||||||
Reference in New Issue
Block a user