Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bcgov/EDUC-EDX
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Sep 15, 2022
2 parents 42a08d5 + ac2c939 commit 60f5c90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/src/components/secureExchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ function mapEdxUserActivationErrorMessage(message) {
} else if (msg.includes('This Activation Code has expired')) {
return 'Your activation code has expired. Please contact your administrator for a new activation code.';
} else if (msg.includes('This User Activation Link has expired')) {
return 'Your activation link is expired; the activation link should only be usable one time. Please contact your administrator for a new activation code.';
return 'Your activation link has expired. Please contact your administrator for a new activation code.';
} else if (msg.includes('This user is already associated to the school')) {
return 'This user account is already associated to the school';
}
Expand All @@ -797,7 +797,7 @@ async function verifyActivateUserLink(req, res) {
if (e.status === 400) {
msg = 'Invalid link clicked. Please click the link provided in your email';
} else if (e.status === 410) {
msg = 'Your activation link is expired; the activation link should only be usable one time. Please contact your administrator for a new activation code.';
msg = 'Your activation link has expired. Please contact your administrator for a new activation code.';
}
log.error(e, 'verifyValidationCode', 'Error verifying Validation Code ');
return res.redirect(baseUrl + `/activation-error?errorMessage= ${msg}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('when_url_visited_twice_user_gets_error_link_expired', async t => {
await t.navigateTo(t.fixtureCtx.activationUrl[0]);
await t.navigateTo(t.fixtureCtx.activationUrl[0]);
const errorText = await Selector('#user_activation_error_message').innerText;
await t.expect(errorText).contains('Your activation link is expired; the activation link should only be usable one time. Please contact your administrator for a new activation code.');
await t.expect(errorText).contains('Your activation link has expired. Please contact your administrator for a new activation code.');
log.info('activation link expired on double click on activation url is verified');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('when_url_visited_twice_user_gets_error_link_expired', async t => {
await t.navigateTo(t.fixtureCtx.activationUrl[0]);
await t.navigateTo(t.fixtureCtx.activationUrl[0]);
const errorText = await Selector('#user_activation_error_message').innerText;
await t.expect(errorText).contains('Your activation link is expired; the activation link should only be usable one time. Please contact your administrator for a new activation code.');
await t.expect(errorText).contains('Your activation link has expired. Please contact your administrator for a new activation code.');
log.info('activation link expired on double click on activation url is verified');
});

Expand Down

0 comments on commit 60f5c90

Please sign in to comment.