Exemple #1
0
    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")
Exemple #2
0
    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())
Exemple #3
0
    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")
Exemple #4
0
    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")
Exemple #5
0
    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")
Exemple #6
0
 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.')
Exemple #7
0
    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())
Exemple #8
0
 def test_protlet_is_enabled_if_ILabelRoot_is_provided(self, browser):
     folder = create(Builder('label root'))
     browser.login().visit(folder)
     self.assertTrue(jarportlet.portlet())
Exemple #9
0
 def test_portlet_is_disabled_per_default(self, browser):
     browser.visit()
     self.assertFalse(jarportlet.portlet())
Exemple #10
0
 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.')
Exemple #11
0
 def test_protlet_is_enabled_if_ILabelRoot_is_provided(self, browser):
     folder = create(Builder('label root'))
     browser.login().visit(folder)
     self.assertTrue(jarportlet.portlet())
Exemple #12
0
 def test_portlet_is_disabled_per_default(self, browser):
     browser.visit()
     self.assertFalse(jarportlet.portlet())