-
Notifications
You must be signed in to change notification settings - Fork 220
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
EDSC-3773: Refactor buildAccessMethods.js #1767
Conversation
- Moved out all the logic bocks in buildAccessMethods into their one files (1 for each logic block). - Created tests for each of those logic blocks and updated the buildAccessMethods to test that those methods get called the correct number of times and with the correct params.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1767 +/- ##
==========================================
+ Coverage 93.27% 93.30% +0.03%
==========================================
Files 749 754 +5
Lines 18208 18254 +46
Branches 4716 4722 +6
==========================================
+ Hits 16983 17032 +49
+ Misses 1140 1138 -2
+ Partials 85 84 -1 ☔ View full report in Codecov by Sentry. |
static/src/js/util/accessMethods/buildAccessMethods/buildSwodlr.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/buildEsiEcho.js
Outdated
Show resolved
Hide resolved
…into EDSC-3773
static/src/js/util/accessMethods/buildAccessMethods/buildEsiEcho.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/__tests__/buildEsiEcho.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/__tests__/buildHarmony.test.js
Outdated
Show resolved
Hide resolved
Please add a test for buildAccessMethods that shows indexes are correctly incremented when multiple service records exist for multiple types, including multiple order options assigned to an esi or echo orders service record |
…dlr results to match Esi and Echo Orders
…into EDSC-3773
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/__tests__/buildHarmony.test.js
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/__tests__/buildOpendap.test.js
Outdated
Show resolved
Hide resolved
…into EDSC-3773
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to nest some tests within the empty describe block, otherwise looks good to me.
static/src/js/util/accessMethods/__tests__/buildAccessMethods.test.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/buildEsiEcho.js
Outdated
Show resolved
Hide resolved
static/src/js/util/accessMethods/buildAccessMethods/buildHarmony.js
Outdated
Show resolved
Hide resolved
…EDSC-3773_test
…er of checking results so they are accurate to the indexing of echoIndex, esiIndex, & harmonyIndex
Overview
What is the feature?
Refactored the buildAccessMethods.js file to pull out the 5 different logic blocks in order to make the file more readable and easier to modify (add new access methods in the future)
What is the Solution?
What areas of the application does this impact?
List impacted areas.
Testing
Reproduction steps
EX:
oPeNDAP: C1453188197-GES_DISC
Harmony: C1595422627-ASF
Echo Order: C179031504-LARC
Echo Order: C1200382306-CMR_ONLY (In SIT, testing new feature allowing for multiple Echo Order/ESI services to show up to be downloaded)
ESI: (The first good collection I found was in SIT C1200427107-EDF_DEV06)
Download: (any of the top 4)
Attachments
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
Checklist