This commit is contained in:
vangheem 2015-05-30 19:28:22 -05:00
parent e2192e5973
commit 4bd649e021
1 changed files with 7 additions and 6 deletions

View File

@ -269,14 +269,15 @@ Use the Plone control panel to enable comment editing.
Extract the edit comment url from the first "edit comment" button Extract the edit comment url from the first "edit comment" button
>>> from Products.CMFPlone import __version__
>>> browser.open(urldoc1) >>> browser.open(urldoc1)
>>> form = browser.getForm(name='edit', index=0) >>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action
>>> '@@edit-comment' in form.action >>> '@@edit-comment' in url
True True
Open the edit comment view Open the edit comment view
>>> browser.open(form.action) >>> browser.open(url)
>>> ctrl = browser.getControl('Comment') >>> ctrl = browser.getControl('Comment')
>>> ctrl.value >>> ctrl.value
'Comment from admin' 'Comment from admin'
@ -298,10 +299,10 @@ Check it ain't so.
Opening the edit comment view, then cancel, does nothing. Opening the edit comment view, then cancel, does nothing.
>>> form = browser.getForm(name='edit', index=0) >>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action
>>> '@@edit-comment' in form.action >>> '@@edit-comment' in url
True True
>>> browser.open(form.action) >>> browser.open(url)
>>> browser.getControl('Cancel').click() >>> browser.getControl('Cancel').click()
>>> browser.url.startswith('http://nohost/plone/doc1') >>> browser.url.startswith('http://nohost/plone/doc1')
True True