Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OZ-541: E2E tests for the flows between O3 and ERPNext. #86

Merged
merged 5 commits into from
May 20, 2024
Merged

Conversation

kdaud
Copy link
Contributor

@kdaud kdaud commented May 6, 2024

Ticket OZ-541

This PR adds E2E tests for the flows between O3 and ERPNext;

  • Ordering a lab test for an OpenMRS patient creates the corresponding ERPNext customer.
  • Ordering a drug for an OpenMRS patient creates the corresponding ERPNext customer with a filled quotation.
  • Ending an OpenMRS patient visit with a synced drug order updates the corresponding ERPNext draft quotation to an open state.
  • Revising a synced OpenMRS drug order edits the corresponding ERPNext quotation line.
  • Ordering a drug with a free text medication dosage for an OpenMRS patient creates the corresponding ERPNext customer with a filled quotation.
  • Discontinuing a synced OpenMRS drug order for an ERPNext customer with a single quotation line removes the corresponding quotation.

@kdaud kdaud changed the title OZ-541: Ordering a lab test for an OpenMRS patient creates the corresponding ERPNext customer OZ-541: Ordering a drug for an OpenMRS patient creates the corresponding ERPNext customer May 15, 2024
@kdaud kdaud force-pushed the OZ-541 branch 2 times, most recently from b84f601 to d52d4d8 Compare May 15, 2024 11:53
@kdaud kdaud changed the title OZ-541: Ordering a drug for an OpenMRS patient creates the corresponding ERPNext customer OZ-541: E2E tests for the flows between O3 and ERPNext. May 15, 2024
@kdaud kdaud marked this pull request as ready for review May 15, 2024 12:03
@kdaud kdaud requested a review from corneliouzbett May 15, 2024 12:14
Copy link

@corneliouzbett corneliouzbett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a fews comments but otherwise this looks good already.
Can we have a more systematic naming for the test cases e.g something like:
"Ordering a drug in system A creates quotation item in system B" or
"Ordering a drug in system A should create a quotation item in system B".

Assuming the secondary flows.

e2e/tests/erpnext-openmrs-flows.spec.ts Outdated Show resolved Hide resolved
e2e/tests/erpnext-openmrs-flows.spec.ts Outdated Show resolved Hide resolved
e2e/utils/functions/openmrs.ts Outdated Show resolved Hide resolved
@kdaud
Copy link
Contributor Author

kdaud commented May 16, 2024

Can we have a more systematic naming for the test cases e.g something like:
"Ordering a drug in system A creates quotation item in system B" or
"Ordering a drug in system A should create a quotation item in system B

We're following similar naming convention which indicates 'Actions in component A → effects in component B':

References:

@kdaud kdaud force-pushed the OZ-541 branch 11 times, most recently from 54b7c44 to 02eca6b Compare May 17, 2024 04:41
package.json Outdated Show resolved Hide resolved
@kdaud kdaud force-pushed the OZ-541 branch 3 times, most recently from 8d2c75e to 7138c31 Compare May 17, 2024 08:13
@kdaud kdaud requested a review from corneliouzbett May 17, 2024 08:56
Copy link

@corneliouzbett corneliouzbett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kdaud
LGTM

@kdaud kdaud merged commit f2a626b into main May 20, 2024
@kdaud kdaud deleted the OZ-541 branch May 27, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants