Merged
Conversation
grandmaester
requested changes
Jul 10, 2025
Contributor
grandmaester
left a comment
There was a problem hiding this comment.
@amberkamboj77 Looks good. Added few minor comments. Please check
nandan-bhat
reviewed
Jul 10, 2025
HVish
reviewed
Jul 11, 2025
HVish
reviewed
Jul 11, 2025
…upgrade components for better testability, mocks improvements
3c49903 to
0bb5653
Compare
grandmaester
pushed a commit
that referenced
this pull request
Jul 15, 2025
* feat: jest setup and test cases for login-id screen * fix: package.lock * fix: socialLogin to federatedLogin * fix: test case and readme addition * fix: test cases refactoring, readme update * refactoring(testing): improve jest setup, include ts support better, upgrade components for better testability, mocks improvements * fix: package-lock upgrade, verbatimModuleSyntax disabled for uds
amberkamboj77
pushed a commit
that referenced
this pull request
Oct 24, 2025
feat: mfa-begin-enroll-options screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📄 Description
This PR introduces Jest setup for testing screens. This PR covers test cases for
login-idscreen on scenarios like error handling, CAPTCHA display, social login buttons, passkey authentication, and form validation.Uses Jest manual mocks to replace Auth0 SDK imports with test data so tests don't make real API calls.
♻️ Changes
jest.config.cjswith module mapping and test environment setupsrc/__mocks__/@auth0/auth0-acul-js/login-id.tsreplaces SDK with test datasrc/test/utils/screen-test-utils.tsxwith form interaction helpers🧪 Testing
📈 Scaling to Other Screens
This setup works for login-id screen. For other screens, you'd need to:
signup.ts,password-reset.ts, etc.)Whether this scales well to 80+ screens depends on how similar the screen structures are. If screens have very different data formats or UI patterns, the utilities might need modification.
graph TD A[Test _test_ File] --> B[Import SDK] B --> C[Jest _mocks_ Directory] C --> D[Screen-Specific Mock Data] D --> E[Test Utilities Help Interaction] E --> F[Test Assertions] subgraph "Mock Structure" G[__mocks__/login-id.ts] H[__mocks__/signup.ts] I[__mocks__/password.ts] J[... other screens] end C --> GThis establishes the testing pattern for the login-id screen that can be extended to other screens.