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

[TASK][NRPTI-1223] add two tests for work around act name changes #1225

Merged
merged 8 commits into from
May 28, 2024

Conversation

acatchpole
Copy link
Contributor

@acatchpole acatchpole commented May 15, 2024

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

  • The title of the PR is accurate
  • The title includes the type of change [HOTFIX, FEATURE, etc]
  • The PR title includes the ticket number in format of [NRPTI-###]
  • 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.

@acatchpole acatchpole self-assigned this May 15, 2024
@acatchpole acatchpole marked this pull request as ready for review May 15, 2024 21:47
@acatchpole acatchpole requested a review from fergmac May 15, 2024 21:47
@acatchpole acatchpole linked an issue May 15, 2024 that may be closed by this pull request
3 tasks
fergmac
fergmac previously approved these changes May 16, 2024
@acatchpole acatchpole requested a review from fergmac May 23, 2024 22:48
Copy link

sonarcloud bot commented May 28, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@acatchpole acatchpole merged commit d44c763 into master May 28, 2024
4 checks passed
@acatchpole acatchpole deleted the nrpti-1223-add-test-for-act-name-in-nrced branch May 28, 2024 22:32
@acatchpole
Copy link
Contributor Author

deployed to prod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for NRPTI related to changes to act name handling
2 participants