Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Duplicate Patient Modal cannot be triggered #2546

Open
nobrayner opened this issue Jan 14, 2021 · 10 comments · May be fixed by #2785
Open

Duplicate Patient Modal cannot be triggered #2546

nobrayner opened this issue Jan 14, 2021 · 10 comments · May be fixed by #2785
Assignees
Labels
help wanted indicates that an issue is open for contributions in progress indicates that issue/pull request is currently being worked on

Comments

@nobrayner
Copy link
Contributor

🐛 Bug Report

While converting NewPatient.test.tsx to RTL, we found that the "Duplicate Patient Modal" is impossible to trigger by a user. It looks like it performs a de-dupe against the redux store, but there is nothing that ever populates that store with patients? Thus de-dupe never finds a duplicate.

Creating based on comment in #2516 (comment)

To Reproduce

Uncomment the "Duplicate Patient Modal" test and run it.

Expected behavior

The test would pass.

@nobrayner
Copy link
Contributor Author

@jackcmeyer Creating this based on the comment in #2516

@morrme morrme added needs requirements indicates that an issue needs more requirements in order to be worked on question indicates an issue where a question has been asked labels Feb 9, 2021
@morrme
Copy link
Contributor

morrme commented Feb 9, 2021

@nobrayner Are you working on a solution for this?

cc @jackcmeyer @tehkapa

@nobrayner
Copy link
Contributor Author

@morrme no I am not - this was raised as an extra task above and beyond the conversion to RTL

@morrme morrme added help wanted indicates that an issue is open for contributions and removed needs requirements indicates that an issue needs more requirements in order to be worked on question indicates an issue where a question has been asked labels Feb 9, 2021
@acrawford13
Copy link

Hi! If no one's working on this issue I'd be keen to work on it

@Giaddon
Copy link

Giaddon commented May 30, 2021

Hello,

Looks like this issue is unassigned at the moment -- I'd like to work on it if that is the case. Thanks!

@connordmccandless
Copy link

Hi, could I be assigned to this issue if there's still help wanted?

@matteovivona matteovivona added the in progress indicates that issue/pull request is currently being worked on label Oct 10, 2021
@matteovivona
Copy link
Contributor

@connordmccandless sure

connordmccandless added a commit to connordmccandless/hospitalrun-frontend that referenced this issue Oct 20, 2021
@connordmccandless
Copy link

I fixed the duplicate patient modal so that from the UI, if you're trying to add a patient that could be a duplicate, the modal properly displays. However, I'm having trouble with the test. It seems to me that the test always fails. I changed the code to mark every new patient as a duplicate, so that from the UI, any patient added would prompt the duplicate patient modal. However, the test still did not say that it found the duplicate patient modal, and did not pass.

I was wondering if someone who's more knowledgeable about the testing libraries could take a look at the tests in NewPatient.test.sx and see if they should be functional.

@matteovivona
Copy link
Contributor

thanks for the update @connordmccandless. create PR and then we'll see

@connordmccandless
Copy link

@tehkapa PR is created and attached to this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted indicates that an issue is open for contributions in progress indicates that issue/pull request is currently being worked on
Projects
None yet
6 participants