def test_show_dropdown_menus(self): request = NavigationDummyRequest(path='/some-navigation-widget-left') root = get_root() result = navigation_widget_items(root, request) c1 = root[u'content_1'] = Content(title=u'Content_1') c1[u'sub_1'] = Content(title=u'Sub_1') c1[u'sub_1'][u'sub_sub_1'] = Content(title=u'Sub_Sub_1') c2 = root[u'content_2'] = Content(title=u'Content_2') c2[u'sub_2'] = Content(title=u'Sub_2') html = render_view( c1, NavigationDummyRequest(path='/some-navigation-widget-left'), name='navigation-widget-items-left') assert not u'nav-list-careted' in html st = get_current_registry().settings st['kotti_navigation.navigation_widget.left_display_type'] = u'hor_pills_with_dropdowns' html = render_view( c1, NavigationDummyRequest(path='/some-navigation-widget-left'), name='navigation-widget-items-left') assert u'nav-list-careted' in html
def test_label(self): request = NavigationDummyRequest(path='/some-navigation-widget-left') root = get_root() root[u'content_1'] = Content(title=u'Content_1') root[u'content_1'][u'sub_1'] = Content(title=u'Sub_1') root[u'content_2'] = Content(title=u'Content_2') root[u'content_2'][u'sub_2'] = Content(title=u'Sub_2') result = navigation_widget_items(root, request) se = get_current_registry().settings se['kotti_navigation.navigation_widget.left_label'] =\ u'Items in [context] are:' result = navigation_widget_items(root[u'content_1'], request) assert result['label'] == 'Items in [Content_1] are:'
def test_label(self): request = NavigationDummyRequest(path='/some-navigation-widget-left') root = get_root() root[u'content_1'] = Content(title=u'Content_1') root[u'content_1'][u'sub_1'] = Content(title=u'Sub_1') root[u'content_2'] = Content(title=u'Content_2') root[u'content_2'][u'sub_2'] = Content(title=u'Sub_2') result = navigation_widget_items(root, request) se = get_current_registry().settings se['kotti_navigation.navigation_widget.left_label'] =\ u'Items in [context] are:' result = navigation_widget_items(root[u'content_1'], request) assert result['label'] == 'Items in [Content_1] are:'
def test_show_dropdown_menus(self): request = NavigationDummyRequest(path='/some-navigation-widget-left') root = get_root() result = navigation_widget_items(root, request) c1 = root[u'content_1'] = Content(title=u'Content_1') c1[u'sub_1'] = Content(title=u'Sub_1') c1[u'sub_1'][u'sub_sub_1'] = Content(title=u'Sub_Sub_1') c2 = root[u'content_2'] = Content(title=u'Content_2') c2[u'sub_2'] = Content(title=u'Sub_2') html = render_view(c1, NavigationDummyRequest(path='/some-navigation-widget-left'), name='navigation-widget-items-left') assert not u'nav-list-careted' in html st = get_current_registry().settings st['kotti_navigation.navigation_widget.left_display_type'] = u'hor_pills_with_dropdowns' html = render_view(c1, NavigationDummyRequest(path='/some-navigation-widget-left'), name='navigation-widget-items-left') assert u'nav-list-careted' in html