Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update prompt for user retirement #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -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=''
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ SITE_NAME='edX'
USER_INFO_COOKIE_NAME='edx-user-info'
APP_ID=''
MFE_CONFIG_API_URL=''
RETIREMENT_PROCEDURES_URL=''
5 changes: 4 additions & 1 deletion src/users/account-actions/RetireUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Comment on lines +48 to +49
Copy link
Contributor

@DawoudSheraz DawoudSheraz Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legal and support procedures documented here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I saw that. I wanted to refer to text before it.

values={{
username: <strong>{username}</strong>,
email: <strong>{email}</strong>,
br: <br />,
proceduresUrl: <a href={process.env.RETIREMENT_PROCEDURES_URL}>here</a>,
}}
/>
</Alert>
Expand Down
4 changes: 3 additions & 1 deletion src/users/account-actions/RetireUser.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]. 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: [email protected]. 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);
Expand Down