-
Notifications
You must be signed in to change notification settings - Fork 14
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
#2322 - IER12 E2E Tests Additional Scenarios #2474
#2322 - IER12 E2E Tests Additional Scenarios #2474
Conversation
const [errorCode] = FULL_TIME_DISBURSEMENT_FEEDBACK_ERRORS; | ||
const [disbursementSchedule] = | ||
application.currentAssessment.disbursementSchedules; | ||
const feedbackError = createDisbursementFeedbackError( |
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.
Minor. Should we follow the naming convention of createFake*?
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.
Changed.
// Queued job. | ||
// No date provided as it is expected that the disbursement feedback error | ||
// date would ensure the IER12 record is generated. | ||
const job = createIER12SchedulerJobMock(); |
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.
IER here is running based on current date -1 and picking the IER record based on feedback error table.
Amazing to see this level of validation in E2E ❤️
@@ -50,6 +50,11 @@ export function getUploadedFile( | |||
sshClientMock: DeepMocked<Client>, | |||
): UploadedFile { | |||
const uploadedFile = {} as UploadedFile; | |||
if (!sshClientMock.put.mock.calls.length) { | |||
throw new Error( |
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.
👍
const startDate = new Date(date); | ||
startDate.setHours(0, 0, 0, 0); | ||
const endDate = addDays(1, startDate); | ||
return And(MoreThanOrEqual(startDate), LessThan(endDate)); |
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.
👍
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.
Great to see the level of validation for IER12. Approving with one very minor comment.
I believe there is going to be an upcoming PR for multiple institutions scenario right?
Yes, the idea is still the same: try to finish what we can inside the sprint. I will take this scenario as a priority for the upcoming PR 😉 |
@@ -50,6 +50,11 @@ export function getUploadedFile( | |||
sshClientMock: DeepMocked<Client>, | |||
): UploadedFile { |
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.
Not a part of this PR but maybe we can update the comment to: "Get the parameters provided to the put method of the SSH client that represents the remote file path and the data that would be uploaded to the SFTP in a real scenario."
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.
Changed.
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.
Nice work 👍 @andrewsignori-aot
@@ -217,10 +220,8 @@ describe(describeProcessorRootTest(QueueNames.IER12Integration), () => { | |||
|
|||
// Act | |||
const ier12Results = await processor.processIER12File(job); | |||
db.application.createQueryBuilder(); |
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.
👍
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.
Nice work @andrewsignori-aot 👍
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.
Looks good!
Kudos, SonarCloud Quality Gate passed!
|
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.
LGTM
Created two more scenarios from the previous PR (#2322 - IER12 E2E Tests - First scenarios #2461) to-do list.
The first E2E above is invoking the processor without specifying the date as per previous PR 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.