diff --git a/package.json b/package.json index c31055a..2d1e44b 100755 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "test": "TZ=GMT fedx-scripts jest --coverage --passWithNoTests", "quality": "npm run lint-fix && npm run test", "watch-tests": "jest --watch", + "snapshot": "fedx-scripts jest --updateSnapshot", "prepare": "husky install" }, "author": "edX", diff --git a/src/containers/EnterpriseDashboardModal/__snapshots__/index.test.jsx.snap b/src/containers/EnterpriseDashboardModal/__snapshots__/index.test.jsx.snap index 53e48cf..c40b09a 100644 --- a/src/containers/EnterpriseDashboardModal/__snapshots__/index.test.jsx.snap +++ b/src/containers/EnterpriseDashboardModal/__snapshots__/index.test.jsx.snap @@ -34,7 +34,7 @@ exports[`EnterpriseDashboard snapshot 1`] = ` onClick={[MockFunction useEnterpriseDashboardHook.handleCTAClick]} type="a" > - Go To Dashboard + Go to dashboard diff --git a/src/data/redux/app/selectors/appSelectors.test.js b/src/data/redux/app/selectors/appSelectors.test.js index ef56208..ee4f3c7 100644 --- a/src/data/redux/app/selectors/appSelectors.test.js +++ b/src/data/redux/app/selectors/appSelectors.test.js @@ -18,10 +18,11 @@ describe('basic app selectors', () => { }); }); describe('hasAvailableDashboards', () => { - it('returns true iff the enterpriseDashboard field is populated', () => { + it('returns true iff the enterpriseDashboard field is populated and learner portal is enabled', () => { const { preSelectors, cb } = appSelectors.hasAvailableDashboards; expect(preSelectors).toEqual([simpleSelectors.enterpriseDashboard]); - expect(cb({ data: 'test' })).toEqual(true); + expect(cb({ isLearnerPortalEnabled: true })).toEqual(true); + expect(cb({ isLearnerPortalEnabled: false })).toEqual(false); expect(cb(null)).toEqual(false); }); });