Merge branch 'master' into sameeramin/ENT-10591

This commit is contained in:
Muhammad Sameer Amin
2025-06-25 20:15:32 +05:00
committed by GitHub
10 changed files with 80 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
"""
Tests for toggles, where there is logic beyond enable/disable.
"""
import ddt
from django.test import override_settings, TestCase
from lms.djangoapps.branding.toggles import use_catalog_mfe
@ddt.ddt
class TestBrandingToggles(TestCase):
"""
Tests for toggles, where there is logic beyond enable/disable.
"""
@ddt.data(True, False)
def test_use_catalog_mfe(self, enabled):
"""
Test the use_catalog_mfe toggle.
"""
with override_settings(FEATURES={'ENABLE_CATALOG_MICROFRONTEND': enabled}):
assert use_catalog_mfe() == enabled

View File

@@ -0,0 +1,15 @@
"""
Configuration for features of Branding
"""
from django.conf import settings
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
def use_catalog_mfe():
"""
Determine if Catalog MFE is enabled, replacing student_dashboard
"""
return configuration_helpers.get_value(
'ENABLE_CATALOG_MICROFRONTEND', settings.FEATURES['ENABLE_CATALOG_MICROFRONTEND']
)

View File

@@ -881,6 +881,15 @@ FEATURES = {
# toggle does not have a target removal date.
'ENABLE_AUTHN_MICROFRONTEND': os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False),
# .. toggle_name: FEATURES['ENABLE_CATALOG_MICROFRONTEND']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the catalog.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2025-05-15
# .. toggle_target_removal_date: 2025-11-01
'ENABLE_CATALOG_MICROFRONTEND': False,
### ORA Feature Flags ###
# .. toggle_name: FEATURES['ENABLE_ORA_ALL_FILE_URLS']
# .. toggle_implementation: DjangoSetting

View File

@@ -552,6 +552,7 @@ FEATURES:
ENABLE_API_DOCS: true
ENABLE_ASYNC_ANSWER_DISTRIBUTION: true
ENABLE_AUTHN_MICROFRONTEND: true
ENABLE_CATALOG_MICROFRONTEND: true
ENABLE_AUTO_GENERATED_USERNAME: true
ENABLE_BULK_USER_RETIREMENT: true
ENABLE_CERTIFICATES_IDV_REQUIREMENT: true