medic / cht-conf-test-harness

A test harness for configurations of Community Health Toolkit applications
6 stars 3 forks source link

support testing datetime input type #234

Closed benkags closed 1 year ago

benkags commented 1 year ago

Describe the bug The value provided for datetime input type gets populated in both the rendered date and time fields as is. As a result validation always fails because the rendered date type expects a date value and the rendered time type expects a time value.

To Reproduce Steps to reproduce the behavior:

  1. Create an app form with a datetime input type.
  2. Add a unit test for the form providing valid a datetime value.
  3. Run the unit test.
  4. Observe as the test fails with a validation error.

What happened? Unit test for a datetime type fails with a validation error because the provided datetime value is populated in both the rendered date and time fields as is.

What did you expect? Unit test accepts provided datetime value as valid.

Screenshots If applicable, add screenshots to help explain your problem.

Environment:

Additional context Add any other context about the problem here. You can indicate which users experienced the problem (only name and location without password)

kennsippell commented 1 year ago

Hey @benkags! Pleased to have you back :)

Do you happen to have a pull request with an example failing test? I attempted a quick repro in this branch 234-datetime-field. Maybe it is just easier to work together on your actual broken scenario. Is the failing test in https://github.com/moh-kenya/config-echis-2.0/pull/973 ?

benkags commented 1 year ago

Hey @kennsippell. Thank you!

Looks like the question has be marked as required to trigger the validation.