Skip to content

Commit 7c12efa

Browse files
committed
drop explicit wait time from mathjax test
1 parent 4059f99 commit 7c12efa

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

components/dash-core-components/tests/integration/graph/test_graph_varia.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,14 @@ def load_chart(n_clicks):
875875
if n_clicks is None:
876876
raise PreventUpdate
877877

878-
return dcc.Graph(mathjax=True, id="output", figure={"data": [{"y": [3, 1, 2]}]})
878+
return dcc.Graph(
879+
mathjax=True,
880+
id="output",
881+
figure={
882+
"data": [{"y": [3, 1, 2]}],
883+
"layout": {"title": {"text": "$E=mc^2$"}},
884+
},
885+
)
879886

880887
dash_dcc.start_server(
881888
app,
@@ -893,9 +900,7 @@ def load_chart(n_clicks):
893900
assert findAsyncMathJax(scripts) is None
894901

895902
dash_dcc.find_element("#btn").click()
896-
897-
# Give time for the async dependency to be requested (if any)
898-
time.sleep(2)
903+
dash_dcc.wait_for_element(".gtitle-math")
899904

900905
scripts = dash_dcc.driver.find_elements(By.CSS_SELECTOR, "script")
901906
assert findSyncMathJax(scripts) is None

0 commit comments

Comments
 (0)