From bf4dab78744da63253fc283dd441bf1db5aeddf5 Mon Sep 17 00:00:00 2001 From: raphael-s Date: Mon, 28 Nov 2016 17:56:57 +0100 Subject: [PATCH] Add tests for subsitelogoviewlet --- ftw/subsite/tests/builders.py | 1 + ftw/subsite/tests/test_subsiteviewletlogo.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/ftw/subsite/tests/builders.py b/ftw/subsite/tests/builders.py index e38d74e..2bd8d49 100644 --- a/ftw/subsite/tests/builders.py +++ b/ftw/subsite/tests/builders.py @@ -1,5 +1,6 @@ from ftw.builder.dexterity import DexterityBuilder from ftw.builder import builder_registry +from ftw.simplelayout.tests import builders class SubsiteBuilder(DexterityBuilder): diff --git a/ftw/subsite/tests/test_subsiteviewletlogo.py b/ftw/subsite/tests/test_subsiteviewletlogo.py index 35eda09..5a65b0b 100644 --- a/ftw/subsite/tests/test_subsiteviewletlogo.py +++ b/ftw/subsite/tests/test_subsiteviewletlogo.py @@ -144,3 +144,13 @@ def test_logo_img_tag_has_alt_attribute_if_filled(self, browser): u'Plone Logo Alt Text', browser.css('#portal-logo img').first.attrib['alt']) + @browsing + def test_logo_with_other_content_with_id_logo(self, browser): + self._add_logo(self.subsite) + + contentpage = create(Builder('sl content page').within(self.subsite)) + create(Builder('sl textblock').titled('logo').within(contentpage)) + + browser.login().visit(contentpage) + + self.assertTrue(browser.css('#portal-logo img'))