This ticket was created as a learning opportunity around testing in NRPTI. A test case has been created in both the frontend and backend. As well, one of the tests brought to light an uncaught bug in the error handling for a method (parseTitleFromXML). that bug has been corrected as part of this work.
Pull Request Standards
[x] The title of the PR is accurate
[x] The title includes the type of change [HOTFIX, FEATURE, etc]
[x] The PR title includes the ticket number in format of [NRPTI-###]
[x] Documentation is updated to reflect change
Description
This PR includes the following proposed change(s):
legislation-list-detail component: added test that, if backend API is unavailable, instead of translating an actCode, it returns the same actCode
acts.service: added boilerplate test that checks for creation
also fixed some copy-paste errors in the comments for this service
acts-regulations-controller: made parseTitleFromXML function exported for testing. Added test for positive and negative cases for title being present. Updated function with improved error handling due to bug identified by test.
This ticket was created as a learning opportunity around testing in NRPTI. A test case has been created in both the frontend and backend. As well, one of the tests brought to light an uncaught bug in the error handling for a method (parseTitleFromXML). that bug has been corrected as part of this work.
Pull Request Standards
HOTFIX
,FEATURE
,etc
][NRPTI-###]
Description
This PR includes the following proposed change(s):