def test_invisible_ILabelJarChild_without_parent_ILabelRoot(self, browser): folder = create(Builder('label display')) browser.login().visit(folder) self.assertFalse( jarportlet.portlet(), "The folder can't show the portlet because " "it has no parent label root folder")
def test_protlet_is_enabled_if_ILabelJarChild_and_parent_is_ILabelRoot( self, browser): folder = create(Builder('label root')) subfolder = create(Builder('label display').within(folder)) browser.login().visit(subfolder) self.assertTrue(jarportlet.portlet())
def test_invisible_if_no_ILabelJarChild_but_parent_with_ILabelRoot(self, browser): folder = create(Builder('label root')) subfolder = create(Builder('folder').within(folder)) browser.login().visit(subfolder) self.assertFalse( jarportlet.portlet(), "The folder shouldn't show the portlet because " "it has no ILabelJarChild marker interface")
def test_invisible_for_unprivileged_users_when_empty(self, browser): folder = create(Builder('label root')) browser.visit(folder) self.assertFalse( jarportlet.portlet(), 'Anonymous users should not see labels portlet when it is empty.')
def test_protlet_is_enabled_if_ILabelJarChild_and_parent_is_ILabelRoot(self, browser): folder = create(Builder('label root')) subfolder = create(Builder('label display').within(folder)) browser.login().visit(subfolder) self.assertTrue(jarportlet.portlet())
def test_protlet_is_enabled_if_ILabelRoot_is_provided(self, browser): folder = create(Builder('label root')) browser.login().visit(folder) self.assertTrue(jarportlet.portlet())
def test_portlet_is_disabled_per_default(self, browser): browser.visit() self.assertFalse(jarportlet.portlet())