120 # class ContentNavigationTC(CubicWebTC): |
120 # class ContentNavigationTC(CubicWebTC): |
121 # def test_component_context(self): |
121 # def test_component_context(self): |
122 # view = mock_object(is_primary=lambda x: True) |
122 # view = mock_object(is_primary=lambda x: True) |
123 # rset = self.execute('CWUser X LIMIT 1') |
123 # rset = self.execute('CWUser X LIMIT 1') |
124 # req = self.request() |
124 # req = self.request() |
125 # objs = self.vreg['contentnavigation'].poss_visible_objects( |
125 # objs = self.vreg['ctxcomponents'].poss_visible_objects( |
126 # req, rset=rset, view=view, context='navtop') |
126 # req, rset=rset, view=view, context='navtop') |
127 # # breadcrumbs should be in headers by default |
127 # # breadcrumbs should be in headers by default |
128 # clsids = set(obj.id for obj in objs) |
128 # clsids = set(obj.id for obj in objs) |
129 # self.failUnless('breadcrumbs' in clsids) |
129 # self.failUnless('breadcrumbs' in clsids) |
130 # objs = self.vreg['contentnavigation'].poss_visible_objects( |
130 # objs = self.vreg['ctxcomponents'].poss_visible_objects( |
131 # req, rset=rset, view=view, context='navbottom') |
131 # req, rset=rset, view=view, context='navbottom') |
132 # # breadcrumbs should _NOT_ be in footers by default |
132 # # breadcrumbs should _NOT_ be in footers by default |
133 # clsids = set(obj.id for obj in objs) |
133 # clsids = set(obj.id for obj in objs) |
134 # self.failIf('breadcrumbs' in clsids) |
134 # self.failIf('breadcrumbs' in clsids) |
135 # self.execute('INSERT CWProperty P: P pkey "contentnavigation.breadcrumbs.context", ' |
135 # self.execute('INSERT CWProperty P: P pkey "ctxcomponents.breadcrumbs.context", ' |
136 # 'P value "navbottom"') |
136 # 'P value "navbottom"') |
137 # # breadcrumbs should now be in footers |
137 # # breadcrumbs should now be in footers |
138 # req.cnx.commit() |
138 # req.cnx.commit() |
139 # objs = self.vreg['contentnavigation'].poss_visible_objects( |
139 # objs = self.vreg['ctxcomponents'].poss_visible_objects( |
140 # req, rset=rset, view=view, context='navbottom') |
140 # req, rset=rset, view=view, context='navbottom') |
141 |
141 |
142 # clsids = [obj.id for obj in objs] |
142 # clsids = [obj.id for obj in objs] |
143 # self.failUnless('breadcrumbs' in clsids) |
143 # self.failUnless('breadcrumbs' in clsids) |
144 # objs = self.vreg['contentnavigation'].poss_visible_objects( |
144 # objs = self.vreg['ctxcomponents'].poss_visible_objects( |
145 # req, rset=rset, view=view, context='navtop') |
145 # req, rset=rset, view=view, context='navtop') |
146 |
146 |
147 # clsids = [obj.id for obj in objs] |
147 # clsids = [obj.id for obj in objs] |
148 # self.failIf('breadcrumbs' in clsids) |
148 # self.failIf('breadcrumbs' in clsids) |
149 |
149 |