misc: disable "categories" cell (#23240) #19
|
@ -792,6 +792,10 @@ class CategoriesCell(WcsDataBaseCell):
|
|||
|
||||
self.mark_as_valid()
|
||||
|
||||
@classmethod
|
||||
def is_enabled(cls):
|
||||
return settings.CATEGORIES_CELL_ENABLED and is_wcs_enabled(cls)
|
||||
|
||||
|
||||
class CardMixin:
|
||||
invalid_reason_codes = invalid_reason_codes
|
||||
|
|
|
@ -371,6 +371,8 @@ PWA_NOTIFICATION_ICON_URL = None
|
|||
BOOKING_CALENDAR_CELL_ENABLED = False
|
||||
LEGACY_CHART_CELL_ENABLED = False
|
||||
PUBLIK_FAMILY_CELL_ENABLED = False
|
||||
CATEGORIES_CELL_ENABLED = False
|
||||
|
||||
|
||||
# and enable others
|
||||
CHART_FILTERS_CELL_ENABLED = True
|
||||
|
|
|
@ -1573,7 +1573,7 @@ def test_index_site_num_queries(settings, app):
|
|||
assert IndexedCell.objects.count() == 50
|
||||
with CaptureQueriesContext(connection) as ctx:
|
||||
index_site()
|
||||
assert len(ctx.captured_queries) in (173, 223) # (3.2, 2.2)
|
||||
assert len(ctx.captured_queries) in (172, 222) # (3.2, 2.2)
|
||||
|
||||
SearchCell.objects.create(
|
||||
page=page, placeholder='content', order=0, _search_services={'data': ['search1']}
|
||||
|
|
|
@ -219,6 +219,10 @@ def test_manager_categories_cell(mock_send, settings, app, admin_user):
|
|||
|
||||
app = login(app)
|
||||
resp = app.get('/manage/pages/%s/' % page.pk)
|
||||
assert not resp.pyquery('[data-tab-slug="general"] select[name$="wcs_site"]')
|
||||
|
||||
settings.CATEGORIES_CELL_ENABLED = True
|
||||
resp = app.get('/manage/pages/%s/' % page.pk)
|
||||
assert resp.pyquery('[data-tab-slug="general"] select[name$="wcs_site"]')
|
||||
|
||||
default = settings.KNOWN_SERVICES['wcs']['default']
|
||||
|
|
Loading…
Reference in New Issue