-
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
#3738 - E2E Tests SIMS to SFAS #3847
Conversation
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, added few comments for clarifications.
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
/** | ||
* Add milliseconds to a given date. | ||
* @param yearsToAdd number of years to be added. | ||
* @param date date. |
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.
Double white space.
Same for both methods.
|
||
beforeEach(async () => { | ||
// Reset all SFAS bridge logs. | ||
await db.sfasBridgeLog.delete({ id: MoreThan(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.
We also use truncate for these situations, as below:
Line 64 in 4e3b55a
await db.dataSource.query("TRUNCATE TABLE sims.student_loan_balances"); |
...rocessors/schedulers/sfas-integration/_tests_/sims-to-sfas-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
expect(footer).toBe("999000000001"); | ||
expect(studentRecord).toBe(buildStudentRecord(student)); | ||
// Check the database for creation of SFAS bridge log. | ||
const uploadedFileLog = await db.sfasBridgeLog.findOneBy({ |
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 have been using exists
also for these types of checks.
}, | ||
); | ||
|
||
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.
Can we be consistent about where the white space goes? This description was added twice. I would recommend adding to the end of the lines only.
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.
A great foundation for upcoming bridge file tests. Only minor comments and suggestions, hence approving it, looks good 👍
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 to me!
|
SIMS TO SFAS E2E TESTS
TEST SCENARIOS
New Library for mocking the current date retuned by the code
new Date()
) returned, a new library mockdate has been added.