Permalink
Browse files

Pages: use strong instead of bold tag in plone pages test.

The TinyMCE in 4.2 replaces <b> tags with <strong> tags.
  • Loading branch information...
1 parent 2a868d6 commit 76b89030bc59bdb2efa01ce6657dfd8c9b3dc712 @jone jone committed Mar 25, 2013
Showing with 10 additions and 8 deletions.
  1. +10 −8 ftw/testing/tests/test_pages_plone.py
@@ -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.