Skip to content

Commit

Permalink
Pages: use strong instead of bold tag in plone pages test.
Browse files Browse the repository at this point in the history
The TinyMCE in 4.2 replaces <b> tags with <strong> tags.
  • Loading branch information
jone committed Mar 25, 2013
1 parent 2a868d6 commit 76b8903
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ftw/testing/tests/test_pages_plone.py
Expand Up @@ -143,34 +143,36 @@ def test_create_object__ZOPE_TESTBROWSER(self):
Plone().visit_portal()

text = 'Some contents for Foo.'
Plone().create_object('Page', {'Title': 'Foo',
'Body Text': '<b>%s</b>' % text})
Plone().create_object('Page', {
'Title': 'Foo',
'Body Text': '<strong>%s</strong>' % text})

self.assertEquals('%s/foo' % Plone().portal_url, browser().url)
self.assertEquals('Foo', Plone().get_first_heading(),
'Title of newly created page is wrong.')
self.assertTrue(browser().is_text_present(text),
'Body Text of newly create page not visible.')

bold = browser().find_by_xpath('//b[text()="%s"]' % text).first
bold = browser().find_by_xpath('//strong[text()="%s"]' % text).first
self.assertEquals(text, bold.text,
'Insert HTML bold tag could not be found.')
'Insert HTML strong tag could not be found.')

@javascript
def test_create_object__JAVASCRIPT(self):
Plone().login(SITE_OWNER_NAME, SITE_OWNER_PASSWORD)
Plone().visit_portal()

text = 'Some contents for Foo.'
Plone().create_object('Page', {'Title': 'Foo',
'Body Text': '<b>%s</b>' % text})
Plone().create_object('Page', {
'Title': 'Foo',
'Body Text': '<strong>%s</strong>' % text})

self.assertEquals('%s/foo' % Plone().portal_url, browser().url)
self.assertEquals('Foo', Plone().get_first_heading(),
'Title of newly created page is wrong.')
self.assertTrue(browser().is_text_present(text),
'Body Text of newly create page not visible.')

bold = browser().find_by_xpath('//b[text()="%s"]' % text).first
bold = browser().find_by_xpath('//strong[text()="%s"]' % text).first
self.assertEquals(text, bold.text,
'Insert HTML bold tag could not be found.')
'Insert HTML strong tag could not be found.')

0 comments on commit 76b8903

Please sign in to comment.