-
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 - Validate Multiple Files #2478
#2322 - IER12 E2E Tests - Validate Multiple Files #2478
Conversation
// an institution ensure that the relationship will be kept and | ||
// another institution will not be generated. | ||
const institution = | ||
relations?.institutionLocation?.institution ?? relations.institution; |
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.
👍
@@ -45,6 +45,7 @@ export function createFakeInstitutionLocation( | |||
count: 4, | |||
upcase: true, | |||
}); | |||
institutionLocation.hasIntegration = options?.initialValue?.hasIntegration; |
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.
did we miss this in the previous iterations? or why was this added now?
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.
It was not needed till now.
return uploadedFile; | ||
return sshClientMock.put.mock.calls.map((call) => { | ||
const uploadedFile = {} as UploadedFile; | ||
const [input, remoteFilePath] = call; |
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 show stopper, just a suggestion. I believe we can remove this const and pass it in the call itself.
return sshClientMock.put.mock.calls.map(([input, remoteFilePath]) => {
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.
We can, I did the change and I am still not sure which one is cleaner from a code perspective.
Either way, I am accepting the suggestion.
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.
@@ -14,6 +15,15 @@ export function numberToText( | |||
return value.toString().padStart(options?.length ?? 10, "0"); | |||
} | |||
|
|||
/** |
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.
Is this method used anywhere?
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.
got it
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 , Please have a look on some doubts.
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, nice work
}, | ||
assessment: { | ||
triggerType: AssessmentTriggerType.OriginalAssessment, | ||
// Add o one hour to ensure the proper file upload order. |
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.
Add **o** one
??
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.
expectedRecords?: number; | ||
}, | ||
): QueueProcessSummaryResult { | ||
return { | ||
summary: [ | ||
`The uploaded file: ${process.env.INSTITUTION_REQUEST_FOLDER}\\ZZZY\\IER_012_${timestamp}.txt`, | ||
`The uploaded file: ${process.env.INSTITUTION_REQUEST_FOLDER}\\${options?.institutionCode}\\IER_012_${timestamp}.txt`, |
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.
LGTM @andrewsignori-aot 👍 nice work. only a very minor comment.
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! Great work!
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 👍
Kudos, SonarCloud Quality Gate passed!
|
}), | ||
]); | ||
// Assert file output. | ||
const [fileA, fileB] = getUploadedFiles(sftpClientMock); |
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.
👍
expectedRecords?: number; | ||
}, | ||
): QueueProcessSummaryResult { | ||
return { | ||
summary: [ | ||
`The uploaded file: ${process.env.INSTITUTION_REQUEST_FOLDER}\\ZZZY\\IER_012_${timestamp}.txt`, | ||
`The uploaded file: ${process.env.INSTITUTION_REQUEST_FOLDER}\\${options?.institutionCode}\\IER_012_${timestamp}.txt`, |
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.
Looks Good 👍
saveIER12TestInputData
to use provided locations instead of creating a brand new one every time.getUploadedFiles
to allow getting multiple uploaded files. The methodgetUploadedFile
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.