diff --git a/src/_style.scss b/src/_style.scss index 951e825b..8c5af8f2 100644 --- a/src/_style.scss +++ b/src/_style.scss @@ -591,11 +591,6 @@ select.form-control { border: 2px solid #F0CC00; } -.one-rem-font { - font-size: 0.99rem; - color: #707070; -} - .institute-heading { color: $primary-700; } @@ -668,16 +663,13 @@ select.form-control { } } -.arrow-back-icon { - margin-top:2px; -} - .icon-size { width: 2.3rem; } .has-floating-label { color: $gray-500; } + .pgn__form-control-floating-label .pgn__form-control-floating-label-content { font-size: 0.875rem; line-height: 1.5; diff --git a/src/data/utils/dataUtils.js b/src/data/utils/dataUtils.js index 7aa43ae4..ab8d7729 100644 --- a/src/data/utils/dataUtils.js +++ b/src/data/utils/dataUtils.js @@ -1,17 +1,8 @@ // Utility functions - import * as QueryString from 'query-string'; import { AUTH_PARAMS } from '../constants'; -export default function processLink(link) { - let matches; - link.replace(/(.*?)([^<]+)<\/a>(.*)/g, function () { // eslint-disable-line func-names - matches = Array.prototype.slice.call(arguments, 1, 5); // eslint-disable-line prefer-rest-params - }); - return matches; -} - export const getTpaProvider = (tpaHintProvider, primaryProviders, secondaryProviders) => { let tpaProvider = null; let skipHintedLogin = false; diff --git a/src/data/utils/dataUtils.test.js b/src/data/utils/dataUtils.test.js index b2dd3c58..2cb2c751 100644 --- a/src/data/utils/dataUtils.test.js +++ b/src/data/utils/dataUtils.test.js @@ -1,18 +1,5 @@ import { LOGIN_PAGE } from '../constants'; -import processLink, { updatePathWithQueryParams } from './dataUtils'; - -describe('processLink', () => { - it('should use the provided processLink function to', () => { - const expectedHref = 'http://test.server.com/'; - const expectedText = 'test link'; - const link = `${expectedText}`; - - const matches = processLink(link); - - expect(matches[1]).toEqual(expectedHref); - expect(matches[2]).toEqual(expectedText); - }); -}); +import { updatePathWithQueryParams } from './dataUtils'; describe('updatePathWithQueryParams', () => { it('should append query params into the path', () => { diff --git a/src/data/utils/index.js b/src/data/utils/index.js index d452dc5d..2161cd5a 100644 --- a/src/data/utils/index.js +++ b/src/data/utils/index.js @@ -1,5 +1,4 @@ export { - default, getTpaProvider, getTpaHint, updatePathWithQueryParams, diff --git a/src/forgot-password/ForgotPasswordPage.jsx b/src/forgot-password/ForgotPasswordPage.jsx index c4be3caa..1d092aa2 100644 --- a/src/forgot-password/ForgotPasswordPage.jsx +++ b/src/forgot-password/ForgotPasswordPage.jsx @@ -31,10 +31,11 @@ const ForgotPasswordPage = (props) => { const { intl, status, submitState } = props; const platformName = getConfig().SITE_NAME; + const supportUrl = getConfig().LOGIN_ISSUE_SUPPORT_LINK; const regex = new RegExp(VALID_EMAIL_REGEX, 'i'); + const [validationError, setValidationError] = useState(''); const [key, setKey] = useState(''); - const supportUrl = getConfig().LOGIN_ISSUE_SUPPORT_LINK; useEffect(() => { sendPageEvent('login_and_registration', 'reset'); @@ -55,8 +56,8 @@ const ForgotPasswordPage = (props) => { }; const tabTitle = ( -
{intl.formatMessage(messages['additional.help.text'])}
-
+ {intl.formatMessage(messages['additional.help.text'], { platformName })}
+
+
{intl.formatMessage(messages['internal.server.error.message'])}
; - break; case INVALID_FORM: errorList ={intl.formatMessage(messages['login.form.invalid.error.message'])}
; break; @@ -149,28 +144,10 @@ const LoginFailureMessage = (props) => { ); case REQUIRE_PASSWORD_CHANGE: return- {beforeLink} - {linkText} - {afterLink} -
- ); - } - return{error}
; - }); + errorList ={intl.formatMessage(messages['internal.server.error.message'])}
; + break; } return ( @@ -185,7 +162,6 @@ LoginFailureMessage.defaultProps = { loginError: { redirectUrl: null, errorCode: null, - value: '', }, }; @@ -194,7 +170,6 @@ LoginFailureMessage.propTypes = { context: PropTypes.object, email: PropTypes.string, errorCode: PropTypes.string, - value: PropTypes.string, redirectUrl: PropTypes.string, }), intl: intlShape.isRequired, diff --git a/src/login/tests/LoginFailure.test.jsx b/src/login/tests/LoginFailure.test.jsx index 1e0279ee..eef13b0c 100644 --- a/src/login/tests/LoginFailure.test.jsx +++ b/src/login/tests/LoginFailure.test.jsx @@ -201,11 +201,10 @@ describe('LoginFailureMessage', () => { expect(loginFailureMessage.find('#login-failure-alert').first().text()).toEqual(expectedMessage); }); - it('should match direct render of error message', () => { - const errorMessage = 'Email or password is incorrect.'; + it('should match internal server of error message', () => { props = { loginError: { - value: errorMessage, + errorCode: 'invalid-error-code', }, }; @@ -215,29 +214,10 @@ describe('LoginFailureMessage', () => { , ); - const expectedMessage = 'We couldn\'t sign you in.'.concat(errorMessage); + const expectedMessage = 'We couldn\'t sign you in.An error has occurred. Try refreshing the page, or check your internet connection.'; expect(loginFailureMessage.find('#login-failure-alert').first().text()).toEqual(expectedMessage); }); - it('should match error message containing link snapshot', () => { - props = { - loginError: { - value: 'To be on the safe side, you can reset your password here before you try again.\n', - }, - }; - - const loginFailureMessage = mount( -