diff --git a/src/containers/Dashboard/index.jsx b/src/containers/Dashboard/index.jsx index bb31684..0692e4b 100644 --- a/src/containers/Dashboard/index.jsx +++ b/src/containers/Dashboard/index.jsx @@ -22,7 +22,9 @@ export const Dashboard = () => { const hasAvailableDashboards = reduxHooks.useHasAvailableDashboards(); const initIsPending = reduxHooks.useRequestIsPending(RequestKeys.initialize); const showSelectSessionModal = reduxHooks.useShowSelectSessionModal(); - const shouldShowProductRecommendations = !initIsPending && !hasAvailableDashboards && hasCourses && false; + + // Hard coded to not show until experiment set-up logic is implemented + const showProductRecommendations = !initIsPending && !hasAvailableDashboards && hasCourses && true; return (
@@ -42,7 +44,7 @@ export const Dashboard = () => { )}
- {shouldShowProductRecommendations && } + {showProductRecommendations && } ); }; diff --git a/src/widgets/ProductRecommendations/components/LoadedView.jsx b/src/widgets/ProductRecommendations/components/LoadedView.jsx index 37d5360..03aeea0 100644 --- a/src/widgets/ProductRecommendations/components/LoadedView.jsx +++ b/src/widgets/ProductRecommendations/components/LoadedView.jsx @@ -28,7 +28,7 @@ const LoadedView = ({ crossProductCourses, openCourses }) => {

{formatMessage(messages.recommendationsHeading)} diff --git a/src/widgets/ProductRecommendations/components/__snapshots__/LoadedView.test.jsx.snap b/src/widgets/ProductRecommendations/components/__snapshots__/LoadedView.test.jsx.snap index e1acc21..072bed9 100644 --- a/src/widgets/ProductRecommendations/components/__snapshots__/LoadedView.test.jsx.snap +++ b/src/widgets/ProductRecommendations/components/__snapshots__/LoadedView.test.jsx.snap @@ -5,7 +5,7 @@ exports[`ProductRecommendations LoadedView matches snapshot 1`] = ` className="bg-light-200" >

diff --git a/src/widgets/ProductRecommendations/hooks.js b/src/widgets/ProductRecommendations/hooks.js index d9bf203..1477f80 100644 --- a/src/widgets/ProductRecommendations/hooks.js +++ b/src/widgets/ProductRecommendations/hooks.js @@ -48,9 +48,7 @@ export const useFetchProductRecommendations = (setRequestState, setData) => { }; export const useProductRecommendationsData = () => { - const [requestState, setRequestState] = module.state.requestState( - RequestStates.pending - ); + const [requestState, setRequestState] = module.state.requestState(RequestStates.pending); const [data, setData] = module.state.data({}); module.useFetchProductRecommendations(setRequestState, setData); diff --git a/src/widgets/ProductRecommendations/hooks.test.js b/src/widgets/ProductRecommendations/hooks.test.js index 639a08b..b2f6659 100644 --- a/src/widgets/ProductRecommendations/hooks.test.js +++ b/src/widgets/ProductRecommendations/hooks.test.js @@ -80,7 +80,7 @@ describe('ProductRecommendations hooks', () => { expect(api.fetchProductRecommendations).toHaveBeenCalledWith(mostRecentCourseRunKey); }); describe('successful fetch on mounted component', () => { - it('sets request state to completed and loads api response', async () => { + it('sets request state to completed and loads response', async () => { let resolveFn; api.fetchProductRecommendations.mockReturnValueOnce(new Promise(resolve => { resolveFn = resolve; @@ -95,7 +95,7 @@ describe('ProductRecommendations hooks', () => { }); }); describe('successful fetch on unmounted component', () => { - it('it does not set the state', async () => { + it('does not set the state', async () => { let resolveFn; api.fetchProductRecommendations.mockReturnValueOnce(new Promise(resolve => { resolveFn = resolve; @@ -127,7 +127,7 @@ describe('ProductRecommendations hooks', () => { state.expectInitializedWith(state.keys.requestState, RequestStates.pending); }); describe('return values', () => { - describe('request is completed, with returned response object', () => { + describe('when the request is completed, with returned response object', () => { const mockResponse = { crossProductCourses: {}, amplitudeCourses: {} }; beforeEach(() => { state.mockVal(state.keys.requestState, RequestStates.completed); @@ -147,7 +147,7 @@ describe('ProductRecommendations hooks', () => { expect(output.productRecommendations).toEqual(mockResponse); }); }); - describe('request is pending', () => { + describe('when the request is pending', () => { beforeEach(() => { state.mockVal(state.keys.requestState, RequestStates.pending); state.mockVal(state.keys.data, {}); @@ -166,7 +166,7 @@ describe('ProductRecommendations hooks', () => { expect(output.productRecommendations).toEqual({}); }); }); - describe('request has failed', () => { + describe('when the request has failed', () => { beforeEach(() => { state.mockVal(state.keys.requestState, RequestStates.failed); state.mockVal(state.keys.data, {}); diff --git a/src/widgets/ProductRecommendations/index.scss b/src/widgets/ProductRecommendations/index.scss index 5094d46..91bb43a 100644 --- a/src/widgets/ProductRecommendations/index.scss +++ b/src/widgets/ProductRecommendations/index.scss @@ -3,10 +3,6 @@ $horizontal-card-gap: 20px; $vertical-card-gap: 24px; -// .recommendations-container { -// border: solid; -// } - .base-card { height: 332px; width: 270px !important;