Commit 5318a83a authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: remember access to tools sub documents

parent 828f59fd
......@@ -290,7 +290,7 @@
var hash = getDisplayUrlFor(jio_key, options),
queue;
/*jslint regexp: true*/
if (jio_key && /^[^\/]+_module\/[^\/]+$/.test(jio_key)) {
if (jio_key && (/^[^\/]+_module\/[^\/]+$/.test(jio_key) || /^portal_[^\/]+\/[^\/]+$/.test(jio_key))) {
/*jslint regexp: false*/
// This only work for remote access to ERP5...
queue = gadget.props.jio_navigation_gadget.put(jio_key, {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.61109.20595.59733</string> </value>
<value> <string>986.32404.49746.11571</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1601371634.14</float>
<float>1600953905.18</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPageHistoryDocumentListOnlyShowToolSubDocuments</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Page History Only Shows Tool Sub Documents</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Page History Only Shows Tool Sub Documents</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<!-- Access tool, access a document, then access a sub document -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#!display?n.jio_key=portal_types</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="search_query python: 'id:&quot;Foo Module&quot;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>click</td>
<td>link=Foo Module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Actions'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'list'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!-- History only show 1 of the 3 documents accessed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/open_menu_panel" />
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='History']</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html']</td>
<td></td>
</tr>
<!-- Generate links to module -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Foo Module (Base Type)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=portal_types%2FFoo%20Module')]</td>
<td></td>
</tr>
<tr>
<td>assertTextNotPresent</td>
<td>portal_types</td>
<td></td>
</tr>
<tr>
<td>assertTextNotPresent</td>
<td>Portal Types</td>
<td></td>
</tr>
<tr>
<td>assertTextNotPresent</td>
<td>List</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
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