Patient Medical Records

  • + 0 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).

    `