@openedx/frontend-app-authn 1.0.0-alpha.5 → 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/{src → dist}/app.scss +1 -1
- 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/package.json +12 -5
- package/src/__mocks__/file.js +0 -1
- package/src/__mocks__/svg.js +0 -1
- 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 -147
- 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/_base_component.scss +0 -0
- /package/{src → dist}/sass/_forgot_password.scss +0 -0
- /package/{src → dist}/sass/_login_page.scss +0 -0
- /package/{src → dist}/sass/_progressive_profiling_page.scss +0 -0
- /package/{src → dist}/sass/_registration.scss +0 -0
- /package/{src → dist}/sass/_reset_password.scss +0 -0
- /package/{src → dist}/sass/_style.scss +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { connect } from 'react-redux';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
useAppConfig, getAuthService, getSiteConfig, sendPageEvent, sendTrackEvent, useIntl
|
|
6
|
-
} from '@openedx/frontend-base';
|
|
7
|
-
import {
|
|
8
|
-
Icon,
|
|
9
|
-
Tab,
|
|
10
|
-
Tabs,
|
|
11
|
-
} from '@openedx/paragon';
|
|
12
|
-
import { ChevronLeft } from '@openedx/paragon/icons';
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import { Navigate, useNavigate } from 'react-router-dom';
|
|
15
|
-
|
|
16
|
-
import BaseContainer from '../base-container';
|
|
17
|
-
import { clearThirdPartyAuthContextErrorMessage } from '../common-components/data/actions';
|
|
18
|
-
import {
|
|
19
|
-
tpaProvidersSelector,
|
|
20
|
-
} from '../common-components/data/selectors';
|
|
21
|
-
import messages from '../common-components/messages';
|
|
22
|
-
import { LOGIN_PAGE, REGISTER_PAGE } from '../data/constants';
|
|
23
|
-
import {
|
|
24
|
-
getTpaHint, getTpaProvider, updatePathWithQueryParams,
|
|
25
|
-
} from '../data/utils';
|
|
26
|
-
import { LoginPage } from '../login';
|
|
27
|
-
import { backupLoginForm } from '../login/data/actions';
|
|
28
|
-
import { RegistrationPage } from '../register';
|
|
29
|
-
import { backupRegistrationForm } from '../register/data/actions';
|
|
30
|
-
|
|
31
|
-
const Logistration = (props) => {
|
|
32
|
-
const { selectedPage, tpaProviders } = props;
|
|
33
|
-
const tpaHint = getTpaHint();
|
|
34
|
-
const {
|
|
35
|
-
providers, secondaryProviders,
|
|
36
|
-
} = tpaProviders;
|
|
37
|
-
const { formatMessage } = useIntl();
|
|
38
|
-
const [institutionLogin, setInstitutionLogin] = useState(false);
|
|
39
|
-
const [key, setKey] = useState('');
|
|
40
|
-
const navigate = useNavigate();
|
|
41
|
-
const disablePublicAccountCreation = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false;
|
|
42
|
-
const hideRegistrationLink = useAppConfig().SHOW_REGISTRATION_LINKS === false;
|
|
43
|
-
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
const authService = getAuthService();
|
|
46
|
-
if (authService) {
|
|
47
|
-
authService.getCsrfTokenService().getCsrfToken(getSiteConfig().lmsBaseUrl);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (disablePublicAccountCreation) {
|
|
53
|
-
navigate(updatePathWithQueryParams(LOGIN_PAGE));
|
|
54
|
-
}
|
|
55
|
-
}, [navigate, disablePublicAccountCreation]);
|
|
56
|
-
|
|
57
|
-
const handleInstitutionLogin = (e) => {
|
|
58
|
-
sendTrackEvent('edx.bi.institution_login_form.toggled', { category: 'user-engagement' });
|
|
59
|
-
if (typeof e === 'string') {
|
|
60
|
-
sendPageEvent('login_and_registration', e === '/login' ? 'login' : 'register');
|
|
61
|
-
} else {
|
|
62
|
-
sendPageEvent('login_and_registration', e.target.dataset.eventName);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
setInstitutionLogin(!institutionLogin);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const handleOnSelect = (tabKey, currentTab) => {
|
|
69
|
-
if (tabKey === currentTab) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
sendTrackEvent(`edx.bi.${tabKey.replace('/', '')}_form.toggled`, { category: 'user-engagement' });
|
|
73
|
-
props.clearThirdPartyAuthContextErrorMessage();
|
|
74
|
-
if (tabKey === LOGIN_PAGE) {
|
|
75
|
-
props.backupRegistrationForm();
|
|
76
|
-
} else if (tabKey === REGISTER_PAGE) {
|
|
77
|
-
props.backupLoginForm();
|
|
78
|
-
}
|
|
79
|
-
setKey(tabKey);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const tabTitle = (
|
|
83
|
-
<div className="d-flex">
|
|
84
|
-
<Icon src={ChevronLeft} className="left-icon" />
|
|
85
|
-
<span className="ml-2">
|
|
86
|
-
{selectedPage === LOGIN_PAGE
|
|
87
|
-
? formatMessage(messages['logistration.sign.in'])
|
|
88
|
-
: formatMessage(messages['logistration.register'])}
|
|
89
|
-
</span>
|
|
90
|
-
</div>
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
const isValidTpaHint = () => {
|
|
94
|
-
const { provider } = getTpaProvider(tpaHint, providers, secondaryProviders);
|
|
95
|
-
return !!provider;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<BaseContainer>
|
|
100
|
-
<div>
|
|
101
|
-
{disablePublicAccountCreation
|
|
102
|
-
? (
|
|
103
|
-
<>
|
|
104
|
-
{institutionLogin && (
|
|
105
|
-
<Tabs defaultActiveKey="" id="controlled-tab" onSelect={handleInstitutionLogin}>
|
|
106
|
-
<Tab title={tabTitle} eventKey={LOGIN_PAGE} />
|
|
107
|
-
</Tabs>
|
|
108
|
-
)}
|
|
109
|
-
<div id="main-content" className="main-content">
|
|
110
|
-
{!institutionLogin && (
|
|
111
|
-
<h3 className="mb-4.5">{formatMessage(messages['logistration.sign.in'])}</h3>
|
|
112
|
-
)}
|
|
113
|
-
<LoginPage institutionLogin={institutionLogin} handleInstitutionLogin={handleInstitutionLogin} />
|
|
114
|
-
</div>
|
|
115
|
-
</>
|
|
116
|
-
)
|
|
117
|
-
: (
|
|
118
|
-
<div>
|
|
119
|
-
{institutionLogin
|
|
120
|
-
? (
|
|
121
|
-
<Tabs defaultActiveKey="" id="controlled-tab" onSelect={handleInstitutionLogin}>
|
|
122
|
-
<Tab title={tabTitle} eventKey={selectedPage === LOGIN_PAGE ? LOGIN_PAGE : REGISTER_PAGE} />
|
|
123
|
-
</Tabs>
|
|
124
|
-
)
|
|
125
|
-
: (!isValidTpaHint() && !hideRegistrationLink && (
|
|
126
|
-
<Tabs defaultActiveKey={selectedPage} id="controlled-tab" onSelect={(tabKey) => handleOnSelect(tabKey, selectedPage)}>
|
|
127
|
-
<Tab title={formatMessage(messages['logistration.register'])} eventKey={REGISTER_PAGE} />
|
|
128
|
-
<Tab title={formatMessage(messages['logistration.sign.in'])} eventKey={LOGIN_PAGE} />
|
|
129
|
-
</Tabs>
|
|
130
|
-
))}
|
|
131
|
-
{key && (
|
|
132
|
-
<Navigate to={updatePathWithQueryParams(key)} replace />
|
|
133
|
-
)}
|
|
134
|
-
<div id="main-content" className="main-content">
|
|
135
|
-
{!institutionLogin && !isValidTpaHint() && hideRegistrationLink && (
|
|
136
|
-
<h3 className="mb-4.5">
|
|
137
|
-
{formatMessage(messages[selectedPage === LOGIN_PAGE ? 'logistration.sign.in' : 'logistration.register'])}
|
|
138
|
-
</h3>
|
|
139
|
-
)}
|
|
140
|
-
{selectedPage === LOGIN_PAGE
|
|
141
|
-
? <LoginPage institutionLogin={institutionLogin} handleInstitutionLogin={handleInstitutionLogin} />
|
|
142
|
-
: (
|
|
143
|
-
<RegistrationPage
|
|
144
|
-
institutionLogin={institutionLogin}
|
|
145
|
-
handleInstitutionLogin={handleInstitutionLogin}
|
|
146
|
-
/>
|
|
147
|
-
)}
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
)}
|
|
151
|
-
</div>
|
|
152
|
-
</BaseContainer>
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
Logistration.propTypes = {
|
|
157
|
-
selectedPage: PropTypes.string,
|
|
158
|
-
backupLoginForm: PropTypes.func.isRequired,
|
|
159
|
-
backupRegistrationForm: PropTypes.func.isRequired,
|
|
160
|
-
clearThirdPartyAuthContextErrorMessage: PropTypes.func.isRequired,
|
|
161
|
-
tpaProviders: PropTypes.shape({
|
|
162
|
-
providers: PropTypes.arrayOf(PropTypes.shape({})),
|
|
163
|
-
secondaryProviders: PropTypes.arrayOf(PropTypes.shape({})),
|
|
164
|
-
}),
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
Logistration.defaultProps = {
|
|
168
|
-
tpaProviders: {
|
|
169
|
-
providers: [],
|
|
170
|
-
secondaryProviders: [],
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
Logistration.defaultProps = {
|
|
175
|
-
selectedPage: REGISTER_PAGE,
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
const mapStateToProps = state => ({
|
|
179
|
-
tpaProviders: tpaProvidersSelector(state),
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
export default connect(
|
|
183
|
-
mapStateToProps,
|
|
184
|
-
{
|
|
185
|
-
backupLoginForm,
|
|
186
|
-
backupRegistrationForm,
|
|
187
|
-
clearThirdPartyAuthContextErrorMessage,
|
|
188
|
-
},
|
|
189
|
-
)(Logistration);
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { Provider } from 'react-redux';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CurrentAppProvider, configureI18n, getSiteConfig, injectIntl, IntlProvider, mergeAppConfig, sendPageEvent, sendTrackEvent
|
|
5
|
-
} from '@openedx/frontend-base';
|
|
6
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
7
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
8
|
-
import configureStore from 'redux-mock-store';
|
|
9
|
-
|
|
10
|
-
import { appId } from '../constants';
|
|
11
|
-
import { clearThirdPartyAuthContextErrorMessage } from '../common-components/data/actions';
|
|
12
|
-
import {
|
|
13
|
-
COMPLETE_STATE, LOGIN_PAGE, REGISTER_PAGE,
|
|
14
|
-
} from '../data/constants';
|
|
15
|
-
import { backupLoginForm } from '../login/data/actions';
|
|
16
|
-
import { backupRegistrationForm } from '../register/data/actions';
|
|
17
|
-
import Logistration from './Logistration';
|
|
18
|
-
|
|
19
|
-
jest.mock('@openedx/frontend-base', () => ({
|
|
20
|
-
...jest.requireActual('@openedx/frontend-base'),
|
|
21
|
-
sendPageEvent: jest.fn(),
|
|
22
|
-
sendTrackEvent: jest.fn(),
|
|
23
|
-
getAuthenticatedUser: jest.fn(() => ({
|
|
24
|
-
userId: 3,
|
|
25
|
-
username: 'test-user',
|
|
26
|
-
})),
|
|
27
|
-
getAuthService: jest.fn(() => null),
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
const mockStore = configureStore();
|
|
31
|
-
const IntlLogistration = injectIntl(Logistration);
|
|
32
|
-
|
|
33
|
-
describe('Logistration', () => {
|
|
34
|
-
let store = {};
|
|
35
|
-
|
|
36
|
-
const secondaryProviders = {
|
|
37
|
-
id: 'saml-test',
|
|
38
|
-
name: 'Test University',
|
|
39
|
-
loginUrl: '/dummy-auth',
|
|
40
|
-
registerUrl: '/dummy_auth',
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const reduxWrapper = children => (
|
|
44
|
-
<IntlProvider locale="en">
|
|
45
|
-
<MemoryRouter>
|
|
46
|
-
<CurrentAppProvider appId={appId}>
|
|
47
|
-
<Provider store={store}>{children}</Provider>
|
|
48
|
-
</CurrentAppProvider>
|
|
49
|
-
</MemoryRouter>
|
|
50
|
-
</IntlProvider>
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const initialState = {
|
|
54
|
-
register: {
|
|
55
|
-
registrationFormData: {
|
|
56
|
-
configurableFormFields: {
|
|
57
|
-
marketingEmailsOptIn: true,
|
|
58
|
-
},
|
|
59
|
-
formFields: {
|
|
60
|
-
name: '', email: '', username: '', password: '',
|
|
61
|
-
},
|
|
62
|
-
emailSuggestion: {
|
|
63
|
-
suggestion: '', type: '',
|
|
64
|
-
},
|
|
65
|
-
errors: {
|
|
66
|
-
name: '', email: '', username: '', password: '',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
registrationResult: { success: false, redirectUrl: '' },
|
|
70
|
-
registrationError: {},
|
|
71
|
-
usernameSuggestions: [],
|
|
72
|
-
validationApiRateLimited: false,
|
|
73
|
-
},
|
|
74
|
-
commonComponents: {
|
|
75
|
-
thirdPartyAuthContext: {
|
|
76
|
-
providers: [],
|
|
77
|
-
secondaryProviders: [],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
login: {
|
|
81
|
-
loginResult: { success: false, redirectUrl: '' },
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
beforeEach(() => {
|
|
86
|
-
store = mockStore(initialState);
|
|
87
|
-
|
|
88
|
-
configureI18n({
|
|
89
|
-
messages: { 'es-419': {}, de: {}, 'en-us': {} },
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('should render registration page', () => {
|
|
94
|
-
mergeAppConfig(appId, {
|
|
95
|
-
ALLOW_PUBLIC_ACCOUNT_CREATION: true,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
const { container } = render(reduxWrapper(<IntlLogistration />));
|
|
99
|
-
|
|
100
|
-
expect(container.querySelector('RegistrationPage')).toBeDefined();
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it('should render login page', () => {
|
|
104
|
-
const props = { selectedPage: LOGIN_PAGE };
|
|
105
|
-
const { container } = render(reduxWrapper(<IntlLogistration {...props} />));
|
|
106
|
-
|
|
107
|
-
expect(container.querySelector('LoginPage')).toBeDefined();
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('should render login/register headings when show registration links is disabled', () => {
|
|
111
|
-
mergeAppConfig(appId, {
|
|
112
|
-
ALLOW_PUBLIC_ACCOUNT_CREATION: true,
|
|
113
|
-
SHOW_REGISTRATION_LINKS: false,
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
let props = { selectedPage: LOGIN_PAGE };
|
|
117
|
-
const { rerender } = render(reduxWrapper(<IntlLogistration {...props} />));
|
|
118
|
-
|
|
119
|
-
// verifying sign in heading
|
|
120
|
-
expect(screen.getByRole('heading', { level: 3 }).textContent).toEqual('Sign in');
|
|
121
|
-
|
|
122
|
-
// register page is still accessible when SHOW_REGISTRATION_LINKS is false
|
|
123
|
-
// but it needs to be accessed directly
|
|
124
|
-
props = { selectedPage: REGISTER_PAGE };
|
|
125
|
-
rerender(reduxWrapper(<IntlLogistration {...props} />));
|
|
126
|
-
|
|
127
|
-
// verifying register heading
|
|
128
|
-
expect(screen.getByRole('heading', { level: 3 }).textContent).toEqual('Register');
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it('should render only login page when public account creation is disabled', () => {
|
|
132
|
-
mergeAppConfig(appId, {
|
|
133
|
-
ALLOW_PUBLIC_ACCOUNT_CREATION: false,
|
|
134
|
-
DISABLE_ENTERPRISE_LOGIN: 'true',
|
|
135
|
-
SHOW_REGISTRATION_LINKS: 'true',
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
store = mockStore({
|
|
139
|
-
...initialState,
|
|
140
|
-
commonComponents: {
|
|
141
|
-
thirdPartyAuthContext: {
|
|
142
|
-
currentProvider: null,
|
|
143
|
-
finishAuthUrl: null,
|
|
144
|
-
providers: [],
|
|
145
|
-
secondaryProviders: [secondaryProviders],
|
|
146
|
-
},
|
|
147
|
-
thirdPartyAuthApiStatus: COMPLETE_STATE,
|
|
148
|
-
},
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
const props = { selectedPage: LOGIN_PAGE };
|
|
152
|
-
const { container } = render(reduxWrapper(<IntlLogistration {...props} />));
|
|
153
|
-
|
|
154
|
-
// verifying sign in heading for institution login false
|
|
155
|
-
expect(screen.getByRole('heading', { level: 3 }).textContent).toEqual('Sign in');
|
|
156
|
-
|
|
157
|
-
// verifying tabs heading for institution login true
|
|
158
|
-
fireEvent.click(screen.getByRole('link'));
|
|
159
|
-
expect(container.querySelector('#controlled-tab')).toBeDefined();
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
it('should display institution login option when secondary providers are present', () => {
|
|
163
|
-
mergeAppConfig(appId, {
|
|
164
|
-
DISABLE_ENTERPRISE_LOGIN: 'true',
|
|
165
|
-
ALLOW_PUBLIC_ACCOUNT_CREATION: 'true',
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
store = mockStore({
|
|
169
|
-
...initialState,
|
|
170
|
-
commonComponents: {
|
|
171
|
-
thirdPartyAuthContext: {
|
|
172
|
-
currentProvider: null,
|
|
173
|
-
finishAuthUrl: null,
|
|
174
|
-
providers: [],
|
|
175
|
-
secondaryProviders: [secondaryProviders],
|
|
176
|
-
},
|
|
177
|
-
thirdPartyAuthApiStatus: COMPLETE_STATE,
|
|
178
|
-
},
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
const props = { selectedPage: LOGIN_PAGE };
|
|
182
|
-
render(reduxWrapper(<IntlLogistration {...props} />));
|
|
183
|
-
expect(screen.getByText('Institution/campus credentials')).toBeDefined();
|
|
184
|
-
|
|
185
|
-
// on clicking "Institution/campus credentials" button, it should display institution login page
|
|
186
|
-
fireEvent.click(screen.getByText('Institution/campus credentials'));
|
|
187
|
-
expect(screen.getByText('Test University')).toBeDefined();
|
|
188
|
-
|
|
189
|
-
mergeAppConfig(appId, {
|
|
190
|
-
DISABLE_ENTERPRISE_LOGIN: '',
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
it('send tracking and page events when institutional login button is clicked', () => {
|
|
195
|
-
mergeAppConfig(appId, {
|
|
196
|
-
DISABLE_ENTERPRISE_LOGIN: 'true',
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
store = mockStore({
|
|
200
|
-
...initialState,
|
|
201
|
-
commonComponents: {
|
|
202
|
-
thirdPartyAuthContext: {
|
|
203
|
-
currentProvider: null,
|
|
204
|
-
finishAuthUrl: null,
|
|
205
|
-
providers: [],
|
|
206
|
-
secondaryProviders: [secondaryProviders],
|
|
207
|
-
},
|
|
208
|
-
thirdPartyAuthApiStatus: COMPLETE_STATE,
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
const props = { selectedPage: LOGIN_PAGE };
|
|
213
|
-
render(reduxWrapper(<IntlLogistration {...props} />));
|
|
214
|
-
fireEvent.click(screen.getByText('Institution/campus credentials'));
|
|
215
|
-
|
|
216
|
-
expect(sendTrackEvent).toHaveBeenCalledWith('edx.bi.institution_login_form.toggled', { category: 'user-engagement' });
|
|
217
|
-
expect(sendPageEvent).toHaveBeenCalledWith('login_and_registration', 'institution_login');
|
|
218
|
-
|
|
219
|
-
mergeAppConfig(appId, {
|
|
220
|
-
DISABLE_ENTERPRISE_LOGIN: '',
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
it('should not display institution register button', () => {
|
|
225
|
-
mergeAppConfig(appId, {
|
|
226
|
-
DISABLE_ENTERPRISE_LOGIN: 'true',
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
store = mockStore({
|
|
230
|
-
...initialState,
|
|
231
|
-
commonComponents: {
|
|
232
|
-
thirdPartyAuthContext: {
|
|
233
|
-
currentProvider: null,
|
|
234
|
-
finishAuthUrl: null,
|
|
235
|
-
providers: [],
|
|
236
|
-
secondaryProviders: [secondaryProviders],
|
|
237
|
-
},
|
|
238
|
-
thirdPartyAuthApiStatus: COMPLETE_STATE,
|
|
239
|
-
},
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
delete window.location;
|
|
243
|
-
window.location = { hostname: getSiteConfig().siteName, href: getSiteConfig().baseUrl };
|
|
244
|
-
|
|
245
|
-
render(reduxWrapper(<IntlLogistration />));
|
|
246
|
-
fireEvent.click(screen.getByText('Institution/campus credentials'));
|
|
247
|
-
expect(screen.getByText('Test University')).toBeDefined();
|
|
248
|
-
|
|
249
|
-
mergeAppConfig(appId, {
|
|
250
|
-
DISABLE_ENTERPRISE_LOGIN: '',
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
it('should fire action to backup registration form on tab click', () => {
|
|
255
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
256
|
-
const { container } = render(reduxWrapper(<IntlLogistration />));
|
|
257
|
-
fireEvent.click(container.querySelector('a[data-rb-event-key="/login"]'));
|
|
258
|
-
expect(store.dispatch).toHaveBeenCalledWith(backupRegistrationForm());
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
it('should fire action to backup login form on tab click', () => {
|
|
262
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
263
|
-
const props = { selectedPage: LOGIN_PAGE };
|
|
264
|
-
const { container } = render(reduxWrapper(<IntlLogistration {...props} />));
|
|
265
|
-
fireEvent.click(container.querySelector('a[data-rb-event-key="/register"]'));
|
|
266
|
-
expect(store.dispatch).toHaveBeenCalledWith(backupLoginForm());
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
it('should clear tpa context errorMessage tab click', () => {
|
|
270
|
-
store.dispatch = jest.fn(store.dispatch);
|
|
271
|
-
const { container } = render(reduxWrapper(<IntlLogistration />));
|
|
272
|
-
fireEvent.click(container.querySelector('a[data-rb-event-key="/login"]'));
|
|
273
|
-
expect(store.dispatch).toHaveBeenCalledWith(clearThirdPartyAuthContextErrorMessage());
|
|
274
|
-
});
|
|
275
|
-
});
|