Skip to content

Commit b918836

Browse files
committed
Fixed some tests
1 parent c72541b commit b918836

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def click_everything_in_datepicker(datepicker_id, dash_dcc):
2222
popover = dash_dcc.find_element(".dash-datepicker-content")
2323

2424
interactive_elements = []
25-
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "td"))
25+
interactive_elements.extend(
26+
popover.find_elements(
27+
By.CSS_SELECTOR, "td:not(.dash-datepicker-calendar-padding)"
28+
)
29+
)
30+
2631
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "input"))
2732

2833
buttons = reversed(
@@ -36,7 +41,9 @@ def click_everything_in_datepicker(datepicker_id, dash_dcc):
3641
sleep(0.05)
3742
except Exception as e:
3843
print(e)
39-
assert not e, f"Unable to click on {el.tag_name})"
44+
assert (
45+
not e
46+
), f"Unable to click on {el.tag_name} {el.get_attribute('class')})"
4047

4148

4249
def test_dppt000_datepicker_single_default(dash_dcc):

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def click_everything_in_datepicker(datepicker_id, dash_dcc):
1919
popover = dash_dcc.find_element(".dash-datepicker-content")
2020

2121
interactive_elements = []
22-
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "td"))
22+
interactive_elements.extend(
23+
popover.find_elements(
24+
By.CSS_SELECTOR, "td:not(.dash-datepicker-calendar-padding)"
25+
)
26+
)
2327
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "button"))
2428
interactive_elements.extend(popover.find_elements(By.CSS_SELECTOR, "input"))
2529
for el in interactive_elements:

0 commit comments

Comments
 (0)