Skip to content

Commit 8cab0de

Browse files
committed
Add wait to tests
1 parent 9c9749f commit 8cab0de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/dash-core-components/tests/integration/misc/test_dcc_components_as_props.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from time import sleep
12
from selenium.webdriver.common.keys import Keys
23
from dash import Dash, dcc, html
34
from dash.testing import wait
@@ -55,7 +56,7 @@ def test_mdcap001_dcc_components_as_props(dash_dcc):
5556
search_input.send_keys("4")
5657
options = dash_dcc.find_elements("#dropdown .dash-dropdown-option")
5758

58-
assert len(options) == 1
59+
wait.until(lambda: len(options) == 1, 1)
5960
wait.until(lambda: options[0].text == "h4", 1)
6061

6162
search_input.send_keys(Keys.ESCAPE)
@@ -65,6 +66,7 @@ def search_indexed(value, length, texts):
6566
search = dash_dcc.find_element("#indexed-search .dash-dropdown-search")
6667
dash_dcc.clear_input(search)
6768
search.send_keys(value)
69+
sleep(0.25)
6870
opts = dash_dcc.find_elements("#indexed-search .dash-dropdown-option")
6971

7072
assert len(opts) == length

0 commit comments

Comments
 (0)