-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ReportIncident save button always rendered #2548
Comments
Thanks for this @codyarose
Agreed, the test will always fail. I am not sure if that test is valid since the 'save' buttons in all forms are currently always rendered regardless of whether or not the fields are filled in @jackcmeyer thoughts?
This is a bug that needs addressing, would you like to take a shot at it @codyarose ? |
@blestab I would like to take this up |
@Adarsh710 sure |
@tehkapa If the input is empty and has focus then the user can enter a date and if not, then previous date will appear, is this a good flow? |
If initial value was empty, how do you want to populate it? With the current date? |
Yes, btw it is already populated with current date on initial render |
So let's fallback on that |
🐛 Bug Report
In ReportIncident.test.tsx there is a test implying that the save button should only be rendered after all required inputs are filled out, however the save button is always rendered regardless of input values, so the test will always fail. It may be because the
Date of Incident
input is prefilled with the current date/time, but in the staging app if you empty that input the page crashes.#2516 (comment)
To Reproduce
Uncomment the test and run
npm t
Expected behavior
Test passes
The text was updated successfully, but these errors were encountered: