diff --git a/docs/decisions/0008-application_state_differenciation.rst b/docs/decisions/0008-application_state_differenciation.rst index 2750927ef2..1b3a210f3e 100644 --- a/docs/decisions/0008-application_state_differenciation.rst +++ b/docs/decisions/0008-application_state_differenciation.rst @@ -62,9 +62,7 @@ Note that the ``queryClient`` is a test utility function that populates the ``Qu const initialStore = { portalConfiguration: { enterpriseId: 'test-id', - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, + enterpriseFeatures: {}, enablePortalLearnerCreditManagementScreen: true, }, }; diff --git a/src/components/Admin/Admin.test.jsx b/src/components/Admin/Admin.test.jsx index 0cd7685cf4..50f764f70e 100644 --- a/src/components/Admin/Admin.test.jsx +++ b/src/components/Admin/Admin.test.jsx @@ -35,9 +35,6 @@ const mockStore = configureMockStore([thunk]); const store = mockStore({ portalConfiguration: { enterpriseId: 'test-enterprise-id', - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, }, table: {}, csv: {}, diff --git a/src/components/AdvanceAnalyticsV2/tests/AnalyticsV2Page.test.jsx b/src/components/AdvanceAnalyticsV2/tests/AnalyticsV2Page.test.jsx index 1f2ad47aec..343bd0596f 100644 --- a/src/components/AdvanceAnalyticsV2/tests/AnalyticsV2Page.test.jsx +++ b/src/components/AdvanceAnalyticsV2/tests/AnalyticsV2Page.test.jsx @@ -15,9 +15,7 @@ const mockStore = configureMockStore([thunk]); const store = mockStore({ portalConfiguration: { enterpriseId: 'test-enterprise-id', - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, + enterpriseFeatures: {}, }, table: {}, csv: {}, diff --git a/src/components/BudgetExpiryAlertAndModal/data/index.test.jsx b/src/components/BudgetExpiryAlertAndModal/data/index.test.jsx index dfc16e24c4..6a404d5b8e 100644 --- a/src/components/BudgetExpiryAlertAndModal/data/index.test.jsx +++ b/src/components/BudgetExpiryAlertAndModal/data/index.test.jsx @@ -31,9 +31,6 @@ const initialStoreState = { enterpriseId: enterpriseUUID, enterpriseSlug, disableExpiryMessagingForLearnerCredit: false, - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, }, }; const mockEnterpriseBudgetUuid = uuidv4(); diff --git a/src/components/BudgetExpiryAlertAndModal/index.jsx b/src/components/BudgetExpiryAlertAndModal/index.jsx index f3e30bf002..9566105c60 100644 --- a/src/components/BudgetExpiryAlertAndModal/index.jsx +++ b/src/components/BudgetExpiryAlertAndModal/index.jsx @@ -17,7 +17,7 @@ import EVENT_NAMES from '../../eventTracking'; import useExpiry from './data/hooks/useExpiry'; -const BudgetExpiryAlertAndModal = ({ enterpriseUUID, enterpriseFeatures, disableExpiryMessagingForLearnerCredit }) => { +const BudgetExpiryAlertAndModal = ({ enterpriseUUID, disableExpiryMessagingForLearnerCredit }) => { const [modalIsOpen, modalOpen, modalClose] = useToggle(false); const [alertIsOpen, alertOpen, alertClose] = useToggle(false); const location = useLocation(); @@ -30,7 +30,6 @@ const BudgetExpiryAlertAndModal = ({ enterpriseUUID, enterpriseFeatures, disable const supportUrl = configuration.ENTERPRISE_SUPPORT_URL; const { data: budgets } = useEnterpriseBudgets({ - isTopDownAssignmentEnabled: enterpriseFeatures.topDownAssignmentRealTimeLcm, enterpriseId: enterpriseUUID, enablePortalLearnerCreditManagementScreen: true, queryOptions: { @@ -148,15 +147,11 @@ const BudgetExpiryAlertAndModal = ({ enterpriseUUID, enterpriseFeatures, disable const mapStateToProps = state => ({ enterpriseUUID: state.portalConfiguration.enterpriseId, - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, disableExpiryMessagingForLearnerCredit: state.portalConfiguration.disableExpiryMessagingForLearnerCredit, }); BudgetExpiryAlertAndModal.propTypes = { enterpriseUUID: PropTypes.string.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool.isRequired, - }), disableExpiryMessagingForLearnerCredit: PropTypes.bool.isRequired, }; diff --git a/src/components/EnterpriseApp/EnterpriseAppContextProvider.jsx b/src/components/EnterpriseApp/EnterpriseAppContextProvider.jsx index 39cbb05f05..09e8830925 100644 --- a/src/components/EnterpriseApp/EnterpriseAppContextProvider.jsx +++ b/src/components/EnterpriseApp/EnterpriseAppContextProvider.jsx @@ -56,7 +56,6 @@ const EnterpriseAppContextProvider = ({ const enterpriseSubsidiesContext = useEnterpriseSubsidiesContext({ enterpriseId, enablePortalLearnerCreditManagementScreen, - isTopDownAssignmentEnabled: enterpriseFeatures.topDownAssignmentRealTimeLcm, }); // subsidy requests for the enterprise customer @@ -108,9 +107,7 @@ const EnterpriseAppContextProvider = ({ EnterpriseAppContextProvider.propTypes = { enterpriseId: PropTypes.string.isRequired, enterpriseName: PropTypes.string.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, + enterpriseFeatures: PropTypes.object.isRequired, enablePortalLearnerCreditManagementScreen: PropTypes.bool.isRequired, children: PropTypes.node.isRequired, }; diff --git a/src/components/EnterpriseApp/EnterpriseAppContextProvider.test.jsx b/src/components/EnterpriseApp/EnterpriseAppContextProvider.test.jsx index d868fc11df..3d778cb375 100644 --- a/src/components/EnterpriseApp/EnterpriseAppContextProvider.test.jsx +++ b/src/components/EnterpriseApp/EnterpriseAppContextProvider.test.jsx @@ -14,10 +14,6 @@ const TEST_ENTERPRISE_NAME = 'test-enterprise-name'; jest.mock('./data/hooks'); -const mockEnterpriseFeatures = { - topDownAssignmentRealTimeLcm: true, -}; - describe('', () => { it.each([{ isLoadingEnterpriseSubsidies: true, @@ -84,7 +80,6 @@ describe('', () => { children diff --git a/src/components/EnterpriseApp/index.jsx b/src/components/EnterpriseApp/index.jsx index 5de30bdb61..364c978d9c 100644 --- a/src/components/EnterpriseApp/index.jsx +++ b/src/components/EnterpriseApp/index.jsx @@ -195,7 +195,6 @@ EnterpriseApp.propTypes = { enterpriseId: PropTypes.string, enterpriseName: PropTypes.string, enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, enterpriseGroupsV2: PropTypes.bool, }), enterpriseBranding: PropTypes.shape({ diff --git a/src/components/PeopleManagement/tests/CreateGroupModal.test.jsx b/src/components/PeopleManagement/tests/CreateGroupModal.test.jsx index ca0d39fe01..3ddfb15cf4 100644 --- a/src/components/PeopleManagement/tests/CreateGroupModal.test.jsx +++ b/src/components/PeopleManagement/tests/CreateGroupModal.test.jsx @@ -44,7 +44,6 @@ const initialStoreState = { enterpriseSlug, enableLearnerPortal: true, enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, enterpriseGroupsV1: true, enterpriseGroupsV2: true, }, diff --git a/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx b/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx index 50585eee1b..c937d84fbe 100644 --- a/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx +++ b/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx @@ -12,7 +12,6 @@ import NoAssignableBudgetActivity from './empty-state/NoAssignableBudgetActivity import NoBnEBudgetActivity from './empty-state/NoBnEBudgetActivity'; const BudgetDetailActivityTabContents = ({ enterpriseUUID, enterpriseFeatures, appliesToAllContexts }) => { - const isTopDownAssignmentEnabled = enterpriseFeatures.topDownAssignmentRealTimeLcm; const { enterpriseOfferId, subsidyAccessPolicyId } = useBudgetId(); const { data: subsidyAccessPolicy } = useSubsidyAccessPolicy(subsidyAccessPolicyId); const isEnterpriseGroupsEnabled = enterpriseFeatures.enterpriseGroupsV1 @@ -23,8 +22,7 @@ const BudgetDetailActivityTabContents = ({ enterpriseUUID, enterpriseFeatures, a isFetching: isBudgetActivityOverviewFetching, data: budgetActivityOverview, } = useBudgetDetailActivityOverview({ - enterpriseUUID, - isTopDownAssignmentEnabled, + enterpriseUUID }); // If the budget activity overview data is loading (either the initial request OR any @@ -44,7 +42,7 @@ const BudgetDetailActivityTabContents = ({ enterpriseUUID, enterpriseFeatures, a // If enterprise groups is turned on, it's learner credit NOT enterprise offers w/ no spend const renderBnEActivity = isEnterpriseGroupsEnabled && (enterpriseOfferId == null) && !hasSpentTransactions; - if (!isTopDownAssignmentEnabled || !subsidyAccessPolicy?.isAssignable) { + if (!subsidyAccessPolicy?.isAssignable) { if (isEnterpriseGroupsEnabled) { if (appliesToAllContexts) { return ( @@ -98,7 +96,6 @@ const mapStateToProps = state => ({ BudgetDetailActivityTabContents.propTypes = { enterpriseUUID: PropTypes.string.isRequired, enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, enterpriseGroupsV1: PropTypes.bool, }).isRequired, appliesToAllContexts: PropTypes.bool.isRequired, diff --git a/src/components/learner-credit-management/BudgetDetailAssignments.jsx b/src/components/learner-credit-management/BudgetDetailAssignments.jsx index 0480924df1..67df242f7b 100644 --- a/src/components/learner-credit-management/BudgetDetailAssignments.jsx +++ b/src/components/learner-credit-management/BudgetDetailAssignments.jsx @@ -105,7 +105,6 @@ BudgetDetailAssignmentsHeader.propTypes = { const BudgetDetailAssignments = ({ hasContentAssignments, hasSpentTransactions, - enterpriseFeatures, enterpriseId, }) => { const intl = useIntl(); @@ -113,7 +112,6 @@ const BudgetDetailAssignments = ({ const { data: subsidyAccessPolicy } = useSubsidyAccessPolicy(subsidyAccessPolicyId); const isAssignableBudget = !!subsidyAccessPolicy?.isAssignable; const assignmentConfigurationUUID = subsidyAccessPolicy?.assignmentConfiguration?.uuid; - const isTopDownAssignmentEnabled = enterpriseFeatures.topDownAssignmentRealTimeLcm; const { isLoading, contentAssignments, @@ -130,7 +128,7 @@ const BudgetDetailAssignments = ({ isBudgetRetired: subsidyAccessPolicy.retired, }); - if (!isTopDownAssignmentEnabled || !isAssignableBudget) { + if (!isAssignableBudget) { return null; } @@ -155,16 +153,12 @@ const BudgetDetailAssignments = ({ const mapStateToProps = state => ({ enterpriseId: state.portalConfiguration.enterpriseId, - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, }); BudgetDetailAssignments.propTypes = { enterpriseId: PropTypes.string.isRequired, hasContentAssignments: PropTypes.bool.isRequired, hasSpentTransactions: PropTypes.bool.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, }; export default connect(mapStateToProps)(BudgetDetailAssignments); diff --git a/src/components/learner-credit-management/BudgetDetailPageOverviewAvailability.jsx b/src/components/learner-credit-management/BudgetDetailPageOverviewAvailability.jsx index 87e20e46a0..6851d5a585 100644 --- a/src/components/learner-credit-management/BudgetDetailPageOverviewAvailability.jsx +++ b/src/components/learner-credit-management/BudgetDetailPageOverviewAvailability.jsx @@ -430,11 +430,10 @@ const BudgetDetailPageOverviewAvailability = ({ @@ -450,7 +449,6 @@ BudgetDetailPageOverviewAvailability.propTypes = { }).isRequired, isAssignable: PropTypes.bool.isRequired, enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, enterpriseGroupsV1: PropTypes.bool, }).isRequired, enterpriseId: PropTypes.string.isRequired, diff --git a/src/components/learner-credit-management/BudgetDetailPageOverviewUtilization.jsx b/src/components/learner-credit-management/BudgetDetailPageOverviewUtilization.jsx index a1c5f511f7..0395e2c478 100644 --- a/src/components/learner-credit-management/BudgetDetailPageOverviewUtilization.jsx +++ b/src/components/learner-credit-management/BudgetDetailPageOverviewUtilization.jsx @@ -17,7 +17,6 @@ const BudgetDetailPageOverviewUtilization = ({ budgetTotalSummary: { utilized }, budgetAggregates, isAssignable, - enterpriseFeatures, enterpriseId, isRetired, }) => { @@ -33,7 +32,6 @@ const BudgetDetailPageOverviewUtilization = ({ if ( !budgetId || isRetired - || !enterpriseFeatures.topDownAssignmentRealTimeLcm || utilized <= 0 || !isAssignable ) { @@ -186,15 +184,11 @@ BudgetDetailPageOverviewUtilization.propTypes = { budgetTotalSummary: PropTypes.shape(budgetTotalSummaryShape).isRequired, budgetAggregates: PropTypes.shape(budgetAggregatesShape).isRequired, isAssignable: PropTypes.bool.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, enterpriseId: PropTypes.string.isRequired, isRetired: PropTypes.bool.isRequired, }; const mapStateToProps = state => ({ - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, enterpriseId: state.portalConfiguration.enterpriseId, }); diff --git a/src/components/learner-credit-management/BudgetDetailRedemptions.jsx b/src/components/learner-credit-management/BudgetDetailRedemptions.jsx index 5bfbc27281..9ed0485e63 100644 --- a/src/components/learner-credit-management/BudgetDetailRedemptions.jsx +++ b/src/components/learner-credit-management/BudgetDetailRedemptions.jsx @@ -13,7 +13,6 @@ import { BUDGET_STATUSES } from '../EnterpriseApp/data/constants'; const BudgetDetailRedemptionsDescription = ({ status, - enterpriseFeatures, }) => { const { enterpriseOfferId, subsidyAccessPolicyId } = useBudgetId(); @@ -36,7 +35,7 @@ const BudgetDetailRedemptionsDescription = ({ defaultMessage="Spent activity is driven by completed enrollments. " description="Description for the spent section of the budget detail page" /> - {(enterpriseOfferId || (subsidyAccessPolicyId && !enterpriseFeatures.topDownAssignmentRealTimeLcm)) ? ( + {(enterpriseOfferId || subsidyAccessPolicyId) ? ( { +const BudgetDetailRedemptions = ({ enterpriseUUID }) => { const intl = useIntl(); const navigate = useNavigate(); const location = useLocation(); @@ -83,7 +79,6 @@ const BudgetDetailRedemptions = ({ enterpriseFeatures, enterpriseUUID }) => { enterpriseUUID, enterpriseOfferId, subsidyAccessPolicyId, - enterpriseFeatures.topDownAssignmentRealTimeLcm, ); const { data: enterpriseOfferMetadata } = useEnterpriseOffer(enterpriseOfferId); @@ -114,7 +109,7 @@ const BudgetDetailRedemptions = ({ enterpriseFeatures, enterpriseUUID }) => { description="Heading for the spent section of the budget detail page" /> - + { }; const mapStateToProps = state => ({ - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, enterpriseUUID: state.portalConfiguration.enterpriseId, }); BudgetDetailRedemptions.propTypes = { enterpriseUUID: PropTypes.string.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, }; export default connect(mapStateToProps)(BudgetDetailRedemptions); diff --git a/src/components/learner-credit-management/BudgetDetailTabsAndRoutes.jsx b/src/components/learner-credit-management/BudgetDetailTabsAndRoutes.jsx index fcd53ecddc..3636f124b0 100644 --- a/src/components/learner-credit-management/BudgetDetailTabsAndRoutes.jsx +++ b/src/components/learner-credit-management/BudgetDetailTabsAndRoutes.jsx @@ -32,7 +32,7 @@ function isSupportedTabKey({ appliesToAllContexts, }) { const showCatalog = (subsidyAccessPolicy?.groupAssociations?.length > 0) - || (enterpriseFeatures.topDownAssignmentRealTimeLcm && !!subsidyAccessPolicy?.isAssignable); + || !!subsidyAccessPolicy?.isAssignable; const supportedTabs = [BUDGET_DETAIL_ACTIVITY_TAB]; if (showCatalog) { supportedTabs.push(BUDGET_DETAIL_CATALOG_TAB); diff --git a/src/components/learner-credit-management/BudgetOverviewContent.jsx b/src/components/learner-credit-management/BudgetOverviewContent.jsx index ca1fb90c10..6186b08a40 100644 --- a/src/components/learner-credit-management/BudgetOverviewContent.jsx +++ b/src/components/learner-credit-management/BudgetOverviewContent.jsx @@ -17,7 +17,6 @@ import BudgetStatusSubtitle from './BudgetStatusSubtitle'; const BudgetOverviewContent = ({ enterpriseUUID, - enterpriseFeatures, }) => { const intl = useIntl(); const { subsidyAccessPolicyId, enterpriseOfferId } = useBudgetId(); @@ -50,7 +49,6 @@ const BudgetOverviewContent = ({ subsidySummary, budgetId: policyOrOfferId, enterpriseOfferMetadata, - isTopDownAssignmentEnabled: enterpriseFeatures.topDownAssignmentRealTimeLcm, }); if (!subsidyAccessPolicy && (isLoadingSubsidySummary || isLoadingEnterpriseOffer)) { @@ -102,14 +100,10 @@ const BudgetOverviewContent = ({ const mapStateToProps = state => ({ enterpriseUUID: state.portalConfiguration.enterpriseId, - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, }); BudgetOverviewContent.propTypes = { enterpriseUUID: PropTypes.string.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, }; export default connect(mapStateToProps)(BudgetOverviewContent); diff --git a/src/components/learner-credit-management/MultipleBudgetsPage.jsx b/src/components/learner-credit-management/MultipleBudgetsPage.jsx index ad8236fe9a..2600c5bcd3 100644 --- a/src/components/learner-credit-management/MultipleBudgetsPage.jsx +++ b/src/components/learner-credit-management/MultipleBudgetsPage.jsx @@ -24,7 +24,6 @@ const MultipleBudgetsPage = ({ enterpriseUUID, enterpriseSlug, enableLearnerPortal, - enterpriseFeatures, enablePortalLearnerCreditManagementScreen, }) => { const intl = useIntl(); @@ -37,7 +36,6 @@ const MultipleBudgetsPage = ({ const { data: budgetsOverview } = useEnterpriseBudgets({ enterpriseId: enterpriseUUID, enablePortalLearnerCreditManagementScreen, - isTopDownAssignmentEnabled: enterpriseFeatures.topDownAssignmentRealTimeLcm, }); const { budgets = [], @@ -121,7 +119,6 @@ const mapStateToProps = state => ({ enterpriseUUID: state.portalConfiguration.enterpriseId, enterpriseSlug: state.portalConfiguration.enterpriseSlug, enableLearnerPortal: state.portalConfiguration.enableLearnerPortal, - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, enablePortalLearnerCreditManagementScreen: state.portalConfiguration.enablePortalLearnerCreditManagementScreen, }); @@ -129,9 +126,6 @@ MultipleBudgetsPage.propTypes = { enterpriseUUID: PropTypes.string.isRequired, enterpriseSlug: PropTypes.string.isRequired, enableLearnerPortal: PropTypes.bool.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, enablePortalLearnerCreditManagementScreen: PropTypes.bool.isRequired, }; diff --git a/src/components/learner-credit-management/data/hooks/useBudgetDetailTabs.jsx b/src/components/learner-credit-management/data/hooks/useBudgetDetailTabs.jsx index d994eb913d..892e195348 100644 --- a/src/components/learner-credit-management/data/hooks/useBudgetDetailTabs.jsx +++ b/src/components/learner-credit-management/data/hooks/useBudgetDetailTabs.jsx @@ -29,7 +29,7 @@ export const useBudgetDetailTabs = ({ }); const isCatalogTabDisabled = [BUDGET_STATUSES.retired, BUDGET_STATUSES.expired].includes(status); const showCatalog = (subsidyAccessPolicy?.groupAssociations?.length > 0 && !appliesToAllContexts) - || (enterpriseFeatures.topDownAssignmentRealTimeLcm && !!subsidyAccessPolicy?.isAssignable); + || !!subsidyAccessPolicy?.isAssignable; return useMemo(() => { const tabsArray = []; diff --git a/src/components/learner-credit-management/invite-modal/InviteModalBudgetCard.jsx b/src/components/learner-credit-management/invite-modal/InviteModalBudgetCard.jsx index b19c27c8f7..fa8dae7461 100644 --- a/src/components/learner-credit-management/invite-modal/InviteModalBudgetCard.jsx +++ b/src/components/learner-credit-management/invite-modal/InviteModalBudgetCard.jsx @@ -20,7 +20,6 @@ import BudgetStatusSubtitle from '../BudgetStatusSubtitle'; const InviteModalBudgetCard = ({ enterpriseUUID, - enterpriseFeatures, }) => { const intl = useIntl(); const { subsidyAccessPolicyId, enterpriseOfferId } = useBudgetId(); @@ -53,7 +52,6 @@ const InviteModalBudgetCard = ({ subsidySummary, budgetId: policyOrOfferId, enterpriseOfferMetadata, - isTopDownAssignmentEnabled: enterpriseFeatures.topDownAssignmentRealTimeLcm, }); if (!subsidyAccessPolicy && (isLoadingSubsidySummary || isLoadingEnterpriseOffer)) { @@ -94,14 +92,10 @@ const InviteModalBudgetCard = ({ const mapStateToProps = state => ({ enterpriseUUID: state.portalConfiguration.enterpriseId, - enterpriseFeatures: state.portalConfiguration.enterpriseFeatures, }); InviteModalBudgetCard.propTypes = { enterpriseUUID: PropTypes.string.isRequired, - enterpriseFeatures: PropTypes.shape({ - topDownAssignmentRealTimeLcm: PropTypes.bool, - }).isRequired, }; export default connect(mapStateToProps)(InviteModalBudgetCard); diff --git a/src/components/learner-credit-management/invite-modal/tests/InviteMemberModal.test.jsx b/src/components/learner-credit-management/invite-modal/tests/InviteMemberModal.test.jsx index a8fa2b3a09..d9471acfb7 100644 --- a/src/components/learner-credit-management/invite-modal/tests/InviteMemberModal.test.jsx +++ b/src/components/learner-credit-management/invite-modal/tests/InviteMemberModal.test.jsx @@ -47,7 +47,6 @@ const initialStoreState = { enterpriseSlug, enableLearnerPortal: true, enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, enterpriseGroupsV1: true, enterpriseGroupsV2: true, }, diff --git a/src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx b/src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx index d7ce81e193..0b78ee83da 100644 --- a/src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx +++ b/src/components/learner-credit-management/members-tab/tests/MembersTab.test.jsx @@ -72,7 +72,6 @@ const initialStoreState = { enterpriseSlug, enableLearnerPortal: true, enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, enterpriseGroupsV1: true, }, }, diff --git a/src/components/learner-credit-management/tests/BudgetCard.test.jsx b/src/components/learner-credit-management/tests/BudgetCard.test.jsx index 793cc72aea..1b201feb14 100644 --- a/src/components/learner-credit-management/tests/BudgetCard.test.jsx +++ b/src/components/learner-credit-management/tests/BudgetCard.test.jsx @@ -52,9 +52,6 @@ const initialStore = { portalConfiguration: { enterpriseId: enterpriseUUID, enterpriseSlug, - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, enablePortalLearnerCreditManagementScreen: true, }, }; diff --git a/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx b/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx index be436e2d0c..3bdc3a83c8 100644 --- a/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx +++ b/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx @@ -87,7 +87,6 @@ const initialStoreState = { enterpriseSlug, enableLearnerPortal: true, enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, enterpriseGroupsV1: true, }, }, @@ -766,7 +765,6 @@ describe('', () => { ...initialStoreState.portalConfiguration, enterpriseFeatures: { ...initialStoreState.portalConfiguration.enterpriseFeatures, - topDownAssignmentRealTimeLcm: false, }, }, }; @@ -782,35 +780,30 @@ describe('', () => { subsidyAccessPolicy: null, enterpriseOfferMetadata: mockEnterpriseOfferMetadata, budgetId: mockEnterpriseOfferId, - isTopDownAssignmentEnabled: true, - expectedUseOfferRedemptionsArgs: [enterpriseUUID, mockEnterpriseOfferId, null, true], + expectedUseOfferRedemptionsArgs: [enterpriseUUID, mockEnterpriseOfferId, null], }, { subsidyAccessPolicy: null, enterpriseOfferMetadata: mockEnterpriseOfferMetadata, budgetId: mockEnterpriseOfferId, - isTopDownAssignmentEnabled: false, - expectedUseOfferRedemptionsArgs: [enterpriseUUID, mockEnterpriseOfferId, null, false], + expectedUseOfferRedemptionsArgs: [enterpriseUUID, mockEnterpriseOfferId, null], }, { subsidyAccessPolicy: mockPerLearnerSpendLimitSubsidyAccessPolicy, enterpriseOfferMetadata: null, budgetId: mockSubsidyAccessPolicyUUID, - isTopDownAssignmentEnabled: true, - expectedUseOfferRedemptionsArgs: [enterpriseUUID, null, mockSubsidyAccessPolicyUUID, true], + expectedUseOfferRedemptionsArgs: [enterpriseUUID, null, mockSubsidyAccessPolicyUUID], }, { subsidyAccessPolicy: mockAssignableSubsidyAccessPolicy, enterpriseOfferMetadata: null, budgetId: mockSubsidyAccessPolicyUUID, - isTopDownAssignmentEnabled: false, - expectedUseOfferRedemptionsArgs: [enterpriseUUID, null, mockSubsidyAccessPolicyUUID, false], + expectedUseOfferRedemptionsArgs: [enterpriseUUID, null, mockSubsidyAccessPolicyUUID], }, ])('displays spend table in "Activity" tab with empty results (%s) when enterpriseGroupsV1 feature is false', async ({ subsidyAccessPolicy, enterpriseOfferMetadata, budgetId, - isTopDownAssignmentEnabled, expectedUseOfferRedemptionsArgs, }) => { useParams.mockReturnValue({ @@ -868,7 +861,6 @@ describe('', () => { ...initialStoreState.portalConfiguration, enterpriseFeatures: { ...initialStoreState.portalConfiguration.enterpriseFeatures, - topDownAssignmentRealTimeLcm: isTopDownAssignmentEnabled, enterpriseGroupsV1: false, }, disableExpiryMessagingForLearnerCredit: false, @@ -888,9 +880,7 @@ describe('', () => { const spentSection = within(screen.getByTestId('spent-section')); expect(spentSection.getByText('No results found')).toBeInTheDocument(); expect(spentSection.getByText('Spent activity is driven by completed enrollments.', { exact: false })).toBeInTheDocument(); - const isSubsidyAccessPolicyWithAnalyticsApi = ( - budgetId === mockSubsidyAccessPolicyUUID && !isTopDownAssignmentEnabled - ); + const isSubsidyAccessPolicyWithAnalyticsApi = (budgetId === mockSubsidyAccessPolicyUUID); if (budgetId === mockEnterpriseOfferId || isSubsidyAccessPolicyWithAnalyticsApi) { // This copy is only present when the "Spent" table is backed by the // analytics API (i.e., budget is an enterprise offer or a subsidy access @@ -1781,60 +1771,6 @@ describe('', () => { expect(screen.queryByText('No budget activity yet? Assign a course!')).not.toBeInTheDocument(); }); - it('hides catalog tab when enterpriseFeatures.topDownAssignmentRealTimeLcm is disabled', () => { - const initialState = { - portalConfiguration: { - ...initialStoreState.portalConfiguration, - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: false, - }, - }, - }; - useParams.mockReturnValue({ - enterpriseSlug: 'test-enterprise-slug', - enterpriseAppPage: 'test-enterprise-page', - budgetId: mockSubsidyAccessPolicyUUID, - activeTabKey: 'activity', - }); - useSubsidyAccessPolicy.mockReturnValue({ - isInitialLoading: false, - data: mockAssignableSubsidyAccessPolicy, - }); - useEnterpriseGroupLearners.mockReturnValue({ - data: { - count: 0, - currentPage: 1, - next: null, - numPages: 1, - results: [], - }, - }); - useBudgetDetailActivityOverview.mockReturnValue({ - isLoading: false, - data: { - contentAssignments: undefined, - spentTransactions: { count: 0 }, - }, - }); - useBudgetRedemptions.mockReturnValue({ - isLoading: false, - budgetRedemptions: mockEmptyBudgetRedemptions, - fetchBudgetRedemptions: jest.fn(), - }); - useEnterpriseGroup.mockReturnValue({ - data: { - appliesToAllContexts: true, - }, - }); - renderWithRouter(); - - // Catalog tab does NOT exist - expect(screen.queryByText('Catalog')).toBeFalsy(); - - // Ensure no assignments-related empty states are rendered - expect(screen.queryByText('No budget activity yet? Assign a course!')).not.toBeInTheDocument(); - }); - it('defaults to activity tab is no activeTabKey is provided', () => { useParams.mockReturnValue({ enterpriseSlug: 'test-enterprise-slug', @@ -2472,7 +2408,6 @@ describe('', () => { />, ); expect(screen.getByText('• Enroll via Integrated Learning Platform')).toBeInTheDocument(); - expect(screen.getByText('Manage edX in your integrated learning platform')).toBeInTheDocument(); }); it.each([ { diff --git a/src/components/learner-credit-management/tests/BudgetDetailPageWrapper.test.jsx b/src/components/learner-credit-management/tests/BudgetDetailPageWrapper.test.jsx index 1ea9cb0c02..e3b060e284 100644 --- a/src/components/learner-credit-management/tests/BudgetDetailPageWrapper.test.jsx +++ b/src/components/learner-credit-management/tests/BudgetDetailPageWrapper.test.jsx @@ -23,9 +23,7 @@ const defaultStoreState = { enterpriseId: enterpriseUUID, enterpriseSlug, enableLearnerPortal: true, - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, + enterpriseFeatures: {} }, }; diff --git a/src/components/learner-credit-management/tests/MultipleBudgetsPage.test.jsx b/src/components/learner-credit-management/tests/MultipleBudgetsPage.test.jsx index 9996624d55..9e592eb67c 100644 --- a/src/components/learner-credit-management/tests/MultipleBudgetsPage.test.jsx +++ b/src/components/learner-credit-management/tests/MultipleBudgetsPage.test.jsx @@ -28,9 +28,7 @@ const initialStore = { enterpriseId, enterpriseSlug, enableLearnerPortal: true, - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, + enterpriseFeatures: {}, enablePortalLearnerCreditManagementScreen: true, }, }; diff --git a/src/containers/AdminPage/AdminPage.test.jsx b/src/containers/AdminPage/AdminPage.test.jsx index c1ec1c9c7d..3817bf4526 100644 --- a/src/containers/AdminPage/AdminPage.test.jsx +++ b/src/containers/AdminPage/AdminPage.test.jsx @@ -19,9 +19,7 @@ const mockStore = configureMockStore([thunk]); const store = mockStore({ portalConfiguration: { enterpriseId: 'test-enterprise', - enterpriseFeatures: { - topDownAssignmentRealTimeLcm: true, - }, + enterpriseFeatures: {}, }, dashboardAnalytics: { active_learners: {