-
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
#1864 - MSFAA Receive File E2E Test Automation #1913
#1864 - MSFAA Receive File E2E Test Automation #1913
Conversation
{ dateSigned: IsNull() }, | ||
{ dateSigned: getISODateOnlyString(new Date()) }, | ||
); | ||
// Cancel any pending MSFAA. |
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.
mm...here what does it mean "pending MSFAA"? when dateSigned === null
then MSFAA is pending, right?
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.
}, | ||
}); | ||
expect(msfaaUpdatedRecords).toHaveLength(msfaaInputData.length); | ||
const [fistSignedMSFAA, cancelledMSFAA, secondSignedMSFAA] = |
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: the name of the variable should be "firstSignedMSFAA".
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.
Fixed.
...msfaa-integration/_tests_/msfaa-part-time-process-response-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
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 job!
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.
Good work with receive file test👍 just minor comments.
@@ -76,7 +83,7 @@ export class MSFAAResponseProcessingService { | |||
try { | |||
await this.processCancelledRecord(cancelledRecord); | |||
result.processSummary.push( | |||
`Status cancelled record from line ${cancelledRecord.lineNumber}.`, | |||
`Record from line ${cancelledRecord.lineNumber}, updated as canceled.`, |
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.
cancelled ?
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.
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.
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.
LGTM, nice work @andrewsignori-aot
mockDownloadFiles
to allow the simulation of a file downloaded from SFTP.The file will be available on the disk and the SSH client methods
list
andget
will be mocked to allow the SSH methods to be invoked as usual but returning the mocked file instead.getStructuredRecords
andcreateFileFromStructuredRecords
to allow the file content manipulation before the mocked file content is downloaded.E2E tests
√ Should process an MSFAA response with confirmations and a cancellation and update all records when the file is received as expected. (280 ms)
√ Should successfully process 2 MSFAA records when a file has 3 records but one throws an error during DB update. (212 ms)
√ Should throw an error when the MSFAA file contains an invalid SIN hash total. (14 ms)
√ Should throw an error when the MSFAA file contains an invalid record count. (7 ms)
√ Should throw an error when the MSFAA file contains an invalid header code. (9 ms)
√ Should throw an error when the MSFAA file contains an invalid footer code. (9 ms)