diff --git a/.env b/.env
index d245341..ff90ec6 100644
--- a/.env
+++ b/.env
@@ -33,3 +33,4 @@ APP_ID=
MFE_CONFIG_API_URL=
PASSWORD_RESET_SUPPORT_LINK=''
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/.env.development b/.env.development
index b2f1e38..522910d 100644
--- a/.env.development
+++ b/.env.development
@@ -34,3 +34,4 @@ APP_ID=
MFE_CONFIG_API_URL=
PASSWORD_RESET_SUPPORT_LINK='mailto:support@example.com'
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/.env.test b/.env.test
index 4be694b..e05bbcd 100644
--- a/.env.test
+++ b/.env.test
@@ -32,3 +32,4 @@ MARKETING_EMAILS_OPT_IN=''
APP_ID=
MFE_CONFIG_API_URL=
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/src/account-settings/delete-account/BeforeProceedingBanner.jsx b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
index 6f05132..36eb748 100644
--- a/src/account-settings/delete-account/BeforeProceedingBanner.jsx
+++ b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
@@ -25,10 +25,12 @@ const BeforeProceedingBanner = (props) => {
defaultMessage="Before proceeding, please {actionLink}."
description="Error that appears if you are trying to delete your account, but something about your account needs attention first. The actionLink will be instructions, such as 'unlink your Facebook account'."
values={{
- actionLink: (
+ actionLink: supportArticleUrl ? (
{intl.formatMessage(messages[instructionMessageId])}
+ ) : (
+ intl.formatMessage(messages[instructionMessageId])
),
siteName: getConfig().SITE_NAME,
}}
diff --git a/src/account-settings/delete-account/BeforeProceedingBanner.test.jsx b/src/account-settings/delete-account/BeforeProceedingBanner.test.jsx
new file mode 100644
index 0000000..4800cdf
--- /dev/null
+++ b/src/account-settings/delete-account/BeforeProceedingBanner.test.jsx
@@ -0,0 +1,48 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import renderer from 'react-test-renderer';
+import { IntlProvider, injectIntl, createIntl } from '@edx/frontend-platform/i18n';
+
+ReactDOM.createPortal = node => node;
+
+import BeforeProceedingBanner from './BeforeProceedingBanner'; // eslint-disable-line import/first
+
+const IntlBeforeProceedingBanner = injectIntl(BeforeProceedingBanner);
+
+describe('BeforeProceedingBanner', () => {
+ it('should match the snapshot if SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT does not have a support link', () => {
+ const props = {
+ instructionMessageId: 'account.settings.delete.account.please.unlink',
+ intl: createIntl({ locale: 'en' }),
+ supportArticleUrl: '',
+ };
+ const tree = renderer
+ .create((
+
+
+
+ ))
+ .toJSON();
+ expect(tree).toMatchSnapshot();
+ });
+
+ it('should match the snapshot when SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT has a support link', () => {
+ const props = {
+ instructionMessageId: 'account.settings.delete.account.please.unlink',
+ intl: createIntl({ locale: 'en' }),
+ supportArticleUrl: 'http://test-support.edx',
+ };
+ const tree = renderer
+ .create((
+
+
+
+ ))
+ .toJSON();
+ expect(tree).toMatchSnapshot();
+ });
+});
diff --git a/src/account-settings/delete-account/DeleteAccount.jsx b/src/account-settings/delete-account/DeleteAccount.jsx
index 5cf806a..6a6323d 100644
--- a/src/account-settings/delete-account/DeleteAccount.jsx
+++ b/src/account-settings/delete-account/DeleteAccount.jsx
@@ -59,6 +59,7 @@ export class DeleteAccount extends React.Component {
hasLinkedTPA, isVerifiedAccount, status, errorType, intl,
} = this.props;
const canDelete = isVerifiedAccount && !hasLinkedTPA;
+ const supportArticleUrl = process.env.SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT;
// TODO: We lack a good way of providing custom language for a particular site. This is a hack
// to allow edx.org to fulfill its business requirements.
@@ -122,7 +123,7 @@ export class DeleteAccount extends React.Component {
{hasLinkedTPA ? (
) : null}
diff --git a/src/account-settings/delete-account/__snapshots__/BeforeProceedingBanner.test.jsx.snap b/src/account-settings/delete-account/__snapshots__/BeforeProceedingBanner.test.jsx.snap
new file mode 100644
index 0000000..9a62d94
--- /dev/null
+++ b/src/account-settings/delete-account/__snapshots__/BeforeProceedingBanner.test.jsx.snap
@@ -0,0 +1,68 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`BeforeProceedingBanner should match the snapshot if SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT does not have a support link 1`] = `
+
+
+
+ Before proceeding, please unlink all social media accounts.
+
+
+`;
+
+exports[`BeforeProceedingBanner should match the snapshot when SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT has a support link 1`] = `
+
+`;