Commit ee8ca461 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui_test: fix broken tests

See merge request nexedi/erp5!1731
parents fd737b5f 43300d92
......@@ -11,6 +11,18 @@
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>openAndWait</td>
<td>${base_url}/bar_module/BarModule_configureViewHistoryPermission?value:int=0</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/bar_module</td>
......@@ -32,6 +44,18 @@
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/bar_module/BarModule_configureViewHistoryPermission?value:int=1</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -12,6 +12,16 @@
<!--tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /-->
<!-- reuse listbox suite reset to clear modules. -->
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>openAndWait</td>
<td>${base_url}/bar_module/BarModule_configureViewHistoryPermission?value:int=0</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
......@@ -66,6 +76,17 @@
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/bar_module/BarModule_configureViewHistoryPermission?value:int=1</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -49,23 +49,12 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertTextPresent</td>
<td>View ZODB History</td>
<td></td>
</tr>
<!-- There is a form_view gadget containing the main fields -->
<tr>
<td>assertElementPresent</td>
<td>//div[@class='form_view']//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class='form_view']//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']//label[@for='field_your_zodb_history']</td>
<td></td>
</tr>
</tbody></table>
</body>
......
......@@ -46,11 +46,6 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertTextPresent</td>
<td>View ZODB History</td>
<td></td>
</tr>
<!-- Header has a link to the action page -->
<tr>
......
default_permission_list = [permission['name'] for permission in context.bar_module.permissionsOfRole('Manager') if permission['selected'] == 'SELECTED']
if value:
if 'View History' not in default_permission_list:
default_permission_list.append('View History')
else:
if 'View History' in default_permission_list:
default_permission_list.remove('View History')
context.bar_module.manage_role('Manager', default_permission_list)
return 'Done'
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value=1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BarModule_configureViewHistoryPermission</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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