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

IER12 E2E Tests #2322

Closed
2 tasks
michesmith opened this issue Sep 20, 2023 · 0 comments
Closed
2 tasks

IER12 E2E Tests #2322

michesmith opened this issue Sep 20, 2023 · 0 comments
Assignees
Labels
Institution Institution Features

Comments

@michesmith
Copy link
Collaborator

michesmith commented Sep 20, 2023

Description
Create E2E test for IER12 file generation.

Additional Context

  • Follow similar logic to the E2E test for MSFAA file generation (but with way more data).
  • Cover a select variety of scenarios, but not need to have complete coverage of all scenarios.

Acceptance Criteria

  • Create factory to generate the workflow_data information.
  • Create E2E test for IER12
@michesmith michesmith added the Institution Institution Features label Sep 25, 2023
@andrewsignori-aot andrewsignori-aot self-assigned this Oct 19, 2023
@michesmith michesmith added this to the Sprint 53 milestone Oct 24, 2023
andrewsignori-aot added a commit that referenced this issue Nov 1, 2023
Followed a similar idea used for MSFAA E2E tests where a controlled data
set was created to allow easy file record validation with minimal
variables. So, in the same way, MSFAA is using saveMSFAATestInputData,
the IER12 E2E is using saveIER12TestInputData.

Small helper methods were created in separate files with the idea of
sharing with other E2E test files for IER12.

The payload is supposed to be expressive and clearly define the IER12
data, as shown below. Constants like `JOHN_DOE_FROM_CANADA` or
`JANE_MONONYMOUS_FROM_OTHER_COUNTRY` was created to allow the reuse of
some basic data sets.

As much as possible the IR12 models use the DB models as a reference
(e.g. using Pick<>) and the overall idea is that these models represent
the specific set of properties that would impact the IER12 file content
directly or participate in its calculations.

### First E2E scenarios for IER12.
- Should generate an IER12 file with two records for a single student
with no dependents and two disbursements, one sent and one pending.
- Should generate an IER12 file with one record for a married student
(mononymous) with dependents, applications still in assessment, and one
pending disbursement.
- Should generate an IER12 file with one record for a dependant and
living with parents student with no dependents and one sent disbursement
with no BC funding.
- Should generate an IER12 file with one record for a student with one
pending disbursement due to a restriction.

### Refactors
- Changed the student number source from application dynamic data to the
application table.
andrewsignori-aot added a commit that referenced this issue Nov 3, 2023
- Created two more scenarios from the previous PR (#2461) to-do list.
  - Has full-time disbursement feedback errors (DISE).
- Has a disbursement that withheld funding due to a restriction (DISW).
  
- The first E2E above is invoking the processor without specifying the
date as per [previous PR
comment](#2461 (comment)).
- New E2E factory created `createDisbursementFeedbackError`.
- Added an exception in case `getUploadedFile` was invoked but it was
never called. The tests were failing with a not-so-clear error.
- Fixed an error in the IER12 query `BETWEEN` operator and removed a
code TODO.
andrewsignori-aot added a commit that referenced this issue Nov 6, 2023
- Changed the `saveIER12TestInputData` to use provided locations instead
of creating a brand new one every time.
- Once the institutions/locations were no longer brand new every time
there were conflicts with the SABC program code. The logic was adapted
to allow reusing the programs for the same institution and the same SABC
code instead of creating new programs every time (which will generate
the conflict).
- Added the scenario to allow multiple files to be generated from
different institutions/locations.
- _Should generate 2 IER12 files for locations from different
institutions using distinct institution codes._
- Created `getUploadedFiles` to allow getting multiple uploaded files.
The method `getUploadedFile` was kept for now to prevent further
refactoring and also it can be used as a helper since most of the same
we upload one file only.
- Fix for a dynamic data assertion that was being treated as a constant
which will make the E2E tests fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Institution Institution Features
Projects
None yet
Development

No branches or pull requests

2 participants