Commit 332dfc45 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Update examples following r46000

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@46004 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ad919d3
...@@ -47,9 +47,13 @@ def createPerson(result, browser): ...@@ -47,9 +47,13 @@ def createPerson(result, browser):
# Check whether the changes have been successfully updated # Check whether the changes have been successfully updated
assert browser.getTransitionMessage() == 'Data updated.' assert browser.getTransitionMessage() == 'Data updated.'
# Validate it after going back to the Person page # Go back to the Person page before validating
browser.open(person_url) browser.open(person_url)
result('Validate', browser.mainForm.submitSelectWorkflow(value='validate_action')) # Validate it (as the workflow action may not be available yet, try 5 times
# and sleep 5s between each attempts before failing)
result('Validate', browser.mainForm.submitSelectWorkflow(value='validate_action',
maximum_attempt_number=5,
sleep_between_attempt=5))
result('Validated', browser.mainForm.submitDialogConfirm()) result('Validated', browser.mainForm.submitDialogConfirm())
assert browser.getTransitionMessage() == 'Status changed.' assert browser.getTransitionMessage() == 'Status changed.'
...@@ -40,8 +40,12 @@ def benchmarkAddPerson(iteration_counter, result_dict): ...@@ -40,8 +40,12 @@ def benchmarkAddPerson(iteration_counter, result_dict):
# Check whether the changes have been successfully updated # Check whether the changes have been successfully updated
assert browser.getTransitionMessage() == 'Data updated.' assert browser.getTransitionMessage() == 'Data updated.'
# Validate the person and record confirmation # Validate the person (as the workflow action may not be available yet, try
browser.mainForm.submitSelectWorkflow(value='validate_action') # 5 times and sleep 5s between each attempts before failing) and record
# time spent on confirmation
browser.mainForm.submitSelectWorkflow(value='validate_action',
maximum_attempt_number=5,
sleep_between_attempt=5)
result_dict.setdefault('Validate', []).append( result_dict.setdefault('Validate', []).append(
browser.mainForm.submitDialogConfirm()) browser.mainForm.submitDialogConfirm())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment