)}
diff --git a/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx b/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx
index f8fea3c..68f285b 100644
--- a/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx
+++ b/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx
@@ -2,15 +2,13 @@ import React from 'react';
import { shallow } from 'enzyme';
import { formatMessage } from 'testUtils';
-
-import EmailLink from 'components/EmailLink';
+import { MailtoLink } from '@edx/paragon';
import hooks from './hooks';
import messages from './messages';
import CreditBanner from '.';
jest.mock('components/Banner', () => 'Banner');
-jest.mock('components/EmailLink', () => 'EmailLink');
jest.mock('./hooks', () => ({
useCreditBannerData: jest.fn(),
@@ -54,7 +52,7 @@ describe('CreditBanner component', () => {
it('includes credit-error-msg with support email link', () => {
expect(el.find('.credit-error-msg').containsMatchingElement(
formatMessage(messages.error, {
- supportEmailLink: (),
+ supportEmailLink: ({supportEmail}),
}),
)).toEqual(true);
});
@@ -62,6 +60,25 @@ describe('CreditBanner component', () => {
expect(el.find('ContentComponent').props().cardId).toEqual(cardId);
});
});
+
+ describe('with error state with no email', () => {
+ beforeEach(() => {
+ hooks.useCreditBannerData.mockReturnValue({
+ error: true,
+ ContentComponent,
+ });
+ el = shallow();
+ });
+ test('snapshot', () => {
+ expect(el).toMatchSnapshot();
+ });
+ it('includes credit-error-msg without support email link', () => {
+ expect(el.find('.credit-error-msg').containsMatchingElement(
+ formatMessage(messages.errorNoEmail),
+ )).toEqual(true);
+ });
+ });
+
describe('with no error state', () => {
beforeEach(() => {
hooks.useCreditBannerData.mockReturnValue({
diff --git a/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/messages.js b/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/messages.js
index bf0adaa..7c1d397 100644
--- a/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/messages.js
+++ b/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/messages.js
@@ -6,6 +6,11 @@ export const messages = StrictDict({
description: '',
defaultMessage: 'An error occurred with this transaction. For help, contact {supportEmailLink}.',
},
+ errorNoEmail: {
+ id: 'learner-dash.courseCard.banners.credit.errorNoEmail',
+ description: '',
+ defaultMessage: 'An error occurred with this transaction.',
+ },
});
export default messages;
diff --git a/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CertificateBanner.test.jsx.snap b/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CertificateBanner.test.jsx.snap
index b337532..077fe8d 100644
--- a/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CertificateBanner.test.jsx.snap
+++ b/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CertificateBanner.test.jsx.snap
@@ -21,20 +21,40 @@ exports[`CertificateBanner snapshot is restricted 1`] = `
+ Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
+
+`;
+
+exports[`CertificateBanner snapshot is restricted and verified 1`] = `
+
+ Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
+
+ If you would like a refund on your Certificate of Achievement, please contact us.
+
+`;
+
+exports[`CertificateBanner snapshot is restricted and verified with billing email 1`] = `
+
+ Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
+
- suport@email
+ billing@email
,
}
}
@@ -42,7 +62,7 @@ exports[`CertificateBanner snapshot is restricted 1`] = `
`;
-exports[`CertificateBanner snapshot is restricted and verified 1`] = `
+exports[`CertificateBanner snapshot is restricted and verified with support and billing email 1`] = `
@@ -86,6 +106,66 @@ exports[`CertificateBanner snapshot is restricted and verified 1`] = `
`;
+exports[`CertificateBanner snapshot is restricted and verified with support email 1`] = `
+
+
+ suport@email
+ ,
+ }
+ }
+ />
+
+ If you would like a refund on your Certificate of Achievement, please contact us.
+
+`;
+
+exports[`CertificateBanner snapshot is restricted with billing email 1`] = `
+
+ Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
+
+`;
+
+exports[`CertificateBanner snapshot is restricted with support email 1`] = `
+
+
+ suport@email
+ ,
+ }
+ }
+ />
+
+`;
+
exports[`CertificateBanner snapshot not passing and audit 1`] = `
Grade required to pass the course: 0.8%
diff --git a/src/containers/CourseCard/components/CourseCardBanners/messages.js b/src/containers/CourseCard/components/CourseCardBanners/messages.js
index 7a9b8a8..525f4b2 100644
--- a/src/containers/CourseCard/components/CourseCardBanners/messages.js
+++ b/src/containers/CourseCard/components/CourseCardBanners/messages.js
@@ -31,11 +31,21 @@ export const messages = StrictDict({
description: 'Restricted certificate warning message',
defaultMessage: 'Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {supportEmail}.',
},
+ certRestrictedNoEmail: {
+ id: 'learner-dash.courseCard.banners.certificateRestrictedNoEmail',
+ description: 'Restricted certificate warning message',
+ defaultMessage: 'Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.',
+ },
certRefundContactBilling: {
id: 'learner-dash.courseCard.banners.certificateRefundContactBilling',
description: 'Message to learners to contact billing for certificate refunds',
defaultMessage: 'If you would like a refund on your Certificate of Achievement, please contact our billing address {billingEmail}',
},
+ certRefundContactBillingNoEmail: {
+ id: 'learner-dash.courseCard.banners.certificateRefundContactBillingNoEmail',
+ description: 'Message to learners to contact billing for certificate refunds',
+ defaultMessage: 'If you would like a refund on your Certificate of Achievement, please contact us.',
+ },
passingGrade: {
id: 'learner-dash.courseCard.banners.passingGrade',
description: 'Message to learners with minimum passing grade for the course',