Skip to content

Commit c2668a2

Browse files
committed
simplify dps test
1 parent 57e5019 commit c2668a2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/integration/calendar/test_date_picker_persistence.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,7 @@
1212
def test_rdpr001_persisted_dps(dash_dcc):
1313
def send_date_dps(target, date):
1414
(
15-
ActionChains(dash_dcc.driver)
16-
.move_to_element(target)
17-
.pause(0.2)
18-
.click(target)
19-
.send_keys(Keys.END)
20-
.key_down(Keys.SHIFT)
21-
.send_keys(Keys.HOME)
22-
.key_up(Keys.SHIFT)
23-
.send_keys(Keys.DELETE)
24-
.send_keys(str(date))
25-
.send_keys(Keys.ENTER)
15+
ActionChains(dash_dcc.driver).send_keys(str(date)).send_keys(Keys.ENTER)
2616
).perform()
2717

2818
app = dash.Dash(__name__)
@@ -66,9 +56,11 @@ def display_dps2(value):
6656
dps1 = dash_dcc.find_element("#dps1")
6757
dps2 = dash_dcc.find_element("#dps2")
6858

59+
dash_dcc.clear_input(dps1)
6960
send_date_dps(dps1, "01/01/2020")
7061
dash_dcc.wait_for_text_to_equal("#dps1-p", "2020-01-01")
7162

63+
dash_dcc.clear_input(dps2)
7264
send_date_dps(dps2, "01/01/2020")
7365
dash_dcc.wait_for_text_to_equal("#dps2-p", "2020-01-01")
7466

0 commit comments

Comments
 (0)