From 4bd649e021cf5ab4cc4690d5ee055a90ea77356d Mon Sep 17 00:00:00 2001 From: vangheem Date: Sat, 30 May 2015 19:28:22 -0500 Subject: [PATCH] fix test --- .../discussion/tests/functional_test_comments.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plone/app/discussion/tests/functional_test_comments.txt b/plone/app/discussion/tests/functional_test_comments.txt index 1d85365..56b8736 100644 --- a/plone/app/discussion/tests/functional_test_comments.txt +++ b/plone/app/discussion/tests/functional_test_comments.txt @@ -269,14 +269,15 @@ Use the Plone control panel to enable comment editing. Extract the edit comment url from the first "edit comment" button + >>> from Products.CMFPlone import __version__ >>> browser.open(urldoc1) - >>> form = browser.getForm(name='edit', index=0) - >>> '@@edit-comment' in form.action + >>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action + >>> '@@edit-comment' in url True Open the edit comment view - >>> browser.open(form.action) + >>> browser.open(url) >>> ctrl = browser.getControl('Comment') >>> ctrl.value 'Comment from admin' @@ -298,10 +299,10 @@ Check it ain't so. Opening the edit comment view, then cancel, does nothing. - >>> form = browser.getForm(name='edit', index=0) - >>> '@@edit-comment' in form.action + >>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action + >>> '@@edit-comment' in url True - >>> browser.open(form.action) + >>> browser.open(url) >>> browser.getControl('Cancel').click() >>> browser.url.startswith('http://nohost/plone/doc1') True