@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,58 +0,0 @@
|
|
|
1
|
-
import { FORGOT_PASSWORD, FORGOT_PASSWORD_PERSIST_FORM_DATA } from './actions';
|
|
2
|
-
import { INTERNAL_SERVER_ERROR, PENDING_STATE } from '../../data/constants';
|
|
3
|
-
import { PASSWORD_RESET_FAILURE } from '../../reset-password/data/actions';
|
|
4
|
-
|
|
5
|
-
export const defaultState = {
|
|
6
|
-
status: '',
|
|
7
|
-
submitState: '',
|
|
8
|
-
email: '',
|
|
9
|
-
emailValidationError: '',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const reducer = (state = defaultState, action = null) => {
|
|
13
|
-
if (action !== null) {
|
|
14
|
-
switch (action.type) {
|
|
15
|
-
case FORGOT_PASSWORD.BEGIN:
|
|
16
|
-
return {
|
|
17
|
-
email: state.email,
|
|
18
|
-
status: 'pending',
|
|
19
|
-
submitState: PENDING_STATE,
|
|
20
|
-
};
|
|
21
|
-
case FORGOT_PASSWORD.SUCCESS:
|
|
22
|
-
return {
|
|
23
|
-
...defaultState,
|
|
24
|
-
status: 'complete',
|
|
25
|
-
};
|
|
26
|
-
case FORGOT_PASSWORD.FORBIDDEN:
|
|
27
|
-
return {
|
|
28
|
-
email: state.email,
|
|
29
|
-
status: 'forbidden',
|
|
30
|
-
};
|
|
31
|
-
case FORGOT_PASSWORD.FAILURE:
|
|
32
|
-
return {
|
|
33
|
-
email: state.email,
|
|
34
|
-
status: INTERNAL_SERVER_ERROR,
|
|
35
|
-
};
|
|
36
|
-
case PASSWORD_RESET_FAILURE:
|
|
37
|
-
return {
|
|
38
|
-
status: action.payload.errorCode,
|
|
39
|
-
};
|
|
40
|
-
case FORGOT_PASSWORD_PERSIST_FORM_DATA: {
|
|
41
|
-
const { forgotPasswordFormData } = action.payload;
|
|
42
|
-
return {
|
|
43
|
-
...state,
|
|
44
|
-
...forgotPasswordFormData,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
default:
|
|
48
|
-
return {
|
|
49
|
-
...defaultState,
|
|
50
|
-
email: state.email,
|
|
51
|
-
emailValidationError: state.emailValidationError,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return state;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default reducer;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { logError, logInfo } from '@openedx/frontend-base';
|
|
2
|
-
import { call, put, takeEvery } from 'redux-saga/effects';
|
|
3
|
-
|
|
4
|
-
// Actions
|
|
5
|
-
import {
|
|
6
|
-
FORGOT_PASSWORD,
|
|
7
|
-
forgotPasswordBegin,
|
|
8
|
-
forgotPasswordForbidden,
|
|
9
|
-
forgotPasswordServerError,
|
|
10
|
-
forgotPasswordSuccess,
|
|
11
|
-
} from './actions';
|
|
12
|
-
import { forgotPassword } from './service';
|
|
13
|
-
|
|
14
|
-
// Services
|
|
15
|
-
export function* handleForgotPassword(action) {
|
|
16
|
-
try {
|
|
17
|
-
yield put(forgotPasswordBegin());
|
|
18
|
-
|
|
19
|
-
yield call(forgotPassword, action.payload.email);
|
|
20
|
-
|
|
21
|
-
yield put(forgotPasswordSuccess(action.payload.email));
|
|
22
|
-
} catch (e) {
|
|
23
|
-
if (e.response && e.response.status === 403) {
|
|
24
|
-
yield put(forgotPasswordForbidden());
|
|
25
|
-
logInfo(e);
|
|
26
|
-
} else {
|
|
27
|
-
yield put(forgotPasswordServerError());
|
|
28
|
-
logError(e);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default function* saga() {
|
|
34
|
-
yield takeEvery(FORGOT_PASSWORD.BASE, handleForgotPassword);
|
|
35
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
export const storeName = 'forgotPassword';
|
|
4
|
-
|
|
5
|
-
export const forgotPasswordSelector = state => ({ ...state[storeName] });
|
|
6
|
-
|
|
7
|
-
export const forgotPasswordResultSelector = createSelector(
|
|
8
|
-
forgotPasswordSelector,
|
|
9
|
-
forgotPassword => forgotPassword,
|
|
10
|
-
);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';
|
|
2
|
-
import formurlencoded from 'form-urlencoded';
|
|
3
|
-
|
|
4
|
-
export async function forgotPassword(email) {
|
|
5
|
-
const requestConfig = {
|
|
6
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
7
|
-
isPublic: true,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const { data } = await getAuthenticatedHttpClient()
|
|
11
|
-
.post(
|
|
12
|
-
`${getSiteConfig().lmsBaseUrl}/account/password`,
|
|
13
|
-
formurlencoded({ email }),
|
|
14
|
-
requestConfig,
|
|
15
|
-
)
|
|
16
|
-
.catch((e) => {
|
|
17
|
-
throw (e);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FORGOT_PASSWORD_PERSIST_FORM_DATA,
|
|
3
|
-
} from '../actions';
|
|
4
|
-
import reducer from '../reducers';
|
|
5
|
-
|
|
6
|
-
describe('forgot password reducer', () => {
|
|
7
|
-
it('should set email and emailValidationError', () => {
|
|
8
|
-
const state = {
|
|
9
|
-
status: '',
|
|
10
|
-
submitState: '',
|
|
11
|
-
email: '',
|
|
12
|
-
emailValidationError: '',
|
|
13
|
-
};
|
|
14
|
-
const forgotPasswordFormData = {
|
|
15
|
-
email: 'test@gmail',
|
|
16
|
-
emailValidationError: 'Enter a valid email address',
|
|
17
|
-
};
|
|
18
|
-
const action = {
|
|
19
|
-
type: FORGOT_PASSWORD_PERSIST_FORM_DATA,
|
|
20
|
-
payload: { forgotPasswordFormData },
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
expect(
|
|
24
|
-
reducer(state, action),
|
|
25
|
-
).toEqual(
|
|
26
|
-
{
|
|
27
|
-
status: '',
|
|
28
|
-
submitState: '',
|
|
29
|
-
email: 'test@gmail',
|
|
30
|
-
emailValidationError: 'Enter a valid email address',
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { runSaga } from 'redux-saga';
|
|
2
|
-
|
|
3
|
-
import { initializeMockServices } from '../../../setupTest';
|
|
4
|
-
import * as actions from '../actions';
|
|
5
|
-
import { handleForgotPassword } from '../sagas';
|
|
6
|
-
import * as api from '../service';
|
|
7
|
-
|
|
8
|
-
const { loggingService } = initializeMockServices();
|
|
9
|
-
|
|
10
|
-
describe('handleForgotPassword', () => {
|
|
11
|
-
const params = {
|
|
12
|
-
payload: {
|
|
13
|
-
forgotPasswordFormData: {
|
|
14
|
-
email: 'test@test.com',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
loggingService.logError.mockReset();
|
|
21
|
-
loggingService.logInfo.mockReset();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should handle 500 error code', async () => {
|
|
25
|
-
const passwordErrorResponse = { response: { status: 500 } };
|
|
26
|
-
|
|
27
|
-
const forgotPasswordRequest = jest.spyOn(api, 'forgotPassword').mockImplementation(
|
|
28
|
-
() => Promise.reject(passwordErrorResponse),
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const dispatched = [];
|
|
32
|
-
await runSaga(
|
|
33
|
-
{ dispatch: (action) => dispatched.push(action) },
|
|
34
|
-
handleForgotPassword,
|
|
35
|
-
params,
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
expect(loggingService.logError).toHaveBeenCalled();
|
|
39
|
-
expect(dispatched).toEqual([
|
|
40
|
-
actions.forgotPasswordBegin(),
|
|
41
|
-
actions.forgotPasswordServerError(),
|
|
42
|
-
]);
|
|
43
|
-
forgotPasswordRequest.mockClear();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should handle rate limit error', async () => {
|
|
47
|
-
const forbiddenErrorResponse = { response: { status: 403 } };
|
|
48
|
-
|
|
49
|
-
const forbiddenPasswordRequest = jest.spyOn(api, 'forgotPassword').mockImplementation(
|
|
50
|
-
() => Promise.reject(forbiddenErrorResponse),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const dispatched = [];
|
|
54
|
-
await runSaga(
|
|
55
|
-
{ dispatch: (action) => dispatched.push(action) },
|
|
56
|
-
handleForgotPassword,
|
|
57
|
-
params,
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
expect(loggingService.logInfo).toHaveBeenCalled();
|
|
61
|
-
expect(dispatched).toEqual([
|
|
62
|
-
actions.forgotPasswordBegin(),
|
|
63
|
-
actions.forgotPasswordForbidden(null),
|
|
64
|
-
]);
|
|
65
|
-
forbiddenPasswordRequest.mockClear();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
-
|
|
3
|
-
const messages = defineMessages({
|
|
4
|
-
'forgot.password.page.title': {
|
|
5
|
-
id: 'forgot.password.page.title',
|
|
6
|
-
defaultMessage: 'Forgot Password | {siteName}',
|
|
7
|
-
description: 'forgot password page title',
|
|
8
|
-
},
|
|
9
|
-
'forgot.password.page.heading': {
|
|
10
|
-
id: 'forgot.password.page.heading',
|
|
11
|
-
defaultMessage: 'Reset password',
|
|
12
|
-
description: 'The page heading for the forgot password page.',
|
|
13
|
-
},
|
|
14
|
-
'forgot.password.page.instructions': {
|
|
15
|
-
id: 'forgot.password.page.instructions',
|
|
16
|
-
defaultMessage: 'Please enter your email address below and we will send you an email with instructions on how to reset your password.',
|
|
17
|
-
description: 'Instructions message for forgot password page.',
|
|
18
|
-
},
|
|
19
|
-
'forgot.password.page.invalid.email.message': {
|
|
20
|
-
id: 'forgot.password.page.invalid.email.message',
|
|
21
|
-
defaultMessage: 'Enter a valid email address',
|
|
22
|
-
description: 'Invalid email address message for input field.',
|
|
23
|
-
},
|
|
24
|
-
'forgot.password.page.email.field.label': {
|
|
25
|
-
id: 'forgot.password.page.email.field.label',
|
|
26
|
-
defaultMessage: 'Email',
|
|
27
|
-
description: 'Email field label for the forgot password page.',
|
|
28
|
-
},
|
|
29
|
-
'forgot.password.page.submit.button': {
|
|
30
|
-
id: 'forgot.password.page.submit.button',
|
|
31
|
-
defaultMessage: 'Submit',
|
|
32
|
-
description: 'Submit button text for the forgot password page.',
|
|
33
|
-
},
|
|
34
|
-
'forgot.password.error.alert.title': {
|
|
35
|
-
id: 'forgot.password.error.alert.title.',
|
|
36
|
-
defaultMessage: 'We were unable to contact you.',
|
|
37
|
-
description: 'Failed to send password recovery email.',
|
|
38
|
-
},
|
|
39
|
-
'forgot.password.error.message.title': {
|
|
40
|
-
id: 'forgot.password.error.message.title',
|
|
41
|
-
defaultMessage: 'An error occurred.',
|
|
42
|
-
description: 'Title for message that appears when error occurs for password assistance page',
|
|
43
|
-
},
|
|
44
|
-
'forgot.password.request.in.progress.message': {
|
|
45
|
-
id: 'forgot.password.request.in.progress.message',
|
|
46
|
-
defaultMessage: 'Your previous request is in progress, please try again in a few moments.',
|
|
47
|
-
description: 'Message displayed when previous password reset request is still in progress.',
|
|
48
|
-
},
|
|
49
|
-
'forgot.password.empty.email.field.error': {
|
|
50
|
-
id: 'forgot.password.empty.email.field.error',
|
|
51
|
-
defaultMessage: 'Enter your email',
|
|
52
|
-
description: 'Error message that appears when user tries to submit empty email field',
|
|
53
|
-
},
|
|
54
|
-
'forgot.password.email.help.text': {
|
|
55
|
-
id: 'forgot.password.email.help.text',
|
|
56
|
-
defaultMessage: 'The email address you used to register with {platformName}',
|
|
57
|
-
description: 'text help for the email',
|
|
58
|
-
},
|
|
59
|
-
// Confirmation Alert Message
|
|
60
|
-
'confirmation.message.title': {
|
|
61
|
-
id: 'confirmation.message.title',
|
|
62
|
-
defaultMessage: 'Check your email',
|
|
63
|
-
description: 'Forgot password confirmation message title',
|
|
64
|
-
},
|
|
65
|
-
'confirmation.support.link': {
|
|
66
|
-
id: 'confirmation.support.link',
|
|
67
|
-
defaultMessage: 'contact technical support',
|
|
68
|
-
description: 'Technical support link text',
|
|
69
|
-
},
|
|
70
|
-
'need.help.sign.in.text': {
|
|
71
|
-
id: 'need.help.sign.in.text',
|
|
72
|
-
defaultMessage: 'Need help signing in?',
|
|
73
|
-
description: 'Sign in help link on forgot password page',
|
|
74
|
-
},
|
|
75
|
-
'additional.help.text': {
|
|
76
|
-
id: 'additional.help.text',
|
|
77
|
-
defaultMessage: 'For additional help, contact {platformName} support at ',
|
|
78
|
-
description: 'additional help text on forgot password page',
|
|
79
|
-
},
|
|
80
|
-
'sign.in.text': {
|
|
81
|
-
id: 'sign.in.text',
|
|
82
|
-
defaultMessage: 'Sign in',
|
|
83
|
-
description: 'login page link on password page',
|
|
84
|
-
},
|
|
85
|
-
'extend.field.errors': {
|
|
86
|
-
id: 'extend.field.errors',
|
|
87
|
-
defaultMessage: '{emailError} below.',
|
|
88
|
-
description: 'extends the field error for alert message',
|
|
89
|
-
},
|
|
90
|
-
// Reset password token validation failure
|
|
91
|
-
'invalid.token.heading': {
|
|
92
|
-
id: 'invalid.token.heading',
|
|
93
|
-
defaultMessage: 'Invalid password reset link',
|
|
94
|
-
description: 'Alert heading when reset password link is invalid',
|
|
95
|
-
},
|
|
96
|
-
'invalid.token.error.message': {
|
|
97
|
-
id: 'invalid.token.error.message',
|
|
98
|
-
defaultMessage: 'This password reset link is invalid. It may have been used already. Enter your email below to receive a new link.',
|
|
99
|
-
description: 'Alert message when reset password link has expired or is invalid',
|
|
100
|
-
},
|
|
101
|
-
'token.validation.rate.limit.error.heading': {
|
|
102
|
-
id: 'token.validation.rate.limit.error.heading',
|
|
103
|
-
defaultMessage: 'Too many requests',
|
|
104
|
-
description: 'Too many request at server end point',
|
|
105
|
-
},
|
|
106
|
-
'token.validation.rate.limit.error': {
|
|
107
|
-
id: 'token.validation.rate.limit.error',
|
|
108
|
-
defaultMessage: 'An error has occurred because of too many requests. Please try again after some time.',
|
|
109
|
-
description: 'Error message that appears when server responds with 429 error code',
|
|
110
|
-
},
|
|
111
|
-
'token.validation.internal.sever.error.heading': {
|
|
112
|
-
id: 'token.validation.internal.sever.error.heading',
|
|
113
|
-
defaultMessage: 'Token validation failure',
|
|
114
|
-
description: 'Failed to validate reset password token error message.',
|
|
115
|
-
},
|
|
116
|
-
'token.validation.internal.sever.error': {
|
|
117
|
-
id: 'token.validation.internal.sever.error',
|
|
118
|
-
defaultMessage: 'An error has occurred. Try refreshing the page, or check your internet connection.',
|
|
119
|
-
description: 'Error message that appears when server responds with 500 error code',
|
|
120
|
-
},
|
|
121
|
-
// Error messages
|
|
122
|
-
'internal.server.error': {
|
|
123
|
-
id: 'internal.server.error',
|
|
124
|
-
defaultMessage: 'An error has occurred. Try refreshing the page, or check your internet connection.',
|
|
125
|
-
description: 'Error message that appears when server responds with 500 error code',
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
export default messages;
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { Provider } from 'react-redux';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
configureI18n, injectIntl, IntlProvider, mergeAppConfig
|
|
5
|
-
} from '@openedx/frontend-base';
|
|
6
|
-
import {
|
|
7
|
-
fireEvent, render, screen,
|
|
8
|
-
} from '@testing-library/react';
|
|
9
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
10
|
-
import configureStore from 'redux-mock-store';
|
|
11
|
-
|
|
12
|
-
import { INTERNAL_SERVER_ERROR, LOGIN_PAGE } from '../../data/constants';
|
|
13
|
-
import { PASSWORD_RESET } from '../../reset-password/data/constants';
|
|
14
|
-
import { appId } from '../../constants';
|
|
15
|
-
import { setForgotPasswordFormData } from '../data/actions';
|
|
16
|
-
import ForgotPasswordPage from '../ForgotPasswordPage';
|
|
17
|
-
|
|
18
|
-
const mockedNavigator = jest.fn();
|
|
19
|
-
|
|
20
|
-
jest.mock('@openedx/frontend-base', () => ({
|
|
21
|
-
...jest.requireActual('@openedx/frontend-base'),
|
|
22
|
-
sendPageEvent: jest.fn(),
|
|
23
|
-
sendTrackEvent: jest.fn(),
|
|
24
|
-
getAuthenticatedUser: jest.fn(() => ({
|
|
25
|
-
userId: 3,
|
|
26
|
-
username: 'test-user',
|
|
27
|
-
})),
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
jest.mock('react-router-dom', () => ({
|
|
31
|
-
...(jest.requireActual('react-router-dom')),
|
|
32
|
-
useNavigate: () => mockedNavigator,
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
const IntlForgotPasswordPage = injectIntl(ForgotPasswordPage);
|
|
36
|
-
const mockStore = configureStore();
|
|
37
|
-
|
|
38
|
-
const initialState = {
|
|
39
|
-
forgotPassword: {
|
|
40
|
-
status: '',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
describe('ForgotPasswordPage', () => {
|
|
45
|
-
mergeAppConfig(appId, {
|
|
46
|
-
LOGIN_ISSUE_SUPPORT_LINK: '',
|
|
47
|
-
INFO_EMAIL: '',
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
let props = {};
|
|
51
|
-
let store = {};
|
|
52
|
-
|
|
53
|
-
const reduxWrapper = children => (
|
|
54
|
-
<IntlProvider locale="en">
|
|
55
|
-
<MemoryRouter>
|
|
56
|
-
<Provider store={store}>{children}</Provider>
|
|
57
|
-
</MemoryRouter>
|
|
58
|
-
</IntlProvider>
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
beforeEach(() => {
|
|
62
|
-
store = mockStore(initialState);
|
|
63
|
-
|
|
64
|
-
configureI18n({
|
|
65
|
-
messages: { 'es-419': {}, de: {}, 'en-us': {} },
|
|
66
|
-
});
|
|
67
|
-
props = {
|
|
68
|
-
forgotPassword: jest.fn(),
|
|
69
|
-
status: null,
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
const findByTextContent = (container, text) => Array.from(container.querySelectorAll('*')).find(
|
|
73
|
-
element => element.textContent === text,
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
it('not should display need other help signing in button', () => {
|
|
77
|
-
const { queryByTestId } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
78
|
-
const forgotPasswordButton = queryByTestId('forgot-password');
|
|
79
|
-
expect(forgotPasswordButton).toBeNull();
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('should display need other help signing in button', () => {
|
|
83
|
-
mergeAppConfig(appId, {
|
|
84
|
-
LOGIN_ISSUE_SUPPORT_LINK: '/support',
|
|
85
|
-
});
|
|
86
|
-
render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
87
|
-
const forgotPasswordButton = screen.findByText('Need help signing in?');
|
|
88
|
-
expect(forgotPasswordButton).toBeDefined();
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('should display email validation error message', async () => {
|
|
92
|
-
const validationMessage = 'We were unable to contact you.Enter a valid email address below.';
|
|
93
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
94
|
-
|
|
95
|
-
const emailInput = screen.getByLabelText('Email');
|
|
96
|
-
|
|
97
|
-
fireEvent.change(emailInput, { target: { value: 'invalid-email' } });
|
|
98
|
-
|
|
99
|
-
const submitButton = screen.getByText('Submit');
|
|
100
|
-
fireEvent.click(submitButton);
|
|
101
|
-
|
|
102
|
-
const alertElements = container.querySelectorAll('.alert-danger');
|
|
103
|
-
const validationErrors = alertElements[0].textContent;
|
|
104
|
-
expect(validationErrors).toBe(validationMessage);
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('should show alert on server error', () => {
|
|
108
|
-
store = mockStore({
|
|
109
|
-
forgotPassword: { status: INTERNAL_SERVER_ERROR },
|
|
110
|
-
});
|
|
111
|
-
const expectedMessage = 'We were unable to contact you.'
|
|
112
|
-
+ 'An error has occurred. Try refreshing the page, or check your internet connection.';
|
|
113
|
-
|
|
114
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
115
|
-
|
|
116
|
-
const alertElements = container.querySelectorAll('.alert-danger');
|
|
117
|
-
const validationErrors = alertElements[0].textContent;
|
|
118
|
-
expect(validationErrors).toBe(expectedMessage);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('should display empty email validation message', async () => {
|
|
122
|
-
const validationMessage = 'We were unable to contact you.Enter your email below.';
|
|
123
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
124
|
-
|
|
125
|
-
const submitButton = screen.getByText('Submit');
|
|
126
|
-
fireEvent.click(submitButton);
|
|
127
|
-
|
|
128
|
-
const alertElements = container.querySelectorAll('.alert-danger');
|
|
129
|
-
const validationErrors = alertElements[0].textContent;
|
|
130
|
-
|
|
131
|
-
expect(validationErrors).toBe(validationMessage);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it('should display request in progress error message', () => {
|
|
135
|
-
const rateLimitMessage = 'An error occurred.Your previous request is in progress, please try again in a few moments.';
|
|
136
|
-
store = mockStore({
|
|
137
|
-
forgotPassword: { status: 'forbidden' },
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
141
|
-
|
|
142
|
-
const alertElements = container.querySelectorAll('.alert-danger');
|
|
143
|
-
const validationErrors = alertElements[0].textContent;
|
|
144
|
-
expect(validationErrors).toBe(rateLimitMessage);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('should not display any error message on change event', () => {
|
|
148
|
-
render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
149
|
-
|
|
150
|
-
const emailInput = screen.getByLabelText('Email');
|
|
151
|
-
|
|
152
|
-
fireEvent.change(emailInput, { target: { value: 'invalid-email' } });
|
|
153
|
-
|
|
154
|
-
const errorElement = screen.queryByTestId('email-invalid-feedback');
|
|
155
|
-
expect(errorElement).toBeNull();
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
it('should set error in redux store on onBlur', () => {
|
|
159
|
-
const forgotPasswordFormData = {
|
|
160
|
-
email: 'test@gmail',
|
|
161
|
-
emailValidationError: 'Enter a valid email address',
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
props = {
|
|
165
|
-
...props,
|
|
166
|
-
email: 'test@gmail',
|
|
167
|
-
emailValidationError: '',
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
171
|
-
render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
172
|
-
const emailInput = screen.getByLabelText('Email');
|
|
173
|
-
|
|
174
|
-
fireEvent.blur(emailInput);
|
|
175
|
-
|
|
176
|
-
expect(store.dispatch).toHaveBeenCalledWith(setForgotPasswordFormData(forgotPasswordFormData));
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it('should display error message if available in props', async () => {
|
|
180
|
-
const validationMessage = 'Enter your email';
|
|
181
|
-
props = {
|
|
182
|
-
...props,
|
|
183
|
-
emailValidationError: validationMessage,
|
|
184
|
-
email: '',
|
|
185
|
-
};
|
|
186
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
187
|
-
const validationElement = container.querySelector('.pgn__form-text-invalid');
|
|
188
|
-
expect(validationElement.textContent).toEqual(validationMessage);
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
it('should clear error in redux store on onFocus', () => {
|
|
192
|
-
const forgotPasswordFormData = {
|
|
193
|
-
emailValidationError: '',
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
props = {
|
|
197
|
-
...props,
|
|
198
|
-
email: 'test@gmail',
|
|
199
|
-
emailValidationError: 'Enter a valid email address',
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
203
|
-
|
|
204
|
-
render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
205
|
-
const emailInput = screen.getByLabelText('Email');
|
|
206
|
-
|
|
207
|
-
fireEvent.focus(emailInput);
|
|
208
|
-
|
|
209
|
-
expect(store.dispatch).toHaveBeenCalledWith(setForgotPasswordFormData(forgotPasswordFormData));
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
it('should clear error message when cleared in props on focus', async () => {
|
|
213
|
-
props = {
|
|
214
|
-
...props,
|
|
215
|
-
emailValidationError: '',
|
|
216
|
-
email: '',
|
|
217
|
-
};
|
|
218
|
-
render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
219
|
-
const errorElement = screen.queryByTestId('email-invalid-feedback');
|
|
220
|
-
expect(errorElement).toBeNull();
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
it('should display success message after email is sent', () => {
|
|
224
|
-
store = mockStore({
|
|
225
|
-
...initialState,
|
|
226
|
-
forgotPassword: {
|
|
227
|
-
status: 'complete',
|
|
228
|
-
},
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
const successMessage = 'Check your emailWe sent an email to with instructions to reset your password. If you do not '
|
|
232
|
-
+ 'receive a password reset message after 1 minute, verify that you entered the correct email address,'
|
|
233
|
-
+ ' or check your spam folder. If you need further assistance, contact technical support.';
|
|
234
|
-
|
|
235
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
236
|
-
const successElement = findByTextContent(container, successMessage);
|
|
237
|
-
|
|
238
|
-
expect(successElement).toBeDefined();
|
|
239
|
-
expect(successElement.textContent).toEqual(successMessage);
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
it('should display invalid password reset link error', () => {
|
|
243
|
-
store = mockStore({
|
|
244
|
-
...initialState,
|
|
245
|
-
forgotPassword: {
|
|
246
|
-
status: PASSWORD_RESET.INVALID_TOKEN,
|
|
247
|
-
},
|
|
248
|
-
});
|
|
249
|
-
const successMessage = 'Invalid password reset link'
|
|
250
|
-
+ 'This password reset link is invalid. It may have been used already. '
|
|
251
|
-
+ 'Enter your email below to receive a new link.';
|
|
252
|
-
|
|
253
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
254
|
-
const successElement = findByTextContent(container, successMessage);
|
|
255
|
-
|
|
256
|
-
expect(successElement).toBeDefined();
|
|
257
|
-
expect(successElement.textContent).toEqual(successMessage);
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
it('should redirect onto login page', async () => {
|
|
261
|
-
const { container } = render(reduxWrapper(<IntlForgotPasswordPage {...props} />));
|
|
262
|
-
|
|
263
|
-
const navElement = container.querySelector('nav');
|
|
264
|
-
const anchorElement = navElement.querySelector('a');
|
|
265
|
-
fireEvent.click(anchorElement);
|
|
266
|
-
|
|
267
|
-
expect(mockedNavigator).toHaveBeenCalledWith(LOGIN_PAGE);
|
|
268
|
-
});
|
|
269
|
-
});
|
package/src/i18n/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Placeholder be overridden by `make pull_translations`
|
|
2
|
-
export default {
|
|
3
|
-
ar: {},
|
|
4
|
-
'zh-hk': {},
|
|
5
|
-
'zh-cn': {},
|
|
6
|
-
uk: {},
|
|
7
|
-
'tr-tr': {},
|
|
8
|
-
th: {},
|
|
9
|
-
te: {},
|
|
10
|
-
ru: {},
|
|
11
|
-
'pt-pt': {},
|
|
12
|
-
'pt-br': {},
|
|
13
|
-
'it-it': {},
|
|
14
|
-
id: {},
|
|
15
|
-
hi: {},
|
|
16
|
-
he: {},
|
|
17
|
-
'fr-ca': {},
|
|
18
|
-
fa: {},
|
|
19
|
-
'es-es': {},
|
|
20
|
-
'es-419': {},
|
|
21
|
-
el: {},
|
|
22
|
-
'de-de': {},
|
|
23
|
-
da: {},
|
|
24
|
-
bo: {},
|
|
25
|
-
};
|