diff --git a/src/open_inwoner/cms/utils/page_display.py b/src/open_inwoner/cms/utils/page_display.py index 7492df1353..fae32c7ad8 100644 --- a/src/open_inwoner/cms/utils/page_display.py +++ b/src/open_inwoner/cms/utils/page_display.py @@ -9,6 +9,7 @@ from open_inwoner.cms.cases.cms_apps import CasesApphook from open_inwoner.cms.collaborate.cms_apps import CollaborateApphook from open_inwoner.cms.inbox.cms_apps import InboxApphook +from open_inwoner.cms.products.cms_apps import ProductsApphook from open_inwoner.cms.profile.cms_apps import ProfileApphook cms_apps = { @@ -18,6 +19,7 @@ CollaborateApphook, CasesApphook, SSDApphook, + ProductsApphook, ProfileApphook, ] } @@ -66,6 +68,13 @@ def benefits_page_is_published() -> bool: return _is_published("ssd") +def products_page_is_published() -> bool: + """ + :returns: True if the product page published, False otherwise + """ + return _is_published("products") + + def profile_page_is_published() -> bool: """ :returns: True if the profile page published, False otherwise diff --git a/src/open_inwoner/conf/app/setup_configuration.py b/src/open_inwoner/conf/app/setup_configuration.py index 3785a90227..81c213c562 100644 --- a/src/open_inwoner/conf/app/setup_configuration.py +++ b/src/open_inwoner/conf/app/setup_configuration.py @@ -390,3 +390,73 @@ EHERKENNING_PRIVACY_POLICY = config("EHERKENNING_PRIVACY_POLICY", None) EHERKENNING_MAKELAAR_ID = config("EHERKENNING_MAKELAAR_ID", None) EHERKENNING_SERVICE_LANGUAGE = config("EHERKENNING_SERVICE_LANGUAGE", None) + +# +# CMS configuration variables +# + +# benefits (ssd) +CMS_CONFIG_SSD_ENABLE = config("CMS_CONFIG_ENABLE", None) +# common extension +CMS_SSD_REQUIRES_AUTH = config("CMS_SSD_REQUIRES_AUTH", None) +CMS_SSD_REQUIRES_AUTH_BSN_OR_KVK = config("CMS_SSD_REQUIRES_AUTH_BSN_OR_KVK", None) +CMS_SSD_MENU_INDICATOR = config("CMS_SSD_MENU_INDICATOR", None) +CMS_SSD_MENU_ICON = config("CMS_SSD_MENU_ICON", None) + +# cases +CMS_CONFIG_CASES_ENABLE = config("CMS_CONFIG_ENABLE", None) +# common extension +CMS_CASES_REQUIRES_AUTH = config("CMS_CASES_REQUIRES_AUTH", None) +CMS_CASES_REQUIRES_AUTH_BSN_OR_KVK = config("CMS_CASES_REQUIRES_AUTH_BSN_OR_KVK", None) +CMS_CASES_MENU_INDICATOR = config("CMS_CASES_MENU_INDICATOR", None) +CMS_CASES_MENU_ICON = config("CMS_CASES_MENU_ICON", None) + +# collaborations +CMS_CONFIG_COLLABORATE_ENABLE = config("CMS_CONFIG_COLLABORATE_ENABLE", None) +# common extension +CMS_COLLABORATE_REQUIRES_AUTH = config("CMS_COLLABORATE_REQUIRES_AUTH", None) +CMS_COLLABORATE_REQUIRES_AUTH_BSN_OR_KVK = config( + "CMS_COLLABORATE_REQUIRES_AUTH_BSN_OR_KVK", None +) +CMS_COLLABORATE_MENU_INDICATOR = config("CMS_COLLABORATE_MENU_INDICATOR", None) +CMS_COLLABORATE_MENU_ICON = config("CMS_COLLABORATE_MENU_ICON", None) + +# inbox +CMS_CONFIG_INBOX_ENABLE = config("CMS_CONFIG_INBOX_ENABLE", None) +# common extension +CMS_INBOX_REQUIRES_AUTH = config("CMS_INBOX_REQUIRES_AUTH", None) +CMS_INBOX_REQUIRES_AUTH_BSN_OR_KVK = config("CMS_INBOX_REQUIRES_AUTH_BSN_OR_KVK", None) +CMS_INBOX_MENU_INDICATOR = config("CMS_INBOX_MENU_INDICATOR", None) +CMS_INBOX_MENU_ICON = config("CMS_INBOX_MENU_ICON", None) + +# products +CMS_CONFIG_PRODUCTS_ENABLE = config("CMS_CONFIG_ENABLE", None) +# common extension +CMS_PRODUCTS_REQUIRES_AUTH = config("CMS_PRODUCTS_REQUIRES_AUTH", None) +CMS_PRODUCTS_REQUIRES_AUTH_BSN_OR_KVK = config( + "CMS_PRODUCTS_REQUIRES_AUTH_BSN_OR_KVK", None +) +CMS_PRODUCTS_MENU_INDICATOR = config("CMS_PRODUCTS_MENU_INDICATOR", None) +CMS_PRODUCTS_MENU_ICON = config("CMS_PRODUCTS_MENU_ICON", None) + +# profile app enable +CMS_CONFIG_PROFILE_ENABLE = config("CMS_CONFIG_ENABLE", None) +# procile config +CMS_PROFILE_MY_DATA = config("CMS_PROFILE_MY_DATA", None) +CMS_PROFILE_SELECTED_CATEGORIES = config("CMS_PROFILE_SELECTED_CATEGORIES", None) +CMS_PROFILE_MENTORS = config("CMS_PROFILE_MENTORS", None) +CMS_PROFILE_MY_CONTACTS = config("CMS_PROFILE_MY_CONTACTS", None) +CMS_PROFILE_SELFDIAGNOSE = config("CMS_PROFILE_SELFDIAGNOSE", None) +CMS_PROFILE_ACTIONS = config("CMS_PROFILE_ACTIONS", None) +CMS_PROFILE_NOTIFICATIONS = config("CMS_PROFILE_NOTIFICATIONS", None) +CMS_PROFILE_QUESTIONS = config("CMS_PROFILE_QUESTIONS", None) +CMS_PROFILE_SSD = config("CMS_PROFILE_SSD", None) +CMS_PROFILE_NEWSLETTERS = config("CMS_PROFILE_NEWSLETTERS", None) +CMS_PROFILE_APPOINTMENTS = config("CMS_PROFILE_APPOINTMENTS", None) +# profile common extension +CMS_PROFILE_REQUIRES_AUTH = config("CMS_PROFILE_REQUIRES_AUTH", None) +CMS_PROFILE_REQUIRES_AUTH_BSN_OR_KVK = config( + "CMS_PROFILE_REQUIRES_AUTH_BSN_OR_KVK", None +) +CMS_PROFILE_MENU_INDICATOR = config("CMS_PROFILE_MENU_INDICATOR", None) +CMS_PROFILE_MENU_ICON = config("CMS_PROFILE_MENU_ICON", None) diff --git a/src/open_inwoner/configurations/bootstrap/cms.py b/src/open_inwoner/configurations/bootstrap/cms.py new file mode 100644 index 0000000000..af5447b9cb --- /dev/null +++ b/src/open_inwoner/configurations/bootstrap/cms.py @@ -0,0 +1,172 @@ +from django.conf import settings + +from django_setup_configuration.configuration import BaseConfigurationStep + +from open_inwoner.cms.benefits.cms_apps import SSDApphook +from open_inwoner.cms.cases.cms_apps import CasesApphook +from open_inwoner.cms.collaborate.cms_apps import CollaborateApphook +from open_inwoner.cms.inbox.cms_apps import InboxApphook +from open_inwoner.cms.products.cms_apps import ProductsApphook +from open_inwoner.cms.profile.cms_apps import ProfileApphook +from open_inwoner.cms.tests import cms_tools + + +def create_apphook_page_args(config_mapping: dict) -> dict: + """ + Helper function to create mappings with arguments for :func:`create_apphook_page` + """ + + apphook_page_args = dict() + + # import pdbr;pdbr.set_trace() + for setting_name, config_field_name in config_mapping.items(): + setting = getattr(settings, setting_name, None) + if setting is not None: + apphook_page_args[config_field_name] = setting + + return apphook_page_args + + +class GenericCMSConfigurationStep(BaseConfigurationStep): + """ + Generic base class for configuring CMS apps + """ + + def is_configured(self): + """ + CMS apps have no required settings; we consider them "configured" + if the configuration option is enabled + """ + return ( + getattr(settings, f"CMS_CONFIG_{self.app_name.upper()}_ENABLE", None) + is not None + ) + + def configure(self): + """ + Create apphook page with common extenion settings + + The method is sufficient for generic CMS apps that don't require any + configuration beyond the commonextension. Override to provide additional + arguments to :func:`create_apphook_page`. + """ + extension_args = create_apphook_page_args(self.extension_settings) + + if ( + getattr(settings, f"CMS_CONFIG_{self.app_name.upper()}_ENABLE", None) + is not None + ): + cms_tools.create_apphook_page( + self.app_hook, + extension_args=extension_args, + ) + + def test_configuration(self): + ... + + +class CMSBenefitsConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS social benefits (SSD) app" + extension_settings = { + "CMS_SSD_REQUIRES_AUTH": "requires_auth", + "CMS_SSD_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_SSD_MENU_INDICATOR": "menu_indicator", + "CMS_SSD_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "ssd" + self.app_hook = SSDApphook + + +class CMSCasesConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS cases app" + extension_settings = { + "CMS_CASES_REQUIRES_AUTH": "requires_auth", + "CMS_CASES_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_CASES_MENU_INDICATOR": "menu_indicator", + "CMS_CASES_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "cases" + self.app_hook = CasesApphook + + +class CMSCollaborateConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS collaborate app" + extension_settings = { + "CMS_COLLABORATE_REQUIRES_AUTH": "requires_auth", + "CMS_COLLABORATE_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_COLLABORATE_MENU_INDICATOR": "menu_indicator", + "CMS_COLLABORATE_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "collaborate" + self.app_hook = CollaborateApphook + + +class CMSInboxConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS inbox app" + extension_settings = { + "CMS_INBOX_REQUIRES_AUTH": "requires_auth", + "CMS_INBOX_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_INBOX_MENU_INDICATOR": "menu_indicator", + "CMS_INBOX_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "inbox" + self.app_hook = InboxApphook + + +class CMSProductsConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS product app" + extension_settings = { + "CMS_PRODUCTS_REQUIRES_AUTH": "requires_auth", + "CMS_PRODUCTS_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_PRODUCTS_MENU_INDICATOR": "menu_indicator", + "CMS_PRODUCTS_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "products" + self.app_hook = ProductsApphook + + +class CMSProfileConfigurationStep(GenericCMSConfigurationStep): + verbose_name = "Configuration for CMS profile app" + config_settings = { + "CMS_PROFILE_MY_DATA": "my_data", + "CMS_PROFILE_SELECTED_CATEGORIES": "selected_categories", + "CMS_PROFILE_MENTORS": "mentors", + "CMS_PROFILE_MY_CONTACTS": "my_contacts", + "CMS_PROFILE_SELFDIAGNOSE": "selfdiagnose", + "CMS_PROFILE_ACTIONS": "actions", + "CMS_PROFILE_NOTIFICATIONS": "notifications", + "CMS_PROFILE_QUESTIONS": "questions", + "CMS_PROFILE_SSD": "ssd", + "CMS_PROFILE_NEWSLETTERS": "newsletters", + "CMS_PROFILE_APPOINTMENTS": "appointments", + } + extension_settings = { + "CMS_PROFILE_REQUIRES_AUTH": "requires_auth", + "CMS_PROFILE_REQUIRES_AUTH_BSN_OR_KVK": "requires_auth_bsn_or_kvk", + "CMS_PROFILE_MENU_INDICATOR": "menu_indicator", + "CMS_PROFILE_MENU_ICON": "menu_icon", + } + + def __init__(self): + self.app_name = "profile" + + def configure(self): + config_args = create_apphook_page_args(self.config_settings) + extension_args = create_apphook_page_args(self.extension_settings) + + if getattr(settings, "CMS_CONFIG_PROFILE_ENABLE", None) is not None: + cms_tools.create_apphook_page( + ProfileApphook, + config_args=config_args, + extension_args=extension_args, + ) diff --git a/src/open_inwoner/configurations/tests/bootstrap/test_setup_cms.py b/src/open_inwoner/configurations/tests/bootstrap/test_setup_cms.py new file mode 100644 index 0000000000..e83bd67e0c --- /dev/null +++ b/src/open_inwoner/configurations/tests/bootstrap/test_setup_cms.py @@ -0,0 +1,335 @@ +from django.test import TestCase, override_settings + +from cms.models import Page + +from open_inwoner.cms.profile.cms_apps import ProfileConfig +from open_inwoner.cms.utils.page_display import ( + benefits_page_is_published, + case_page_is_published, + collaborate_page_is_published, + inbox_page_is_published, + products_page_is_published, + profile_page_is_published, +) + +from ...bootstrap.cms import ( + CMSBenefitsConfigurationStep, + CMSCasesConfigurationStep, + CMSCollaborateConfigurationStep, + CMSInboxConfigurationStep, + CMSProductsConfigurationStep, + CMSProfileConfigurationStep, +) + + +class CMSSetupConfigurationTest(TestCase): + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_PROFILE_ENABLE=True, + ) + def test_cms_profile_configure_use_defaults(self): + configuration_step = CMSProfileConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(profile_page_is_published()) + + # check profile config + config = ProfileConfig.objects.get() + + self.assertTrue(config.my_data) + self.assertTrue(config.selected_categories) + self.assertTrue(config.mentors) + self.assertTrue(config.my_contacts) + self.assertTrue(config.selfdiagnose) + self.assertTrue(config.actions) + self.assertTrue(config.notifications) + self.assertTrue(config.questions) + self.assertFalse(config.ssd) + self.assertFalse(config.newsletters) + self.assertFalse(config.appointments) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_PROFILE_ENABLE=True, + # profile config + CMS_PROFILE_MY_DATA=False, + CMS_PROFILE_SELECTED_CATEGORIES=False, + CMS_PROFILE_MENTORS=False, + CMS_PROFILE_MY_CONTACTS=False, + CMS_PROFILE_SELFDIAGNOSE=False, + CMS_PROFILE_ACTIONS=False, + CMS_PROFILE_NOTIFICATIONS=False, + CMS_PROFILE_QUESTIONS=False, + CMS_PROFILE_SSD=True, + CMS_PROFILE_NEWSLETTERS=True, + CMS_PROFILE_APPOINTMENTS=True, + # common extension settings + CMS_PROFILE_REQUIRES_AUTH=True, + CMS_PROFILE_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_PROFILE_MENU_INDICATOR="arrow", + CMS_PROFILE_MENU_ICON="smiley", + ) + def test_cms_profile_configure_override_settings(self): + configuration_step = CMSProfileConfigurationStep() + + configuration_step.configure() + + self.assertTrue(profile_page_is_published()) + + # check profile config + config = ProfileConfig.objects.get() + + self.assertFalse(config.my_data) + self.assertFalse(config.selected_categories) + self.assertFalse(config.mentors) + self.assertFalse(config.my_contacts) + self.assertFalse(config.selfdiagnose) + self.assertFalse(config.actions) + self.assertFalse(config.notifications) + self.assertFalse(config.questions) + self.assertTrue(config.ssd) + self.assertTrue(config.newsletters) + self.assertTrue(config.appointments) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley") + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + ) + def test_cms_profile_not_configured(self): + configuration_step = CMSProfileConfigurationStep() + + configuration_step.configure() + + self.assertFalse(configuration_step.is_configured()) + + self.assertFalse(profile_page_is_published()) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_SSD_ENABLE=True, + ) + def test_cms_ssd_configured(self): + configuration_step = CMSBenefitsConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(benefits_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_SSD_ENABLE=True, + CMS_SSD_REQUIRES_AUTH=True, + CMS_SSD_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_SSD_MENU_INDICATOR="arrow", + CMS_SSD_MENU_ICON="smiley", + ) + def test_cms_ssd_override_settings(self): + configuration_step = CMSBenefitsConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(benefits_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley") + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_CASES_ENABLE=True, + ) + def test_cms_cases_configured(self): + configuration_step = CMSCasesConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(case_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_CASES_ENABLE=True, + CMS_CASES_REQUIRES_AUTH=True, + CMS_CASES_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_CASES_MENU_INDICATOR="arrow", + CMS_CASES_MENU_ICON="smiley", + ) + def test_cms_cases_override_settings(self): + configuration_step = CMSCasesConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(case_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley") + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_COLLABORATE_ENABLE=True, + ) + def test_cms_collaborate_configured(self): + configuration_step = CMSCollaborateConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(collaborate_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_COLLABORATE_ENABLE=True, + CMS_COLLABORATE_REQUIRES_AUTH=True, + CMS_COLLABORATE_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_COLLABORATE_MENU_INDICATOR="arrow", + CMS_COLLABORATE_MENU_ICON="smiley", + ) + def test_cms_collaborate_override_settings(self): + configuration_step = CMSCollaborateConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(collaborate_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley") + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_INBOX_ENABLE=True, + ) + def test_cms_inbox_configured(self): + configuration_step = CMSInboxConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(inbox_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_INBOX_ENABLE=True, + CMS_INBOX_REQUIRES_AUTH=True, + CMS_INBOX_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_INBOX_MENU_INDICATOR="arrow", + CMS_INBOX_MENU_ICON="smiley", + ) + def test_cms_inbox_override_settings(self): + configuration_step = CMSInboxConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(inbox_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley") + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_PRODUCTS_ENABLE=True, + ) + def test_cms_products_configured(self): + configuration_step = CMSProductsConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(products_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + self.assertIsNone(getattr(page, "commonextension", None)) + + @override_settings( + ROOT_URLCONF="open_inwoner.cms.tests.urls", + CMS_CONFIG_PRODUCTS_ENABLE=True, + CMS_PRODUCTS_REQUIRES_AUTH=True, + CMS_PRODUCTS_REQUIRES_AUTH_BSN_OR_KVK=True, + CMS_PRODUCTS_MENU_INDICATOR="arrow", + CMS_PRODUCTS_MENU_ICON="smiley", + ) + def test_cms_products_override_settings(self): + configuration_step = CMSProductsConfigurationStep() + + configuration_step.configure() + + self.assertTrue(configuration_step.is_configured()) + + self.assertTrue(products_page_is_published()) + + # check common extension + page = Page.objects.get(publisher_is_draft=False) + extension = page.commonextension + + self.assertTrue(extension.requires_auth) + self.assertTrue(extension.requires_auth_bsn_or_kvk) + self.assertEqual(extension.menu_indicator, "arrow") + self.assertEqual(extension.menu_icon, "smiley")