Skip to content

Commit afb1f5c

Browse files
committed
fix flaky test
1 parent c504929 commit afb1f5c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

components/dash-core-components/tests/integration/dropdown/test_localization.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ def test_ddlo001_translations(dash_duo):
3434
".dash-dropdown-action-button:last-child", "Désélectionner tout"
3535
)
3636

37-
search_input = dash_duo.find_element(".dash-dropdown-search")
38-
assert search_input.accessible_name == "Rechercher"
37+
assert (
38+
dash_duo.find_element(".dash-dropdown-search").accessible_name == "Rechercher"
39+
)
3940

40-
search_input.send_keys(1)
41+
dash_duo.find_element(".dash-dropdown-search").send_keys(1)
4142
assert dash_duo.find_element(".dash-dropdown-clear").accessible_name == "Annuler"
4243

4344
dash_duo.find_element(".dash-dropdown-action-button:first-child").click()
4445

45-
search_input.send_keys(9)
46+
dash_duo.find_element(".dash-dropdown-search").send_keys(9)
4647
assert dash_duo.find_element(".dash-dropdown-option").text == "Aucun d'options"
4748

4849
assert (
@@ -80,17 +81,16 @@ def test_ddlo002_partial_translations(dash_duo):
8081
".dash-dropdown-action-button:last-child", "Deselect All"
8182
)
8283

83-
search_input = dash_duo.find_element(".dash-dropdown-search")
84-
assert search_input.accessible_name == "Lookup"
84+
assert dash_duo.find_element(".dash-dropdown-search").accessible_name == "Lookup"
8585

86-
search_input.send_keys(1)
86+
dash_duo.find_element(".dash-dropdown-search").send_keys(1)
8787
assert (
8888
dash_duo.find_element(".dash-dropdown-clear").accessible_name == "Clear search"
8989
)
9090

9191
dash_duo.find_element(".dash-dropdown-action-button:first-child").click()
9292

93-
search_input.send_keys(9)
93+
dash_duo.find_element(".dash-dropdown-search").send_keys(9)
9494
assert dash_duo.find_element(".dash-dropdown-option").text == "No options found"
9595

9696
assert (

0 commit comments

Comments
 (0)