Hi, I have been assigned for the issue [RATEST-247] E2E: 3.x: Clinical visit: Form Entry - OpenMRS Issues which is to write a scenario to test the form entry in the clinical visit. I’ll use this thread for my updates and the further discussions.
To access the form Entry widget,
- Search for a patient or click a patient from the active visits
- Select form entry from the left navbar.
use the same clinical visit feature
Got it. Thank you
Hi @jayasanka, I need to clarify few things about E2E tests.
When testing, do we need to check each and everything inside a component when verifying that component is loaded.
For example, let’s say I want to check whether this table is loaded properly. For that, is it okay to check only the table headers(Last Completed, Form Name)?
We don’t need to go through all elements. just checking one or two unique properties would be enough. Check other scenarios on the same feature file, you might be able to get an idea.
Right. Thank you.
I have another problem😅. I noticed that when we click most of the forms, it redirects to an older version of forms(probably 2.X) instead of opening the sidebar in 3.x.
- So I used the ‘Record Vitals’ form which opens in the sidebar.
- However after saving it, it requires a manual reload to load the new form details on the forms list.
- Even after doing that, if we click the form we created it redirects to the older version again.
I found this comment on the testing doc. Is that the same issue I mentioned? 3.0 E2E Testing Plan: Workflow Cases - Google Docs
Yes, the reload issue is there. You have to manually reload whenever you add new data.
@piumal1999, could you please open a draft PR until we get an answer? We could even break this into two issues.
Hi @jayasanka I created a draft pull request. Could you check and let me know whether I’m on the correct path or not.
The PR looks good to me, @piumal1999 ! Let’s get this merged. Could you please create a ticket for the remaining tasks?
Sure. Thanks for merging the Pull Request.
We are in the process of fixing the issue where a reload is needed after submitting data. This is the work that @dkigen has been doing with SWR. We should probably go through the E2E tests to get rid of unnecessary reloads sometime soon (but not yet, the SWR work is not yet totally complete).
This is the Pull request for fixing the issue: RATEST-254: E2E: 3.x: Clinical visit: Form Entry - Save Form by Piumal1999 · Pull Request #165 · openmrs/openmrs-contrib-qaframework · GitHub
Please review and merge
Hi @bistenes. Thanks for the response. This is the steps to reproduce it.
- Login to https://openmrs-spa.org/openmrs/spa
- Click on a patient
- Go to Form Entry
- Click on a form (Admission/Discharge/Vitals/Visit Note)
- It will redirect to an older version
Btw, previously I faced that issue with almost every form, but now that happens only in few forms.