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

#1777 - Process MSFAA Cancellation Notification e2e tests #2069

Merged
merged 4 commits into from
Jul 4, 2023

Conversation

sh16011993
Copy link
Collaborator

When the full-time or part-time cancellation record files are received, the corresponding MSFAA records are cancelled and notification is persisted in the database.

As a part of this PR, e2e tests are written to validate the notifications when the MSFAA record gets cancelled.

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments

MSFAA_FULL_TIME_RECEIVE_FILE_WITH_SINGLE_CANCELLATION_RECORD,
]);
// Act
// Now cancel the MSFAA record.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the "Now" or the entire comment line.

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this suggestion accepted? I am not able to see the change.

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, please take a look at the comments.

@dheepak-aot
Copy link
Collaborator

Good job! Just have one additional minor comments. Other DEVS have pretty much covered everything.

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Please look at the other devs comments. Don't wait for my approval 😉

expect(cancelledMSFAARecord.cancelledDate).toBe("2021-11-24");
expect(cancelledMSFAARecord.newIssuingProvince).toBe("ON");
expect(notification.dateSent).toBe(null);
expect(notification.messagePayload).toStrictEqual({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this verification.
@ann-aot @guru-aot @dheepak-aot I believe that we can check the dynamic payload saved also as much as possible as part of the E2Es.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is good

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the changes, look good 👍

@@ -132,12 +138,15 @@ describe(
const msfaaIDs = createdMSFAARecords.map((msfaa) => msfaa.id);
const msfaaUpdatedRecords = await db.msfaaNumber.find({
select: {
id: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ann-aot . Removed it.

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 just a minor comment

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.89% ( 2127 / 11890 )
Methods: 8.32% ( 126 / 1515 )
Lines: 20.68% ( 1863 / 9008 )
Branches: 10.1% ( 138 / 1367 )

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 71% ( 399 / 562 )
Methods: 61.97% ( 44 / 71 )
Lines: 72.97% ( 351 / 481 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 49.81% ( 267 / 536 )
Methods: 41.56% ( 32 / 77 )
Lines: 55.33% ( 218 / 394 )
Branches: 26.15% ( 17 / 65 )

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

E2E SIMS API Coverage Report

Totals Coverage
Statements: 50.18% ( 3543 / 7061 )
Methods: 45.63% ( 418 / 916 )
Lines: 55.38% ( 2915 / 5264 )
Branches: 23.84% ( 210 / 881 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the changes 👍

@sh16011993 sh16011993 merged commit 7174a2c into main Jul 4, 2023
@sh16011993 sh16011993 deleted the 1777_process_msfaa_cancellation_notification_e2e branch July 4, 2023 20:47
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 20:57 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 20:59 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 20:59 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 20:59 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 20:59 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 21:01 — with GitHub Actions Inactive
@sh16011993 sh16011993 temporarily deployed to DEV July 4, 2023 21:01 — with GitHub Actions Inactive
Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work @sh16011993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants