-
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
#4014 - Institution Read-Only User Type PART 2 (UI) (Part 2) #4338
#4014 - Institution Read-Only User Type PART 2 (UI) (Part 2) #4338
Conversation
...ests_/e2e/institution-user.institutions.controller.createInstitutionUserWithAuth.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...ests_/e2e/institution-user.institutions.controller.createInstitutionUserWithAuth.e2e-spec.ts
Show resolved
Hide resolved
...ests_/e2e/institution-user.institutions.controller.updateInstitutionUserWithAuth.e2e-spec.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/testHelpers/auth/bceid-helpers.ts
Outdated
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.
Nice work and thanks for adding the E2Es on both methods. Please take a look at the comments.
* Mocks BCeID account info from BCeID service to return the passed BCeID account. | ||
* @param testingModule nest testing module. | ||
* @param user a persisted user object. | ||
* @param displayName a persisted display name for user login. |
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.
Please remove the displayName
from the comments.
* @param testingModule nest testing module. | ||
* @param user a persisted user object. | ||
* @param displayName a persisted display name for user login. | ||
* @param institution a persisted institution object. |
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.
Please review the parameters.
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.
Thanks for making the changes, looks good 👍
Please review the comments for the methods mockBCeIDAccountUserNotFound
and mockBCeIDAccountUserFound
, they have some leftovers comments to be cleanup 😉
|
* @param institution a persisted institution object. | ||
* @returns a persisted BCeID account object. | ||
*/ | ||
export async function mockBCeIDAccountUserFound( |
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.
As @andrewsignori-aot mentioned, can we have a reset for this mock, so that we use the mock only when required and it defaults to original implementation otherwise.
If you are willing to have a reset in place. Here is a reference to do that Reset Mock Existing.
Btw, the comment is not a blocker.
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.
Thanks for the suggestion @dheepak-aot. The rest mock is not needed in this case.
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 @lewischen-aot. Just one comment which is not a blocker.
As the second part of this story, this PR has the following changes:
mockBCeIDAccountDetails
to mock the response from methodbceIDService.getAccountDetails
to assist the endpoint methodcreateInstitutionUserWithAuth
.Screenshots of E2E tests
