@openedx/frontend-app-authn 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Main.d.ts +3 -0
- package/{src/Main.tsx → dist/Main.js} +4 -15
- package/dist/Main.js.map +1 -0
- package/dist/app.d.ts +3 -0
- package/dist/app.js +41 -0
- package/dist/app.js.map +1 -0
- package/dist/app.scss +2 -0
- package/dist/base-container/components/default-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/default-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/default-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/SmallLayout.js +11 -0
- package/dist/base-container/components/default-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/index.d.ts +3 -0
- package/{src/base-container/components/default-layout/index.jsx → dist/base-container/components/default-layout/index.js} +1 -0
- package/dist/base-container/components/default-layout/index.js.map +1 -0
- package/dist/base-container/components/default-layout/messages.d.ts +13 -0
- package/dist/base-container/components/default-layout/messages.js +15 -0
- package/dist/base-container/components/default-layout/messages.js.map +1 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/image-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/image-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/SmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/index.d.ts +4 -0
- package/{src/base-container/components/image-layout/index.jsx → dist/base-container/components/image-layout/index.js} +1 -0
- package/dist/base-container/components/image-layout/index.js.map +1 -0
- package/dist/base-container/components/image-layout/messages.d.ts +13 -0
- package/dist/base-container/components/image-layout/messages.js +15 -0
- package/dist/base-container/components/image-layout/messages.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/index.d.ts +3 -0
- package/{src/base-container/components/welcome-page-layout/index.jsx → dist/base-container/components/welcome-page-layout/index.js} +1 -0
- package/dist/base-container/components/welcome-page-layout/index.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/messages.d.ts +18 -0
- package/dist/base-container/components/welcome-page-layout/messages.js +20 -0
- package/dist/base-container/components/welcome-page-layout/messages.js.map +1 -0
- package/dist/base-container/index.d.ts +20 -0
- package/dist/base-container/index.js +27 -0
- package/dist/base-container/index.js.map +1 -0
- package/dist/common-components/EmbeddedRegistrationRoute.d.ts +14 -0
- package/{src/common-components/EmbeddedRegistrationRoute.jsx → dist/common-components/EmbeddedRegistrationRoute.js} +9 -13
- package/dist/common-components/EmbeddedRegistrationRoute.js.map +1 -0
- package/dist/common-components/EnterpriseSSO.d.ts +29 -0
- package/dist/common-components/EnterpriseSSO.js +55 -0
- package/dist/common-components/EnterpriseSSO.js.map +1 -0
- package/dist/common-components/FormGroup.d.ts +60 -0
- package/dist/common-components/FormGroup.js +66 -0
- package/dist/common-components/FormGroup.js.map +1 -0
- package/dist/common-components/InstitutionLogistration.d.ts +34 -0
- package/dist/common-components/InstitutionLogistration.js +38 -0
- package/dist/common-components/InstitutionLogistration.js.map +1 -0
- package/dist/common-components/NotFoundPage.d.ts +2 -0
- package/dist/common-components/NotFoundPage.js +5 -0
- package/dist/common-components/NotFoundPage.js.map +1 -0
- package/dist/common-components/PasswordField.d.ts +39 -0
- package/dist/common-components/PasswordField.js +94 -0
- package/dist/common-components/PasswordField.js.map +1 -0
- package/dist/common-components/RedirectLogistration.d.ts +39 -0
- package/dist/common-components/RedirectLogistration.js +68 -0
- package/dist/common-components/RedirectLogistration.js.map +1 -0
- package/dist/common-components/RegisterFaIcons.d.ts +1 -0
- package/dist/common-components/RegisterFaIcons.js +6 -0
- package/dist/common-components/RegisterFaIcons.js.map +1 -0
- package/dist/common-components/SocialAuthProviders.d.ts +23 -0
- package/dist/common-components/SocialAuthProviders.js +42 -0
- package/dist/common-components/SocialAuthProviders.js.map +1 -0
- package/dist/common-components/ThirdPartyAuth.d.ts +42 -0
- package/dist/common-components/ThirdPartyAuth.js +56 -0
- package/dist/common-components/ThirdPartyAuth.js.map +1 -0
- package/dist/common-components/ThirdPartyAuthAlert.d.ts +15 -0
- package/dist/common-components/ThirdPartyAuthAlert.js +32 -0
- package/dist/common-components/ThirdPartyAuthAlert.js.map +1 -0
- package/dist/common-components/UnAuthOnlyRoute.d.ts +14 -0
- package/dist/common-components/UnAuthOnlyRoute.js +31 -0
- package/dist/common-components/UnAuthOnlyRoute.js.map +1 -0
- package/dist/common-components/data/actions.d.ts +26 -0
- package/{src → dist}/common-components/data/actions.js +8 -13
- package/dist/common-components/data/actions.js.map +1 -0
- package/dist/common-components/data/reducers.d.ts +62 -0
- package/dist/common-components/data/reducers.js +39 -0
- package/dist/common-components/data/reducers.js.map +1 -0
- package/dist/common-components/data/sagas.d.ts +12 -0
- package/dist/common-components/data/sagas.js +21 -0
- package/dist/common-components/data/sagas.js.map +1 -0
- package/dist/common-components/data/selectors.d.ts +98 -0
- package/dist/common-components/data/selectors.js +11 -0
- package/dist/common-components/data/selectors.js.map +1 -0
- package/dist/common-components/data/service.d.ts +5 -0
- package/dist/common-components/data/service.js +31 -0
- package/dist/common-components/data/service.js.map +1 -0
- package/dist/common-components/index.d.ts +13 -0
- package/{src/common-components/index.jsx → dist/common-components/index.js} +1 -0
- package/dist/common-components/index.js.map +1 -0
- package/dist/common-components/messages.d.ts +113 -0
- package/dist/common-components/messages.js +126 -0
- package/dist/common-components/messages.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/{src/constants.ts → dist/constants.js} +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/data/configureStore.d.ts +3 -0
- package/{src → dist}/data/configureStore.js +11 -20
- package/dist/data/configureStore.js.map +1 -0
- package/dist/data/constants.d.ts +24 -0
- package/{src → dist}/data/constants.js +4 -8
- package/dist/data/constants.js.map +1 -0
- package/dist/data/countries.d.ts +26 -0
- package/{src/data/countries.ts → dist/data/countries.js} +6 -9
- package/dist/data/countries.js.map +1 -0
- package/dist/data/oneTrust.d.ts +2 -0
- package/dist/data/oneTrust.js +3 -0
- package/dist/data/oneTrust.js.map +1 -0
- package/dist/data/reducers.d.ts +254 -0
- package/dist/data/reducers.js +17 -0
- package/dist/data/reducers.js.map +1 -0
- package/dist/data/sagas.d.ts +1 -0
- package/{src → dist}/data/sagas.js +9 -10
- package/dist/data/sagas.js.map +1 -0
- package/dist/data/utils/cookies.d.ts +1 -0
- package/dist/data/utils/cookies.js +12 -0
- package/dist/data/utils/cookies.js.map +1 -0
- package/dist/data/utils/dataUtils.d.ts +11 -0
- package/dist/data/utils/dataUtils.js +67 -0
- package/dist/data/utils/dataUtils.js.map +1 -0
- package/dist/data/utils/index.d.ts +3 -0
- package/dist/data/utils/index.js +4 -0
- package/dist/data/utils/index.js.map +1 -0
- package/dist/data/utils/reduxUtils.d.ts +15 -0
- package/dist/data/utils/reduxUtils.js +29 -0
- package/dist/data/utils/reduxUtils.js.map +1 -0
- package/dist/data/utils/useMobileResponsive.d.ts +7 -0
- package/dist/data/utils/useMobileResponsive.js +22 -0
- package/dist/data/utils/useMobileResponsive.js.map +1 -0
- package/dist/field-renderer/FieldRenderer.d.ts +34 -0
- package/dist/field-renderer/FieldRenderer.js +70 -0
- package/dist/field-renderer/FieldRenderer.js.map +1 -0
- package/dist/field-renderer/index.d.ts +1 -0
- package/{src/field-renderer/index.jsx → dist/field-renderer/index.js} +1 -0
- package/dist/field-renderer/index.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordAlert.d.ts +16 -0
- package/dist/forgot-password/ForgotPasswordAlert.js +66 -0
- package/dist/forgot-password/ForgotPasswordAlert.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordPage.d.ts +36 -0
- package/dist/forgot-password/ForgotPasswordPage.js +91 -0
- package/dist/forgot-password/ForgotPasswordPage.js.map +1 -0
- package/dist/forgot-password/data/actions.d.ts +30 -0
- package/{src → dist}/forgot-password/data/actions.js +10 -16
- package/dist/forgot-password/data/actions.js.map +1 -0
- package/dist/forgot-password/data/reducers.d.ts +13 -0
- package/dist/forgot-password/data/reducers.js +46 -0
- package/dist/forgot-password/data/reducers.js.map +1 -0
- package/dist/forgot-password/data/sagas.d.ts +4 -0
- package/dist/forgot-password/data/sagas.js +28 -0
- package/dist/forgot-password/data/sagas.js.map +1 -0
- package/dist/forgot-password/data/selectors.d.ts +23 -0
- package/dist/forgot-password/data/selectors.js +5 -0
- package/dist/forgot-password/data/selectors.js.map +1 -0
- package/dist/forgot-password/data/service.d.ts +1 -0
- package/dist/forgot-password/data/service.js +26 -0
- package/dist/forgot-password/data/service.js.map +1 -0
- package/dist/forgot-password/index.d.ts +5 -0
- package/{src → dist}/forgot-password/index.js +1 -0
- package/dist/forgot-password/index.js.map +1 -0
- package/dist/forgot-password/messages.d.ts +123 -0
- package/dist/forgot-password/messages.js +128 -0
- package/dist/forgot-password/messages.js.map +1 -0
- package/dist/i18n/index.d.ts +25 -0
- package/dist/i18n/index.js +26 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/login/AccountActivationMessage.d.ts +14 -0
- package/dist/login/AccountActivationMessage.js +49 -0
- package/dist/login/AccountActivationMessage.js.map +1 -0
- package/dist/login/ChangePasswordPrompt.d.ts +18 -0
- package/dist/login/ChangePasswordPrompt.js +45 -0
- package/dist/login/ChangePasswordPrompt.js.map +1 -0
- package/dist/login/LoginFailure.d.ts +25 -0
- package/dist/login/LoginFailure.js +109 -0
- package/dist/login/LoginFailure.js.map +1 -0
- package/dist/login/LoginPage.d.ts +10 -0
- package/dist/login/LoginPage.js +216 -0
- package/dist/login/LoginPage.js.map +1 -0
- package/dist/login/data/actions.d.ts +36 -0
- package/{src → dist}/login/data/actions.js +12 -19
- package/dist/login/data/actions.js.map +1 -0
- package/dist/login/data/constants.d.ts +17 -0
- package/{src → dist}/login/data/constants.js +4 -4
- package/dist/login/data/constants.js.map +1 -0
- package/dist/login/data/reducers.d.ts +82 -0
- package/dist/login/data/reducers.js +44 -0
- package/dist/login/data/reducers.js.map +1 -0
- package/dist/login/data/sagas.d.ts +10 -0
- package/dist/login/data/sagas.js +34 -0
- package/dist/login/data/sagas.js.map +1 -0
- package/dist/login/data/service.d.ts +4 -0
- package/dist/login/data/service.js +32 -0
- package/dist/login/data/service.js.map +1 -0
- package/dist/login/index.d.ts +4 -0
- package/{src → dist}/login/index.js +1 -1
- package/dist/login/index.js.map +1 -0
- package/dist/login/messages.d.ts +198 -0
- package/dist/login/messages.js +210 -0
- package/dist/login/messages.js.map +1 -0
- package/dist/logistration/Logistration.d.ts +32 -0
- package/dist/logistration/Logistration.js +106 -0
- package/dist/logistration/Logistration.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfiling.d.ts +46 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js +167 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.d.ts +13 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +24 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -0
- package/dist/progressive-profiling/data/actions.d.ts +19 -0
- package/{src → dist}/progressive-profiling/data/actions.js +6 -10
- package/dist/progressive-profiling/data/actions.js.map +1 -0
- package/dist/progressive-profiling/data/reducers.d.ts +22 -0
- package/dist/progressive-profiling/data/reducers.js +23 -0
- package/dist/progressive-profiling/data/reducers.js.map +1 -0
- package/dist/progressive-profiling/data/sagas.d.ts +4 -0
- package/dist/progressive-profiling/data/sagas.js +17 -0
- package/dist/progressive-profiling/data/sagas.js.map +1 -0
- package/dist/progressive-profiling/data/selectors.d.ts +39 -0
- package/{src → dist}/progressive-profiling/data/selectors.js +4 -9
- package/dist/progressive-profiling/data/selectors.js.map +1 -0
- package/dist/progressive-profiling/data/service.d.ts +1 -0
- package/dist/progressive-profiling/data/service.js +23 -0
- package/dist/progressive-profiling/data/service.js.map +1 -0
- package/dist/progressive-profiling/index.d.ts +4 -0
- package/{src → dist}/progressive-profiling/index.js +1 -1
- package/dist/progressive-profiling/index.js.map +1 -0
- package/dist/progressive-profiling/messages.d.ts +53 -0
- package/dist/progressive-profiling/messages.js +57 -0
- package/dist/progressive-profiling/messages.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +38 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js +95 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/validator.d.ts +8 -0
- package/dist/register/RegistrationFields/CountryField/validator.js +29 -0
- package/dist/register/RegistrationFields/CountryField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.d.ts +30 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js +80 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/constants.d.ts +3 -0
- package/dist/register/RegistrationFields/EmailField/constants.js +130 -0
- package/dist/register/RegistrationFields/EmailField/constants.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/validator.d.ts +17 -0
- package/dist/register/RegistrationFields/EmailField/validator.js +107 -0
- package/dist/register/RegistrationFields/EmailField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.d.ts +21 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js +40 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/NameField.d.ts +29 -0
- package/dist/register/RegistrationFields/NameField/NameField.js +52 -0
- package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/validator.d.ts +5 -0
- package/{src → dist}/register/RegistrationFields/NameField/validator.js +9 -12
- package/dist/register/RegistrationFields/NameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.d.ts +16 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js +24 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.d.ts +31 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js +113 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/validator.d.ts +4 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js +15 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/index.d.ts +6 -0
- package/{src → dist}/register/RegistrationFields/index.js +1 -0
- package/dist/register/RegistrationFields/index.js.map +1 -0
- package/dist/register/RegistrationPage.d.ts +18 -0
- package/dist/register/RegistrationPage.js +216 -0
- package/dist/register/RegistrationPage.js.map +1 -0
- package/dist/register/components/ConfigurableRegistrationForm.d.ts +37 -0
- package/dist/register/components/ConfigurableRegistrationForm.js +145 -0
- package/dist/register/components/ConfigurableRegistrationForm.js.map +1 -0
- package/dist/register/components/RegistrationFailure.d.ts +19 -0
- package/dist/register/components/RegistrationFailure.js +57 -0
- package/dist/register/components/RegistrationFailure.js.map +1 -0
- package/dist/register/data/actions.d.ts +80 -0
- package/{src → dist}/register/data/actions.js +26 -42
- package/dist/register/data/actions.js.map +1 -0
- package/dist/register/data/constants.d.ts +10 -0
- package/{src → dist}/register/data/constants.js +4 -4
- package/dist/register/data/constants.js.map +1 -0
- package/dist/register/data/reducers.d.ts +237 -0
- package/dist/register/data/reducers.js +86 -0
- package/dist/register/data/reducers.js.map +1 -0
- package/dist/register/data/sagas.d.ts +19 -0
- package/dist/register/data/sagas.js +45 -0
- package/dist/register/data/sagas.js.map +1 -0
- package/dist/register/data/selectors.d.ts +26 -0
- package/dist/register/data/selectors.js +25 -0
- package/dist/register/data/selectors.js.map +1 -0
- package/dist/register/data/service.d.ts +8 -0
- package/dist/register/data/service.js +46 -0
- package/dist/register/data/service.js.map +1 -0
- package/dist/register/data/utils.d.ts +6 -0
- package/dist/register/data/utils.js +128 -0
- package/dist/register/data/utils.js.map +1 -0
- package/dist/register/index.d.ts +3 -0
- package/{src → dist}/register/index.js +1 -0
- package/dist/register/index.js.map +1 -0
- package/dist/register/messages.d.ts +193 -0
- package/dist/register/messages.js +205 -0
- package/dist/register/messages.js.map +1 -0
- package/dist/reset-password/ResetPasswordFailure.d.ts +15 -0
- package/dist/reset-password/ResetPasswordFailure.js +44 -0
- package/dist/reset-password/ResetPasswordFailure.js.map +1 -0
- package/dist/reset-password/ResetPasswordPage.d.ts +32 -0
- package/dist/reset-password/ResetPasswordPage.js +150 -0
- package/dist/reset-password/ResetPasswordPage.js.map +1 -0
- package/dist/reset-password/ResetPasswordSuccess.d.ts +2 -0
- package/dist/reset-password/ResetPasswordSuccess.js +10 -0
- package/dist/reset-password/ResetPasswordSuccess.js.map +1 -0
- package/dist/reset-password/data/actions.d.ts +56 -0
- package/{src → dist}/reset-password/data/actions.js +17 -26
- package/dist/reset-password/data/actions.js.map +1 -0
- package/dist/reset-password/data/constants.d.ts +13 -0
- package/{src → dist}/reset-password/data/constants.js +6 -7
- package/dist/reset-password/data/constants.js.map +1 -0
- package/dist/reset-password/data/reducers.d.ts +19 -0
- package/dist/reset-password/data/reducers.js +25 -0
- package/dist/reset-password/data/reducers.js.map +1 -0
- package/dist/reset-password/data/sagas.d.ts +7 -0
- package/dist/reset-password/data/sagas.js +63 -0
- package/dist/reset-password/data/sagas.js.map +1 -0
- package/dist/reset-password/data/selectors.d.ts +23 -0
- package/dist/reset-password/data/selectors.js +5 -0
- package/dist/reset-password/data/selectors.js.map +1 -0
- package/dist/reset-password/data/service.d.ts +3 -0
- package/dist/reset-password/data/service.js +62 -0
- package/dist/reset-password/data/service.js.map +1 -0
- package/dist/reset-password/index.d.ts +5 -0
- package/{src → dist}/reset-password/index.js +1 -0
- package/dist/reset-password/index.js.map +1 -0
- package/dist/reset-password/messages.d.ts +83 -0
- package/dist/reset-password/messages.js +87 -0
- package/dist/reset-password/messages.js.map +1 -0
- package/dist/routes.d.ts +18 -0
- package/dist/routes.js +75 -0
- package/dist/routes.js.map +1 -0
- package/{src → dist}/sass/_base_component.scss +57 -54
- package/{src → dist}/sass/_progressive_profiling_page.scss +1 -3
- package/{src → dist}/sass/_registration.scss +7 -8
- package/{src → dist}/sass/_style.scss +40 -43
- package/package.json +17 -6
- package/src/__mocks__/file.js +0 -1
- package/src/__mocks__/svg.js +0 -1
- package/src/app.scss +0 -6
- package/src/app.ts +0 -43
- package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
- package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
- package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
- package/src/base-container/components/default-layout/messages.js +0 -16
- package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
- package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
- package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/messages.js +0 -16
- package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
- package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
- package/src/base-container/components/welcome-page-layout/messages.js +0 -21
- package/src/base-container/index.jsx +0 -70
- package/src/base-container/tests/BaseContainer.test.jsx +0 -44
- package/src/common-components/EnterpriseSSO.jsx +0 -110
- package/src/common-components/FormGroup.jsx +0 -106
- package/src/common-components/InstitutionLogistration.jsx +0 -102
- package/src/common-components/NotFoundPage.jsx +0 -15
- package/src/common-components/PasswordField.jsx +0 -175
- package/src/common-components/RedirectLogistration.jsx +0 -94
- package/src/common-components/RegisterFaIcons.jsx +0 -8
- package/src/common-components/SocialAuthProviders.jsx +0 -75
- package/src/common-components/ThirdPartyAuth.jsx +0 -123
- package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
- package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
- package/src/common-components/data/reducers.js +0 -63
- package/src/common-components/data/sagas.js +0 -32
- package/src/common-components/data/selectors.js +0 -28
- package/src/common-components/data/service.js +0 -23
- package/src/common-components/data/tests/reducer.test.js +0 -82
- package/src/common-components/data/tests/sagas.test.js +0 -71
- package/src/common-components/messages.jsx +0 -127
- package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
- package/src/common-components/tests/FormField.test.jsx +0 -289
- package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
- package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
- package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
- package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
- package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
- package/src/data/oneTrust.js +0 -3
- package/src/data/reducers.js +0 -36
- package/src/data/tests/cookies.test.js +0 -42
- package/src/data/tests/dataUtils.test.js +0 -19
- package/src/data/tests/reduxUtils.test.js +0 -14
- package/src/data/utils/cookies.js +0 -12
- package/src/data/utils/dataUtils.js +0 -81
- package/src/data/utils/index.js +0 -11
- package/src/data/utils/reduxUtils.js +0 -34
- package/src/data/utils/useMobileResponsive.js +0 -24
- package/src/field-renderer/FieldRenderer.jsx +0 -156
- package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
- package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
- package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
- package/src/forgot-password/data/reducers.js +0 -58
- package/src/forgot-password/data/sagas.js +0 -35
- package/src/forgot-password/data/selectors.js +0 -10
- package/src/forgot-password/data/service.js +0 -21
- package/src/forgot-password/data/tests/reducers.test.js +0 -34
- package/src/forgot-password/data/tests/sagas.test.js +0 -67
- package/src/forgot-password/messages.js +0 -128
- package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
- package/src/i18n/index.js +0 -25
- package/src/login/AccountActivationMessage.jsx +0 -78
- package/src/login/ChangePasswordPrompt.jsx +0 -91
- package/src/login/LoginFailure.jsx +0 -231
- package/src/login/LoginPage.jsx +0 -368
- package/src/login/data/reducers.js +0 -76
- package/src/login/data/sagas.js +0 -45
- package/src/login/data/service.js +0 -27
- package/src/login/data/tests/reducers.test.js +0 -155
- package/src/login/data/tests/sagas.test.js +0 -110
- package/src/login/messages.jsx +0 -211
- package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
- package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
- package/src/login/tests/LoginFailure.test.jsx +0 -323
- package/src/login/tests/LoginPage.test.jsx +0 -839
- package/src/logistration/Logistration.jsx +0 -189
- package/src/logistration/Logistration.test.jsx +0 -275
- package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
- package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
- package/src/progressive-profiling/data/reducers.js +0 -38
- package/src/progressive-profiling/data/sagas.js +0 -24
- package/src/progressive-profiling/data/service.js +0 -17
- package/src/progressive-profiling/messages.jsx +0 -57
- package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
- package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
- package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
- package/src/register/RegistrationFields/CountryField/validator.js +0 -32
- package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
- package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
- package/src/register/RegistrationFields/EmailField/constants.js +0 -131
- package/src/register/RegistrationFields/EmailField/validator.js +0 -126
- package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
- package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
- package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
- package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
- package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
- package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
- package/src/register/RegistrationPage.jsx +0 -428
- package/src/register/RegistrationPage.test.jsx +0 -854
- package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
- package/src/register/components/RegistrationFailure.jsx +0 -80
- package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
- package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
- package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
- package/src/register/data/reducers.js +0 -140
- package/src/register/data/sagas.js +0 -58
- package/src/register/data/selectors.js +0 -34
- package/src/register/data/service.js +0 -45
- package/src/register/data/tests/reducers.test.js +0 -277
- package/src/register/data/tests/sagas.test.js +0 -239
- package/src/register/data/tests/utils.test.js +0 -98
- package/src/register/data/utils.js +0 -153
- package/src/register/messages.jsx +0 -206
- package/src/reset-password/ResetPasswordFailure.jsx +0 -55
- package/src/reset-password/ResetPasswordPage.jsx +0 -224
- package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
- package/src/reset-password/data/reducers.js +0 -44
- package/src/reset-password/data/sagas.js +0 -67
- package/src/reset-password/data/selectors.js +0 -10
- package/src/reset-password/data/service.js +0 -61
- package/src/reset-password/data/tests/sagas.test.js +0 -185
- package/src/reset-password/messages.js +0 -88
- package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
- package/src/routes.jsx +0 -79
- package/src/setupTest.js +0 -68
- /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src → dist}/sass/_forgot_password.scss +0 -0
- /package/{src → dist}/sass/_login_page.scss +0 -0
- /package/{src → dist}/sass/_reset_password.scss +0 -0
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';
|
|
2
|
-
|
|
3
|
-
export async function getThirdPartyAuthContext(urlParams) {
|
|
4
|
-
const requestConfig = {
|
|
5
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
6
|
-
params: urlParams,
|
|
7
|
-
isPublic: true,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const { data } = await getAuthenticatedHttpClient()
|
|
11
|
-
.get(
|
|
12
|
-
`${getSiteConfig().lmsBaseUrl}/api/mfe_context`,
|
|
13
|
-
requestConfig,
|
|
14
|
-
)
|
|
15
|
-
.catch((e) => {
|
|
16
|
-
throw (e);
|
|
17
|
-
});
|
|
18
|
-
return {
|
|
19
|
-
fieldDescriptions: data.registrationFields || {},
|
|
20
|
-
optionalFields: data.optionalFields || {},
|
|
21
|
-
thirdPartyAuthContext: data.contextData || {},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { PENDING_STATE } from '../../../data/constants';
|
|
2
|
-
import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } from '../actions';
|
|
3
|
-
import reducer from '../reducers';
|
|
4
|
-
|
|
5
|
-
describe('common components reducer', () => {
|
|
6
|
-
it('test mfe context response', () => {
|
|
7
|
-
const state = {
|
|
8
|
-
fieldDescriptions: {},
|
|
9
|
-
optionalFields: {},
|
|
10
|
-
thirdPartyAuthApiStatus: null,
|
|
11
|
-
thirdPartyAuthContext: {
|
|
12
|
-
currentProvider: null,
|
|
13
|
-
finishAuthUrl: null,
|
|
14
|
-
countryCode: null,
|
|
15
|
-
providers: [],
|
|
16
|
-
secondaryProviders: [],
|
|
17
|
-
pipelineUserDetails: null,
|
|
18
|
-
errorMessage: null,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
const fieldDescriptions = {
|
|
22
|
-
fields: [],
|
|
23
|
-
};
|
|
24
|
-
const optionalFields = {
|
|
25
|
-
fields: [],
|
|
26
|
-
extended_profile: {},
|
|
27
|
-
};
|
|
28
|
-
const thirdPartyAuthContext = { ...state.thirdPartyAuthContext };
|
|
29
|
-
const action = {
|
|
30
|
-
type: THIRD_PARTY_AUTH_CONTEXT.SUCCESS,
|
|
31
|
-
payload: { fieldDescriptions, optionalFields, thirdPartyAuthContext },
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
expect(
|
|
35
|
-
reducer(state, action),
|
|
36
|
-
).toEqual(
|
|
37
|
-
{
|
|
38
|
-
...state,
|
|
39
|
-
fieldDescriptions: [],
|
|
40
|
-
optionalFields: {
|
|
41
|
-
fields: [],
|
|
42
|
-
extended_profile: {},
|
|
43
|
-
},
|
|
44
|
-
thirdPartyAuthApiStatus: 'complete',
|
|
45
|
-
},
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('should clear tpa context error message', () => {
|
|
50
|
-
const state = {
|
|
51
|
-
fieldDescriptions: {},
|
|
52
|
-
optionalFields: {},
|
|
53
|
-
thirdPartyAuthApiStatus: null,
|
|
54
|
-
thirdPartyAuthContext: {
|
|
55
|
-
currentProvider: null,
|
|
56
|
-
finishAuthUrl: null,
|
|
57
|
-
countryCode: null,
|
|
58
|
-
providers: [],
|
|
59
|
-
secondaryProviders: [],
|
|
60
|
-
pipelineUserDetails: null,
|
|
61
|
-
errorMessage: 'An error occurred',
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const action = {
|
|
66
|
-
type: THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG,
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
expect(
|
|
70
|
-
reducer(state, action),
|
|
71
|
-
).toEqual(
|
|
72
|
-
{
|
|
73
|
-
...state,
|
|
74
|
-
thirdPartyAuthApiStatus: PENDING_STATE,
|
|
75
|
-
thirdPartyAuthContext: {
|
|
76
|
-
...state.thirdPartyAuthContext,
|
|
77
|
-
errorMessage: null,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { runSaga } from 'redux-saga';
|
|
2
|
-
|
|
3
|
-
import { setCountryFromThirdPartyAuthContext } from '../../../register/data/actions';
|
|
4
|
-
import { initializeMockServices } from '../../../setupTest';
|
|
5
|
-
import * as actions from '../actions';
|
|
6
|
-
import { fetchThirdPartyAuthContext } from '../sagas';
|
|
7
|
-
import * as api from '../service';
|
|
8
|
-
|
|
9
|
-
const { loggingService } = initializeMockServices();
|
|
10
|
-
|
|
11
|
-
describe('fetchThirdPartyAuthContext', () => {
|
|
12
|
-
const params = {
|
|
13
|
-
payload: { urlParams: {} },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const data = {
|
|
17
|
-
currentProvider: null,
|
|
18
|
-
providers: [],
|
|
19
|
-
secondaryProviders: [],
|
|
20
|
-
finishAuthUrl: null,
|
|
21
|
-
pipelineUserDetails: {},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
beforeEach(() => {
|
|
25
|
-
loggingService.logError.mockReset();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('should call service and dispatch success action', async () => {
|
|
29
|
-
const getThirdPartyAuthContext = jest.spyOn(api, 'getThirdPartyAuthContext')
|
|
30
|
-
.mockImplementation(() => Promise.resolve({
|
|
31
|
-
thirdPartyAuthContext: data,
|
|
32
|
-
fieldDescriptions: {},
|
|
33
|
-
optionalFields: {},
|
|
34
|
-
}));
|
|
35
|
-
|
|
36
|
-
const dispatched = [];
|
|
37
|
-
await runSaga(
|
|
38
|
-
{ dispatch: (action) => dispatched.push(action) },
|
|
39
|
-
fetchThirdPartyAuthContext,
|
|
40
|
-
params,
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
expect(getThirdPartyAuthContext).toHaveBeenCalledTimes(1);
|
|
44
|
-
expect(dispatched).toEqual([
|
|
45
|
-
actions.getThirdPartyAuthContextBegin(),
|
|
46
|
-
setCountryFromThirdPartyAuthContext(),
|
|
47
|
-
actions.getThirdPartyAuthContextSuccess({}, {}, data),
|
|
48
|
-
]);
|
|
49
|
-
getThirdPartyAuthContext.mockClear();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('should call service and dispatch error action', async () => {
|
|
53
|
-
const getThirdPartyAuthContext = jest.spyOn(api, 'getThirdPartyAuthContext')
|
|
54
|
-
.mockImplementation(() => Promise.reject(new Error('something went wrong')));
|
|
55
|
-
|
|
56
|
-
const dispatched = [];
|
|
57
|
-
await runSaga(
|
|
58
|
-
{ dispatch: (action) => dispatched.push(action) },
|
|
59
|
-
fetchThirdPartyAuthContext,
|
|
60
|
-
params,
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
expect(getThirdPartyAuthContext).toHaveBeenCalledTimes(1);
|
|
64
|
-
expect(loggingService.logError).toHaveBeenCalled();
|
|
65
|
-
expect(dispatched).toEqual([
|
|
66
|
-
actions.getThirdPartyAuthContextBegin(),
|
|
67
|
-
actions.getThirdPartyAuthContextFailure(),
|
|
68
|
-
]);
|
|
69
|
-
getThirdPartyAuthContext.mockClear();
|
|
70
|
-
});
|
|
71
|
-
});
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
-
|
|
3
|
-
const messages = defineMessages({
|
|
4
|
-
// institution login strings
|
|
5
|
-
'institution.login.page.sub.heading': {
|
|
6
|
-
id: 'institution.login.page.sub.heading',
|
|
7
|
-
defaultMessage: 'Choose your institution from the list below',
|
|
8
|
-
description: 'Heading of the institutions list',
|
|
9
|
-
},
|
|
10
|
-
// logistration strings
|
|
11
|
-
'logistration.sign.in': {
|
|
12
|
-
id: 'logistration.sign.in',
|
|
13
|
-
defaultMessage: 'Sign in',
|
|
14
|
-
description: 'Text that appears on the tab to switch between login and register',
|
|
15
|
-
},
|
|
16
|
-
'logistration.register': {
|
|
17
|
-
id: 'logistration.register',
|
|
18
|
-
defaultMessage: 'Register',
|
|
19
|
-
description: 'Text that appears on the tab to switch between login and register',
|
|
20
|
-
},
|
|
21
|
-
// enterprise sso strings
|
|
22
|
-
'enterprisetpa.title.heading': {
|
|
23
|
-
id: 'enterprisetpa.title.heading',
|
|
24
|
-
defaultMessage: 'Would you like to sign in using your {providerName} credentials?',
|
|
25
|
-
description: 'Header text used in enterprise third party authentication',
|
|
26
|
-
},
|
|
27
|
-
'enterprisetpa.login.button.text': {
|
|
28
|
-
id: 'enterprisetpa.login.button.text',
|
|
29
|
-
defaultMessage: 'Show me other ways to sign in or register',
|
|
30
|
-
description: 'Button text for login',
|
|
31
|
-
},
|
|
32
|
-
'enterprisetpa.login.button.text.public.account.creation.disabled': {
|
|
33
|
-
id: 'enterprisetpa.login.button.text.public.account.creation.disabled',
|
|
34
|
-
defaultMessage: 'Show me other ways to sign in',
|
|
35
|
-
description: 'Button text for login when account creation is disabled',
|
|
36
|
-
},
|
|
37
|
-
// social auth providers
|
|
38
|
-
'sso.sign.in.with': {
|
|
39
|
-
id: 'sso.sign.in.with',
|
|
40
|
-
defaultMessage: 'Sign in with {providerName}',
|
|
41
|
-
description: 'Screen reader text that appears before social auth provider name',
|
|
42
|
-
},
|
|
43
|
-
'sso.create.account.using': {
|
|
44
|
-
id: 'sso.create.account.using',
|
|
45
|
-
defaultMessage: 'Create account using {providerName}',
|
|
46
|
-
description: 'Screen reader text that appears before social auth provider name',
|
|
47
|
-
},
|
|
48
|
-
// password field strings
|
|
49
|
-
'show.password': {
|
|
50
|
-
id: 'show.password',
|
|
51
|
-
defaultMessage: 'Show password',
|
|
52
|
-
description: 'aria label for show password icon on password field',
|
|
53
|
-
},
|
|
54
|
-
'hide.password': {
|
|
55
|
-
id: 'hide.password',
|
|
56
|
-
defaultMessage: 'Hide password',
|
|
57
|
-
description: 'aria label for hide password icon on password field',
|
|
58
|
-
},
|
|
59
|
-
'one.letter': {
|
|
60
|
-
id: 'one.letter',
|
|
61
|
-
defaultMessage: '1 letter',
|
|
62
|
-
description: 'password requirement to have 1 letter',
|
|
63
|
-
},
|
|
64
|
-
'one.number': {
|
|
65
|
-
id: 'one.number',
|
|
66
|
-
defaultMessage: '1 number',
|
|
67
|
-
description: 'password requirement to have 1 number',
|
|
68
|
-
},
|
|
69
|
-
'eight.characters': {
|
|
70
|
-
id: 'eight.characters',
|
|
71
|
-
defaultMessage: '8 characters',
|
|
72
|
-
description: 'password requirement to have a minimum of 8 characters',
|
|
73
|
-
},
|
|
74
|
-
'password.sr.only.helping.text': {
|
|
75
|
-
id: 'password.sr.only.helping.text',
|
|
76
|
-
defaultMessage: 'Password must contain at least 8 characters, at least one letter, and at least one number',
|
|
77
|
-
description: 'Password helping text for the sr-only class',
|
|
78
|
-
},
|
|
79
|
-
// third party auth
|
|
80
|
-
'tpa.alert.heading': {
|
|
81
|
-
id: 'tpa.alert.heading',
|
|
82
|
-
defaultMessage: 'Almost done!',
|
|
83
|
-
description: 'Success alert heading after user has successfully signed in with social auth',
|
|
84
|
-
},
|
|
85
|
-
'login.third.party.auth.account.not.linked': {
|
|
86
|
-
id: 'login.third.party.auth.account.not.linked',
|
|
87
|
-
defaultMessage: 'You have successfully signed into {currentProvider}, but your {currentProvider} '
|
|
88
|
-
+ 'account does not have a linked {platformName} account. To link your accounts, '
|
|
89
|
-
+ 'sign in now using your {platformName} password.',
|
|
90
|
-
description: 'Message that appears on login page if user has successfully authenticated with social '
|
|
91
|
-
+ 'auth but no associated platform account exists',
|
|
92
|
-
},
|
|
93
|
-
'register.third.party.auth.account.not.linked': {
|
|
94
|
-
id: 'register.third.party.auth.account.not.linked',
|
|
95
|
-
defaultMessage: 'You\'ve successfully signed into {currentProvider}! We just need a little more information '
|
|
96
|
-
+ 'before you start learning with {platformName}.',
|
|
97
|
-
description: 'Message that appears on register page if user has successfully authenticated with TPA '
|
|
98
|
-
+ 'but no associated platform account exists',
|
|
99
|
-
},
|
|
100
|
-
'registration.using.tpa.form.heading': {
|
|
101
|
-
id: 'registration.using.tpa.form.heading',
|
|
102
|
-
defaultMessage: 'Finish creating your account',
|
|
103
|
-
description: 'Heading that appears above form when user is trying to create account using social auth',
|
|
104
|
-
},
|
|
105
|
-
'registration.other.options.heading': {
|
|
106
|
-
id: 'registration.other.options.heading',
|
|
107
|
-
defaultMessage: 'Or register with:',
|
|
108
|
-
description: 'A message that appears above third party auth providers i.e saml, google, facebook etc',
|
|
109
|
-
},
|
|
110
|
-
'institution.login.button': {
|
|
111
|
-
id: 'institution.login.button',
|
|
112
|
-
defaultMessage: 'Institution/campus credentials',
|
|
113
|
-
description: 'shows institutions list',
|
|
114
|
-
},
|
|
115
|
-
'login.other.options.heading': {
|
|
116
|
-
id: 'login.other.options.heading',
|
|
117
|
-
defaultMessage: 'Or sign in with:',
|
|
118
|
-
description: 'Text that appears above other sign in options like social auth buttons',
|
|
119
|
-
},
|
|
120
|
-
'enterprise.login.btn.text': {
|
|
121
|
-
id: 'enterprise.login.btn.text',
|
|
122
|
-
defaultMessage: 'Company or school credentials',
|
|
123
|
-
description: 'Company or school login link text.',
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
export default messages;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-import-module-exports */
|
|
2
|
-
/* eslint-disable react/function-component-definition */
|
|
3
|
-
|
|
4
|
-
import { getSiteConfig } from '@openedx/frontend-base';
|
|
5
|
-
import { render } from '@testing-library/react';
|
|
6
|
-
import { act } from 'react-dom/test-utils';
|
|
7
|
-
import {
|
|
8
|
-
MemoryRouter, Route, BrowserRouter as Router, Routes,
|
|
9
|
-
} from 'react-router-dom';
|
|
10
|
-
|
|
11
|
-
import { PAGE_NOT_FOUND, REGISTER_EMBEDDED_PAGE } from '../../data/constants';
|
|
12
|
-
import EmbeddedRegistrationRoute from '../EmbeddedRegistrationRoute';
|
|
13
|
-
|
|
14
|
-
const RRD = require('react-router-dom');
|
|
15
|
-
// Just render plain div with its children
|
|
16
|
-
// eslint-disable-next-line react/prop-types
|
|
17
|
-
RRD.BrowserRouter = ({ children }) => <div>{children}</div>;
|
|
18
|
-
module.exports = RRD;
|
|
19
|
-
|
|
20
|
-
const TestApp = () => (
|
|
21
|
-
<Router>
|
|
22
|
-
<div>
|
|
23
|
-
<Routes>
|
|
24
|
-
<Route
|
|
25
|
-
path={REGISTER_EMBEDDED_PAGE}
|
|
26
|
-
element={<EmbeddedRegistrationRoute><span>Embedded Register Page</span></EmbeddedRegistrationRoute>}
|
|
27
|
-
/>
|
|
28
|
-
<Route
|
|
29
|
-
path={PAGE_NOT_FOUND}
|
|
30
|
-
element={<span>Page not found</span>}
|
|
31
|
-
/>
|
|
32
|
-
</Routes>
|
|
33
|
-
</div>
|
|
34
|
-
</Router>
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
describe('EmbeddedRegistrationRoute', () => {
|
|
38
|
-
const routerWrapper = () => (
|
|
39
|
-
<MemoryRouter initialEntries={[REGISTER_EMBEDDED_PAGE]}>
|
|
40
|
-
<TestApp />
|
|
41
|
-
</MemoryRouter>
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
afterEach(() => {
|
|
45
|
-
jest.clearAllMocks();
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it('should not render embedded register page if host query param is not available in the url', async () => {
|
|
49
|
-
let embeddedRegistrationPage = null;
|
|
50
|
-
await act(async () => {
|
|
51
|
-
const { container } = await render(routerWrapper());
|
|
52
|
-
embeddedRegistrationPage = container;
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const renderedPage = embeddedRegistrationPage.querySelector('span');
|
|
56
|
-
expect(renderedPage.textContent).toBe('Page not found');
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it('should render embedded register page if host query param is available in the url (embedded)', async () => {
|
|
60
|
-
delete window.location;
|
|
61
|
-
window.location = {
|
|
62
|
-
href: getSiteConfig().baseUrl.concat(REGISTER_EMBEDDED_PAGE),
|
|
63
|
-
search: '?host=http://localhost/host-websit',
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
let embeddedRegistrationPage = null;
|
|
67
|
-
await act(async () => {
|
|
68
|
-
const { container } = await render(routerWrapper());
|
|
69
|
-
embeddedRegistrationPage = container;
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const renderedPage = embeddedRegistrationPage.querySelector('span');
|
|
73
|
-
expect(renderedPage).toBeTruthy();
|
|
74
|
-
expect(renderedPage.textContent).toBe('Embedded Register Page');
|
|
75
|
-
});
|
|
76
|
-
});
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { Provider } from 'react-redux';
|
|
2
|
-
|
|
3
|
-
import { injectIntl, IntlProvider } from '@openedx/frontend-base';
|
|
4
|
-
import { fireEvent, render } from '@testing-library/react';
|
|
5
|
-
import { act } from 'react-dom/test-utils';
|
|
6
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
7
|
-
import configureStore from 'redux-mock-store';
|
|
8
|
-
|
|
9
|
-
import { fetchRealtimeValidations } from '../../register/data/actions';
|
|
10
|
-
import FormGroup from '../FormGroup';
|
|
11
|
-
import PasswordField from '../PasswordField';
|
|
12
|
-
|
|
13
|
-
describe('FormGroup', () => {
|
|
14
|
-
const props = {
|
|
15
|
-
floatingLabel: 'Email',
|
|
16
|
-
helpText: ['Email field help text'],
|
|
17
|
-
name: 'email',
|
|
18
|
-
value: '',
|
|
19
|
-
handleFocus: jest.fn(),
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
it('should show help text on field focus', () => {
|
|
23
|
-
const { queryByText, getByLabelText } = render(<FormGroup {...props} />);
|
|
24
|
-
const emailInput = getByLabelText('Email');
|
|
25
|
-
|
|
26
|
-
expect(queryByText('Email field help text')).toBeNull();
|
|
27
|
-
|
|
28
|
-
fireEvent.focus(emailInput);
|
|
29
|
-
|
|
30
|
-
const helpText = queryByText('Email field help text');
|
|
31
|
-
|
|
32
|
-
expect(helpText).toBeTruthy();
|
|
33
|
-
expect(helpText.textContent).toEqual('Email field help text');
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('PasswordField', () => {
|
|
38
|
-
const mockStore = configureStore();
|
|
39
|
-
const IntlPasswordField = injectIntl(PasswordField);
|
|
40
|
-
let props = {};
|
|
41
|
-
let store = {};
|
|
42
|
-
|
|
43
|
-
const reduxWrapper = children => (
|
|
44
|
-
<IntlProvider locale="en">
|
|
45
|
-
<MemoryRouter>
|
|
46
|
-
<Provider store={store}>{children}</Provider>
|
|
47
|
-
</MemoryRouter>
|
|
48
|
-
</IntlProvider>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const initialState = {
|
|
52
|
-
register: {
|
|
53
|
-
validationApiRateLimited: false,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
beforeEach(() => {
|
|
58
|
-
store = mockStore(initialState);
|
|
59
|
-
props = {
|
|
60
|
-
floatingLabel: 'Password',
|
|
61
|
-
name: 'password',
|
|
62
|
-
value: 'password123',
|
|
63
|
-
handleFocus: jest.fn(),
|
|
64
|
-
};
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it('should show/hide password on icon click', () => {
|
|
68
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
69
|
-
const passwordInput = getByLabelText('Password');
|
|
70
|
-
|
|
71
|
-
const showPasswordButton = getByLabelText('Show password');
|
|
72
|
-
fireEvent.click(showPasswordButton);
|
|
73
|
-
expect(passwordInput.type).toBe('text');
|
|
74
|
-
|
|
75
|
-
const hidePasswordButton = getByLabelText('Hide password');
|
|
76
|
-
fireEvent.click(hidePasswordButton);
|
|
77
|
-
expect(passwordInput.type).toBe('password');
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('should show password requirement tooltip on focus', async () => {
|
|
81
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
82
|
-
const passwordInput = getByLabelText('Password');
|
|
83
|
-
jest.useFakeTimers();
|
|
84
|
-
await act(async () => {
|
|
85
|
-
fireEvent.focus(passwordInput);
|
|
86
|
-
jest.runAllTimers();
|
|
87
|
-
});
|
|
88
|
-
const passwordRequirementTooltip = document.querySelector('#password-requirement-left');
|
|
89
|
-
|
|
90
|
-
expect(passwordRequirementTooltip).toBeTruthy();
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('should show all password requirement checks as failed', async () => {
|
|
94
|
-
props = {
|
|
95
|
-
...props,
|
|
96
|
-
value: '',
|
|
97
|
-
};
|
|
98
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
99
|
-
const passwordInput = getByLabelText('Password');
|
|
100
|
-
jest.useFakeTimers();
|
|
101
|
-
await act(async () => {
|
|
102
|
-
fireEvent.focus(passwordInput);
|
|
103
|
-
jest.runAllTimers();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
const letterCheckIcon = document.querySelector('#letter-check span');
|
|
107
|
-
const numberCheckIcon = document.querySelector('#number-check span');
|
|
108
|
-
const charactersCheckIcon = document.querySelector('#characters-check span');
|
|
109
|
-
|
|
110
|
-
expect(letterCheckIcon).toBeTruthy();
|
|
111
|
-
expect(letterCheckIcon.className).toContain('pgn__icon mr-1 text-light-700');
|
|
112
|
-
|
|
113
|
-
expect(numberCheckIcon).toBeTruthy();
|
|
114
|
-
expect(numberCheckIcon.className).toContain('pgn__icon mr-1 text-light-700');
|
|
115
|
-
|
|
116
|
-
expect(charactersCheckIcon).toBeTruthy();
|
|
117
|
-
expect(charactersCheckIcon.className).toContain('pgn__icon mr-1 text-light-700');
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('should update password requirement checks', async () => {
|
|
121
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
122
|
-
const passwordInput = getByLabelText('Password');
|
|
123
|
-
jest.useFakeTimers();
|
|
124
|
-
await act(async () => {
|
|
125
|
-
fireEvent.focus(passwordInput);
|
|
126
|
-
jest.runAllTimers();
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
const letterCheckIcon = document.querySelector('#letter-check span');
|
|
130
|
-
const numberCheckIcon = document.querySelector('#number-check span');
|
|
131
|
-
const charactersCheckIcon = document.querySelector('#characters-check span');
|
|
132
|
-
|
|
133
|
-
expect(letterCheckIcon).toBeTruthy();
|
|
134
|
-
expect(letterCheckIcon.className).toContain('pgn__icon text-success mr-1');
|
|
135
|
-
|
|
136
|
-
expect(numberCheckIcon).toBeTruthy();
|
|
137
|
-
expect(numberCheckIcon.className).toContain('pgn__icon text-success mr-1');
|
|
138
|
-
|
|
139
|
-
expect(charactersCheckIcon).toBeTruthy();
|
|
140
|
-
expect(charactersCheckIcon.className).toContain('pgn__icon text-success mr-1');
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it('should not run validations when blur is fired on password icon click', () => {
|
|
144
|
-
const { container, getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
145
|
-
const passwordInput = container.querySelector('input[name="password"]');
|
|
146
|
-
|
|
147
|
-
const passwordIcon = getByLabelText('Show password');
|
|
148
|
-
|
|
149
|
-
fireEvent.blur(passwordInput, {
|
|
150
|
-
target: {
|
|
151
|
-
name: 'password',
|
|
152
|
-
value: 'invalid',
|
|
153
|
-
},
|
|
154
|
-
relatedTarget: passwordIcon,
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
expect(container.querySelector('div[feedback-for="password"]')).toBeNull();
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it('should call props handle blur if available', () => {
|
|
161
|
-
props = {
|
|
162
|
-
...props,
|
|
163
|
-
handleBlur: jest.fn(),
|
|
164
|
-
};
|
|
165
|
-
const { container } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
166
|
-
const passwordInput = container.querySelector('input[name="password"]');
|
|
167
|
-
|
|
168
|
-
fireEvent.blur(passwordInput, {
|
|
169
|
-
target: {
|
|
170
|
-
name: 'password',
|
|
171
|
-
value: '',
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
expect(props.handleBlur).toHaveBeenCalledTimes(1);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
it('should run validations on blur event when rendered from register page', () => {
|
|
179
|
-
props = {
|
|
180
|
-
...props,
|
|
181
|
-
handleErrorChange: jest.fn(),
|
|
182
|
-
};
|
|
183
|
-
const { container } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
184
|
-
const passwordInput = container.querySelector('input[name="password"]');
|
|
185
|
-
|
|
186
|
-
fireEvent.blur(passwordInput, {
|
|
187
|
-
target: {
|
|
188
|
-
name: 'password',
|
|
189
|
-
value: '',
|
|
190
|
-
},
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
|
|
194
|
-
expect(props.handleErrorChange).toHaveBeenCalledWith(
|
|
195
|
-
'password',
|
|
196
|
-
'Password criteria has not been met',
|
|
197
|
-
);
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it('should not clear error when focus is fired on password icon click when rendered from register page', () => {
|
|
201
|
-
props = {
|
|
202
|
-
...props,
|
|
203
|
-
handleErrorChange: jest.fn(),
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
207
|
-
|
|
208
|
-
const passwordIcon = getByLabelText('Show password');
|
|
209
|
-
|
|
210
|
-
fireEvent.focus(passwordIcon, {
|
|
211
|
-
target: {
|
|
212
|
-
name: 'passwordIcon',
|
|
213
|
-
value: '',
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
expect(props.handleErrorChange).toHaveBeenCalledTimes(0);
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
it('should clear error when focus is fired on password icon click when rendered from register page', () => {
|
|
221
|
-
props = {
|
|
222
|
-
...props,
|
|
223
|
-
handleErrorChange: jest.fn(),
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
227
|
-
|
|
228
|
-
const passwordIcon = getByLabelText('Show password');
|
|
229
|
-
|
|
230
|
-
fireEvent.focus(passwordIcon, {
|
|
231
|
-
target: {
|
|
232
|
-
name: 'password',
|
|
233
|
-
value: 'invalid',
|
|
234
|
-
},
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
|
|
238
|
-
expect(props.handleErrorChange).toHaveBeenCalledWith(
|
|
239
|
-
'password',
|
|
240
|
-
'',
|
|
241
|
-
);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
it('should run backend validations when frontend validations pass on blur when rendered from register page', () => {
|
|
245
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
246
|
-
props = {
|
|
247
|
-
...props,
|
|
248
|
-
handleErrorChange: jest.fn(),
|
|
249
|
-
};
|
|
250
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
251
|
-
const passwordField = getByLabelText('Password');
|
|
252
|
-
fireEvent.blur(passwordField, {
|
|
253
|
-
target: {
|
|
254
|
-
name: 'password',
|
|
255
|
-
value: 'password123',
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
expect(store.dispatch).toHaveBeenCalledWith(fetchRealtimeValidations({ password: 'password123' }));
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
it('should use password value from prop when password icon is focused out (blur due to icon)', () => {
|
|
263
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
264
|
-
props = {
|
|
265
|
-
...props,
|
|
266
|
-
value: 'testPassword',
|
|
267
|
-
handleErrorChange: jest.fn(),
|
|
268
|
-
handleBlur: jest.fn(),
|
|
269
|
-
};
|
|
270
|
-
const { getByLabelText } = render(reduxWrapper(<IntlPasswordField {...props} />));
|
|
271
|
-
|
|
272
|
-
const passwordIcon = getByLabelText('Show password');
|
|
273
|
-
|
|
274
|
-
fireEvent.blur(passwordIcon, {
|
|
275
|
-
target: {
|
|
276
|
-
name: 'passwordIcon',
|
|
277
|
-
value: undefined,
|
|
278
|
-
},
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
expect(props.handleBlur).toHaveBeenCalledTimes(1);
|
|
282
|
-
expect(props.handleBlur).toHaveBeenCalledWith({
|
|
283
|
-
target: {
|
|
284
|
-
name: 'password',
|
|
285
|
-
value: 'testPassword',
|
|
286
|
-
},
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
});
|