chore: update test and snapshot

This commit is contained in:
Hamzah Ullah
2023-04-28 10:38:08 -04:00
parent 0ed2b10b13
commit 4a2eee2a1d
3 changed files with 5 additions and 3 deletions

View File

@@ -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",

View File

@@ -34,7 +34,7 @@ exports[`EnterpriseDashboard snapshot 1`] = `
onClick={[MockFunction useEnterpriseDashboardHook.handleCTAClick]}
type="a"
>
Go To Dashboard
Go to dashboard
</Button>
</ActionRow>
</div>

View File

@@ -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);
});
});