From ee435f8a96a885b0e8c22e85ba530e66ae4dbfc7 Mon Sep 17 00:00:00 2001 From: Ali Nawaz Date: Wed, 26 Apr 2023 18:19:18 +0500 Subject: [PATCH] chore: update prompt for user retirement --- .env.development | 1 + .env.test | 1 + src/users/account-actions/RetireUser.jsx | 5 ++++- src/users/account-actions/RetireUser.test.jsx | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 3d4695b06..496c2b1d8 100644 --- a/.env.development +++ b/.env.development @@ -28,3 +28,4 @@ USER_INFO_COOKIE_NAME='edx-user-info' PUBLISHER_BASE_URL='http://localhost:18400' APP_ID='support-tools' MFE_CONFIG_API_URL='http://localhost:18000/api/mfe_config/v1' +RETIREMENT_PROCEDURES_URL='' diff --git a/.env.test b/.env.test index faae9ea53..ce876a1ab 100644 --- a/.env.test +++ b/.env.test @@ -18,3 +18,4 @@ SITE_NAME='edX' USER_INFO_COOKIE_NAME='edx-user-info' APP_ID='' MFE_CONFIG_API_URL='' +RETIREMENT_PROCEDURES_URL='' diff --git a/src/users/account-actions/RetireUser.jsx b/src/users/account-actions/RetireUser.jsx index 04a77d4fc..8b595e262 100644 --- a/src/users/account-actions/RetireUser.jsx +++ b/src/users/account-actions/RetireUser.jsx @@ -44,11 +44,14 @@ export default function RetireUser({ defaultMessage="You are about to retire {username} with the email address: {email}.{br}{br} This is a serious action that will revoke this user's access to edX and their earned certificates. Furthermore, the email address associated - with the retired account will not be able to be used to create a new account." + with the retired account will not be able to be used to create a new account.{br}{br} + By taking this action, you are affirming that you are following our legal/support procedures + {proceduresUrl}" values={{ username: {username}, email: {email}, br:
, + proceduresUrl: here, }} /> diff --git a/src/users/account-actions/RetireUser.test.jsx b/src/users/account-actions/RetireUser.test.jsx index 75808dcda..96ad31a16 100644 --- a/src/users/account-actions/RetireUser.test.jsx +++ b/src/users/account-actions/RetireUser.test.jsx @@ -48,7 +48,9 @@ describe('Retire User Component Tests', () => { expect(retireUserModal.find('h2.pgn__modal-title').text()).toEqual('Retire User Confirmation'); const confirmAlert = retireUserModal.find('.alert-warning'); expect(confirmAlert.text()).toEqual( - "You are about to retire edx with the email address: edx@example.com. This is a serious action that will revoke this user's access to edX and their earned certificates. Furthermore, the email address associated with the retired account will not be able to be used to create a new account.", + "You are about to retire edx with the email address: edx@example.com. This is a serious action that will revoke this user's access to edX and their earned certificates. " + + 'Furthermore, the email address associated with the retired account will not be able to be used to create a new account. By taking this action, you are affirming that you ' + + 'are following our legal/support procedures here', ); retireUserModal.find('button.btn-danger').hostNodes().simulate('click'); await waitForComponentToPaint(wrapper);