This directory contains UI components for rendering different types of journey callbacks in the e2e test application. Each component follows a consistent pattern and handles the specific requirements of its callback type.
attribute-input.ts-AttributeInputCallback- Handles string, number, and boolean attribute inputs with appropriate input typeschoice.ts-ChoiceCallback- Renders a select dropdown with available choicesconfirmation.ts-ConfirmationCallback- Creates radio buttons for confirmation optionskba-create.ts-KbaCreateCallback- Two-field form for creating security questions and answerspassword.ts-PasswordCallback- Password input fieldtext-input.ts-NameCallback,TextInputCallback- Generic text input componentvalidated-password.ts-ValidatedCreatePasswordCallback- Password input with validationvalidated-username.ts-ValidatedCreateUsernameCallback- Username input with validation
text-output.ts-TextOutputCallback- Displays text messagessuspended-text-output.ts-SuspendedTextOutputCallback- Styled suspension message display
redirect.ts-RedirectCallback- Button to trigger external redirectsselect-idp.ts-SelectIdPCallback- Radio buttons for identity provider selectionterms-and-conditions.ts-TermsAndConditionsCallback- Terms display with acceptance checkbox
recaptcha.ts-ReCaptchaCallback- reCAPTCHA challenge placeholderrecaptcha-enterprise.ts-ReCaptchaEnterpriseCallback- reCAPTCHA Enterprise placeholderping-protect-evaluation.ts-PingOneProtectEvaluationCallback- Risk assessment displayping-protect-initialize.ts-PingOneProtectInitializeCallback- Protection initialization
device-profile.ts-DeviceProfileCallback- Device profiling indicatorhidden-value.ts-HiddenValueCallback- Hidden input fieldmetadata.ts-MetadataCallback- Hidden metadata storagepolling-wait.ts-PollingWaitCallback- Loading spinner with wait message
All components follow this consistent pattern:
export default function componentName(
journeyEl: HTMLDivElement,
callback: CallbackType,
idx: number,
) {
// Create DOM elements
// Set up event listeners
// Append to journeyEl
}journeyEl- The container element to append the component tocallback- The callback instance with data and methodsidx- Index for generating unique IDs
import { choiceComponent } from './components/index.js';
// Render a choice callback
choiceComponent(containerDiv, choiceCallback, 0);- All components handle their own styling via inline CSS or style attributes
- Event listeners are set up to call appropriate callback methods
- Components generate unique IDs using the callback's input name or a fallback
- Error handling is implemented where appropriate
- Console logging is used for debugging and demonstration
Some components like reCAPTCHA and PingOne Protect include simulation timeouts for demonstration purposes in the e2e testing environment. In production, these would integrate with actual third-party services.