Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🧪 Update integration tests for new input types
- Add 'time' and 'datetime-local' to ALLOWED_TYPES in test_input_basics.py
- Add proper test values for time and datetime inputs
- Enhance test logic to handle time-specific input validation
- Ensures existing test coverage includes the new input types
  • Loading branch information
LeticiaBN committed Sep 26, 2025
commit 6b056ea91511f9556355e8b000b1da57023c6e6d
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"tel",
"url",
"hidden",
"time",
"datetime-local",
)


Expand Down Expand Up @@ -46,10 +48,16 @@ def cb_render(*vals):
dash_dcc.find_element("#input_hidden").get_attribute("type") == "hidden"
), "hidden input element should present with hidden type"

for atype in ALLOWED_TYPES[:-1]:
dash_dcc.find_element(f"#input_{atype}").send_keys(
f"test intp001 - input[{atype}]"
)
# Test all types except hidden (which should not accept user input)
testable_types = [t for t in ALLOWED_TYPES if t != 'hidden']
for atype in testable_types:
element = dash_dcc.find_element(f"#input_{atype}")
if atype == 'time':
element.send_keys("12:30:45")
elif atype == 'datetime-local':
element.send_keys("2023-12-31T23:59:59")
else:
element.send_keys(f"test intp001 - input[{atype}]")

with pytest.raises(WebDriverException):
dash_dcc.find_element("#input_hidden").send_keys("no interaction")
Expand Down