diff --git a/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx b/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx
index 9720c607a9..5c9071c4f6 100644
--- a/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx
+++ b/src/components/learner-credit-management/BudgetDetailActivityTabContents.jsx
@@ -11,6 +11,7 @@ import NoBnEBudgetActivity from './empty-state/NoBnEBudgetActivity';
const BudgetDetailActivityTabContents = ({ enterpriseUUID, enterpriseFeatures }) => {
const isTopDownAssignmentEnabled = enterpriseFeatures.topDownAssignmentRealTimeLcm;
+ const isEnterpriseGroupsEnabled = enterpriseFeatures.enterpriseGroupsV1;
const { subsidyAccessPolicyId } = useBudgetId();
const { data: subsidyAccessPolicy } = useSubsidyAccessPolicy(subsidyAccessPolicyId);
const {
@@ -39,7 +40,8 @@ const BudgetDetailActivityTabContents = ({ enterpriseUUID, enterpriseFeatures })
if (!isTopDownAssignmentEnabled || !subsidyAccessPolicy?.isAssignable) {
return (
<>
- {!hasSpentTransactions && ()}
+ {!hasSpentTransactions && isEnterpriseGroupsEnabled && (
+ )}
>
);
@@ -72,6 +74,7 @@ BudgetDetailActivityTabContents.propTypes = {
enterpriseUUID: PropTypes.string.isRequired,
enterpriseFeatures: PropTypes.shape({
topDownAssignmentRealTimeLcm: PropTypes.bool,
+ enterpriseGroupsV1: PropTypes.bool,
}).isRequired,
};
diff --git a/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx b/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx
index 07423a77d2..b9c9cbb101 100644
--- a/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx
+++ b/src/components/learner-credit-management/tests/BudgetDetailPage.test.jsx
@@ -77,6 +77,7 @@ const initialStoreState = {
enableLearnerPortal: true,
enterpriseFeatures: {
topDownAssignmentRealTimeLcm: true,
+ enterpriseGroupsV1: true,
},
},
};
@@ -442,6 +443,40 @@ describe('', () => {
}
});
+ it('renders bne zero state only when the groups feature flag enabled', async () => {
+ const initialState = {
+ portalConfiguration: {
+ ...initialStoreState.portalConfiguration,
+ enterpriseFeatures: {
+ enterpriseGroupsV1: false,
+ },
+ },
+ };
+ useParams.mockReturnValue({
+ enterpriseSlug: 'test-enterprise-slug',
+ enterpriseAppPage: 'test-enterprise-page',
+ budgetId: 'a52e6548-649f-4576-b73f-c5c2bee25e9c',
+ activeTabKey: 'activity',
+ });
+ useSubsidyAccessPolicy.mockReturnValue({
+ isInitialLoading: false,
+ data: mockPerLearnerSpendLimitSubsidyAccessPolicy,
+ });
+ useBudgetDetailActivityOverview.mockReturnValue({
+ isLoading: false,
+ data: mockEmptyStateBudgetDetailActivityOverview,
+ });
+ useBudgetRedemptions.mockReturnValue({
+ isLoading: false,
+ budgetRedemptions: mockEmptyBudgetRedemptions,
+ fetchBudgetRedemptions: jest.fn(),
+ });
+ renderWithRouter();
+
+ // Overview empty state (no content assignments, no spent transactions)
+ expect(screen.queryByText('No budget activity yet? Invite members to browse the catalog and enroll!')).not.toBeInTheDocument();
+ });
+
it.each([
{ isLargeViewport: true },
{ isLargeViewport: false },