Skip to content

Commit 9667f61

Browse files
committed
relocate hidden input to facilitate integration tests
1 parent b1e9efe commit 9667f61

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

components/dash-core-components/tests/integration/calendar/test_date_picker_single.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ def test_dtps012_initial_visible_month(dash_dcc):
142142

143143
# Check that calendar shows January 2010 (initial_visible_month), not June 2020 (date)
144144
month_dropdown = dash_dcc.find_element(".dash-datepicker-controls .dash-dropdown")
145-
year_input = dash_dcc.find_element(".dash-datepicker-controls input")
145+
year_input = dash_dcc.find_element(
146+
".dash-datepicker-controls input:not([aria-hidden])"
147+
)
146148

147149
assert "January" in month_dropdown.text, "Calendar should show January"
148150
assert year_input.get_attribute("value") == "2010", "Calendar should show year 2010"

components/dash-core-components/tests/integration/calendar/test_portal.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def click_everything_in_datepicker(datepicker_id, dash_dcc):
2828
)
2929
)
3030

31-
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "input"))
31+
interactive_elements.extend(
32+
popover.find_elements(By.CSS_SELECTOR, "input:not([aria-hidden])")
33+
)
3234

3335
buttons = reversed(
3436
popover.find_elements(By.CSS_SELECTOR, "button")

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def click_everything_in_datepicker(datepicker_id, dash_dcc):
2525
)
2626
)
2727
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "button"))
28-
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "input"))
28+
interactive_elements.extend(
29+
popover.find_elements(By.CSS_SELECTOR, "input:not([aria-hidden])")
30+
)
2931
for el in interactive_elements:
3032
try:
3133
el.click()

0 commit comments

Comments
 (0)