+
{isEnrolled &&
}
diff --git a/src/containers/CourseCard/components/CourseCardBanners/index.test.jsx b/src/containers/CourseCard/components/CourseCardBanners/index.test.jsx
new file mode 100644
index 0000000..3f85b8c
--- /dev/null
+++ b/src/containers/CourseCard/components/CourseCardBanners/index.test.jsx
@@ -0,0 +1,32 @@
+import { shallow } from 'enzyme';
+
+import { reduxHooks } from 'hooks';
+
+import CourseCardBanners from '.';
+
+jest.mock('./CourseBanner', () => 'CourseBanner');
+jest.mock('./CertificateBanner', () => 'CertificateBanner');
+jest.mock('./CreditBanner', () => 'CreditBanner');
+jest.mock('./EntitlementBanner', () => 'EntitlementBanner');
+jest.mock('./RelatedProgramsBanner', () => 'RelatedProgramsBanner');
+
+jest.mock('hooks', () => ({
+ reduxHooks: {
+ useCardEnrollmentData: jest.fn(() => ({ isEnrolled: true })),
+ },
+}));
+
+describe('CourseCardBanners', () => {
+ const props = {
+ cardId: 'test-card-id',
+ };
+ test('renders default CourseCardBanners', () => {
+ const wrapper = shallow(
);
+ expect(wrapper).toMatchSnapshot();
+ });
+ test('render with isEnrolled false', () => {
+ reduxHooks.useCardEnrollmentData.mockReturnValueOnce({ isEnrolled: false });
+ const wrapper = shallow(
);
+ expect(wrapper).toMatchSnapshot();
+ });
+});
diff --git a/src/containers/CourseCard/index.jsx b/src/containers/CourseCard/index.jsx
index e266a80..ce96cec 100644
--- a/src/containers/CourseCard/index.jsx
+++ b/src/containers/CourseCard/index.jsx
@@ -10,7 +10,6 @@ import CourseCardMenu from './components/CourseCardMenu';
import CourseCardActions from './components/CourseCardActions';
import CourseCardDetails from './components/CourseCardDetails';
import CourseCardTitle from './components/CourseCardTitle';
-import RelatedProgramsBadge from './components/RelatedProgramsBadge';
import './CourseCard.scss';
@@ -34,7 +33,6 @@ export const CourseCard = ({
-
diff --git a/src/containers/CourseCard/index.test.jsx b/src/containers/CourseCard/index.test.jsx
index 5f09d5e..f4aa821 100644
--- a/src/containers/CourseCard/index.test.jsx
+++ b/src/containers/CourseCard/index.test.jsx
@@ -14,7 +14,6 @@ jest.mock('./components/CourseCardMenu', () => 'CourseCardMenu');
jest.mock('./components/CourseCardActions', () => 'CourseCardActions');
jest.mock('./components/CourseCardDetails', () => 'CourseCardDetails');
jest.mock('./components/CourseCardTitle', () => 'CourseCardTitle');
-jest.mock('./components/RelatedProgramsBadge', () => 'RelatedProgramsBadge');
const cardId = 'test-card-id';
diff --git a/src/containers/CourseList/NoCoursesView/__snapshots__/index.test.jsx.snap b/src/containers/CourseList/NoCoursesView/__snapshots__/index.test.jsx.snap
index 5d60310..894f016 100644
--- a/src/containers/CourseList/NoCoursesView/__snapshots__/index.test.jsx.snap
+++ b/src/containers/CourseList/NoCoursesView/__snapshots__/index.test.jsx.snap
@@ -18,6 +18,7 @@ exports[`NoCoursesView snapshot 1`] = `