Skip to content

Conversation

@JamesTLopez
Copy link
Contributor

@JamesTLopez JamesTLopez commented Dec 1, 2025

Summary

NOTE: Has fix/resolve-collaborator-revisions in this PR.

Various test-case updates

Description of Changes

  • Services-Test
    • ADDED helper function getFirstIdTestByState
      • Grabs the id of the first field its application in a list, for more reliable id search since inserting application doesnt happen sequentially
    • ADDED Application Revision Requests tests
      • ADDED Should create revision'
  • Controllers-Test (api directory)
    - Added getFirstApplicationTestByState function in controller to reduce redundant tests
    • REMOVE should fetch revisions for a valid applicationId where revisions exist test
      • This is a service test, not a controller test
    • ADDED DAC revisions request should fail if not state is NOT in DAC_REVIEW
    • ADDED REP revisions request should fail if not state is NOT in INSTITUTIONAL_REP_REVIEW
    • ADDED should be able to create revisions DAC request when application is in DAC_REVIEW state test
    • ADDED should fail revisions DAC request if application is not in the correct state test

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
  • PR Format
    • The PR title is properly formatted to match the pattern: #{TicketNumber}: Description of Changes
    • Links are included to all relevant tickets
  • Labels Added
    • Label is added for each package/app that is modified (api, ui, data-model, etc.)
    • Label is added for the type of work done in this PR (feature, fix, chore, documentation)
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added
  • Documentation
    • All new environment variables added to .env.schema file and documented in the README
    • All changes to server HTTP endpoints have open-api documentation
    • All new functions exported from their module have TSDoc comment documentation

Copy link
Contributor

@demariadaniel demariadaniel left a comment

Choose a reason for hiding this comment

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

Needs update with main, failing application counts total test


const revisionResult = await testApplicationService.createRevisionRequest({
applicationId: testId,
revisionData: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use the existing revision request mock in application-controller? More reason to move it to mocks

Copy link
Contributor

Choose a reason for hiding this comment

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

Also used in requestApplicationRevisionsByInstitutionalRep test

@JamesTLopez JamesTLopez changed the title fix: Test Case Enhancements fix: Test Case Enhancements WIP Dec 2, 2025
@JamesTLopez JamesTLopez marked this pull request as ready for review December 8, 2025 01:50
@JamesTLopez JamesTLopez marked this pull request as draft December 8, 2025 01:51
@JamesTLopez JamesTLopez marked this pull request as ready for review January 7, 2026 19:33
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.

3 participants