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.
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).
`
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Patient Medical Records
You are viewing a single comment's thread. Return to all comments →
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).
`