MWPW-199051 [MEP] Save results of Rainfocus API to config.mep#6200
MWPW-199051 [MEP] Save results of Rainfocus API to config.mep#6200vgoodric wants to merge 15 commits into
Conversation
… config Updated the event initialization function to store fetched event details in the configuration object. This change enhances the management of event data and ensures that registration status can be accessed from the config. Added a corresponding test to verify the new behavior.
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
|
…ties Updated the personalization initialization function to ensure that existing MEPS properties are preserved when setting new values. This change improves the configuration management for personalization features.
|
This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR. |
Updated the event initialization function to return an object containing the registration status instead of a boolean. This change improves the clarity of the returned data and ensures that event details are consistently managed. Adjusted related personalization logic to utilize the new structure. Updated tests to reflect these changes.
Eliminated the spread operator from the MEPS configuration update in the personalization initialization function. This change simplifies the code while maintaining the integrity of the existing configuration properties.
…alues Refactored the event test cases to check the 'isRegistered' property of the event object instead of directly comparing the event to boolean values. This change aligns the tests with the updated event initialization function that returns a structured object, enhancing clarity and consistency in test assertions.
Updated the event handling functions to return a default object instead of an empty object when user ID or access token is unavailable. This change improves consistency in the returned data structure and enhances error handling. Adjusted related logic to utilize the new default return value.
…on check Updated the getPersonalizationVariant function to simplify the condition for checking user registration status. Removed unnecessary assignment of event details to the config object, enhancing code clarity and efficiency. Adjusted the initialization of event details in the config to ensure proper handling of promises.
|
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Event registration never triggered on Milo pages for two compounding reasons, plus an unhandled-rejection bug: - Casing: getMepEnablement read camelCase keys (signedIn/userId) but DA emits metadata names lowercase, so authored values never matched. Now falls back to the lowercase key while keeping URL params working. - userId gate assumed a Dexter-only SSR sentinel (userId="undefined") that Milo never emits, so a signed-in user with no userId meta hit `false !== 'undefined'` and returned false, never loading IMS. The gate now fails open to loadIms()/getProfile() to resolve the userId. - getProfile() rejections (e.g. no live IMS session) were unhandled and propagated through init(), blanking the page. Now caught -> not registered, page still renders.
|
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Add a persistent localStorage cache to the event addon, keyed by
event-code + userId, storing only { isRegistered, inPersonAttendee } —
never the RF authToken/userKey. Registered results cache 24h,
unregistered 3 min, mirroring the FEDS cacheTime model.
Normalize RF's empty {} response to { isRegistered: false }.
Redirect-cookie cache invalidation is implemented but gated off behind
REDIRECT_INVALIDATION_ENABLED pending VEAL confirmation of the cookie
name and domain.
Rename eventId -> eventCode throughout for accuracy.
…W-199051) Document at the code site that clearRegisteredFlag must set a matching domain= when the invalidation branch is enabled — a host-only delete won't clear a .adobe.com cookie, which would leave the flag stuck.
Resolves: MWPW-199051
Test URLs:
Update — event-code + Milo-page registration
registeredaudience to match onevent?.isRegisteredrather than the presence of a resolved eventloadMepAddonsfromevent-idtoevent-code— the addon keyson the event property code (e.g. max2025), not the per-event UUID.
(
signedin/userid) as well as camelCase, fail open to IMSgetProfile()when nouserIdmeta is present, and guardloadIms()/getProfile()so a missing IMS sessioncan no longer blank the page.
Update — persistent registration cache
FEDS
cacheTime), keyed by event-code + userId. Persists only{ isRegistered, inPersonAttendee }— never the RF authToken/userKey.{}response to{ isRegistered: false }.REDIRECT_INVALIDATION_ENABLED, pending confirmation of the cookie name/domain (seeticket comment). Cache self-heals via the 3-min TTL until then.