-
Notifications
You must be signed in to change notification settings - Fork 174
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
Checking if Ims is already initialized before loading it #2802
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #2802 +/- ##
==========================================
- Coverage 95.90% 95.90% -0.01%
==========================================
Files 173 173
Lines 45842 46075 +233
==========================================
+ Hits 43967 44187 +220
- Misses 1875 1888 +13 ☔ View full report in Codecov by Sentry. |
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.
I just realized imsLoaded = window.adobeIMS?.initialized;
will be a boolean rather than promise, if someone calls loadIms.then()
we'd return a boolean and have JS errors trying to access true.then
Would be great to change the return value to a promise that resolves and write a unit test for this scenario.
Updated the code. |
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.
Cool, this looks simple, clean & full fills the adobe home request. Love it 🚀
Validation done on below url check sign in functionality CC : @sigadamvenkata |
Skipped 2802: "Checking if Ims is already initialized before loading it" due to file "libs/blocks/global-navigation/global-navigation.js" overlap. Merging will be attempted in the next batch |
Resolves: MWPW-157425
Test URLs: