We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Patient Medical Records
Patient Medical Records
Sort by
recency
|
50 Discussions
|
Please Login in order to post a comment
Functionality is working fine. Test case 3 and 4 are getting failed. I checked the test cases needs update. Test case 3 - Before attempting to access patientProfile.children, ensure patientProfile is not null. If patientProfile isn't rendered, the tests should fail gracefully with errors that make sense.
Test case 4 - When clicking the "Next" button in the final test (Clicking the next button should display the next patient), ensure that both nextBtn and DOM updates are handled as follows: React updates the DOM asynchronously, so using waitFor ensures the DOM has updated before running assertions. This avoids reading stale DOM elements (queryByTestId returning null).
`
Really the problem and test cases 3 and 4 are problematic. I tried again many times but it still didn't work. Even though the author edited it and I also followed some of the ways that others entered, it still didn't work.
Alert is not working alert("Message") should display the alert, but it doesn't in this case. I verified that this line was being reached.
I tried a workaround with a state for the message, but the test didn't like that? Now what?
For the correct date format use: toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }). Thanks to the user who posted it couples of month ago.
Very good exercise but, SL is just awful. How should I use index+1 in SL? And what SL stands for?