E2E: 3.x: Clinical visit: Form Entry

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.

Btw, I checked the OMRS 3.X demo site (using the admin account) but couldn’t find the Clinical Visit page. @jayasanka, could you please help me on that.

2 Likes

Hi @piumal1999,

To access the form Entry widget,

  1. Search for a patient or click a patient from the active visits
  2. Select form entry from the left navbar.

use the same clinical visit feature

1 Like

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)?

1 Like

@piumal1999 ,

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

Hi Piumal,

Yes, the reload issue is there. You have to manually reload whenever you add new data.

@grace , @bistenes any idea about the above-mentioned issue?

@piumal1999, could you please open a draft PR until we get an answer? We could even break this into two issues.

1 Like

Hi @jayasanka I created a draft pull request. Could you check and let me know whether I’m on the correct path or not.

1 Like

The PR looks good to me, @piumal1999 ! :hugs: Let’s get this merged. Could you please create a ticket for the remaining tasks?

1 Like

Sure. Thanks for merging the Pull Request.

I’m not sure about the fact that forms link to the 2.x UI. @jdick, @grace, @dkibet ?

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).

Hi @jayasanka , I created an issue for the remaining part of the E2E test for the Form Entry option.

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.

  1. Login to https://openmrs-spa.org/openmrs/spa
  2. Click on a patient
  3. Go to Form Entry
  4. Click on a form (Admission/Discharge/Vitals/Visit Note)
  5. 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.