Skip to content

Commit

Permalink
Add tests for subsitelogoviewlet
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael-s committed Nov 28, 2016
1 parent 2330099 commit bf4dab7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ftw/subsite/tests/builders.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
10 changes: 10 additions & 0 deletions ftw/subsite/tests/test_subsiteviewletlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

0 comments on commit bf4dab7

Please sign in to comment.