Commit b362f232 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Remember the list of last accessed documents

This list can be viewed in the panel History link
parent 18f1b521
......@@ -102,7 +102,7 @@
<value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n
# generated on Mon, 03 Nov 2015 11:50:00 +0000\n
# generated on Mon, 10 Nov 2015 14:20:00 +0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
......@@ -165,6 +165,8 @@ gadget_erp5_page_form.html\n
gadget_erp5_page_form.js\n
gadget_erp5_page_front.html\n
gadget_erp5_page_front.js\n
gadget_erp5_page_history.html\n
gadget_erp5_page_history.js\n
gadget_erp5_page_login.html\n
gadget_erp5_page_login.js\n
gadget_erp5_page_logout.html\n
......@@ -332,7 +334,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.55008.187.42410</string> </value>
<value> <string>946.56378.7589.51541</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -350,7 +352,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1446547833.72</float>
<float>1447161601.46</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -129,6 +129,7 @@
</head>\n
<body>\n
<div data-gadget-url="gadget_jio.html" data-gadget-scope="jio_selection"></div>\n
<div data-gadget-url="gadget_jio.html" data-gadget-scope="jio_navigation_history"></div>\n
</body>\n
</html>\n
......@@ -254,7 +255,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -268,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.59812.18070.18176</string> </value>
<value> <string>946.44927.40202.16725</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -286,8 +287,8 @@
</tuple>
<state>
<tuple>
<float>1442926344.74</float>
<string>GMT</string>
<float>1446821965.62</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -248,18 +248,56 @@
}\n
return result;\n
}\n
\n
//////////////////////////////////////////////////////////////////\n
// navigation history functions\n
//////////////////////////////////////////////////////////////////\n
function addNavigationHistoryAndDisplay(gadget, jio_key, options) {\n
var hash = getDisplayUrlFor(jio_key, options),\n
queue;\n
/*jslint regexp: true*/\n
if (jio_key && /^[^\\/]+_module\\/[^\\/]+$/.test(jio_key)) {\n
/*jslint regexp: false*/\n
// This only work for remote access to ERP5...\n
queue = gadget.props.jio_navigation_gadget.put(jio_key, {\n
access_time: (new Date().getTime()),\n
hash: hash\n
})\n
.push(function () {\n
return gadget.props.jio_navigation_gadget.allDocs({\n
sort_on: [[\'access_time\', \'descending\']],\n
// Max number of history entry\n
limit: [30, 9999]\n
});\n
})\n
.push(function (result_list) {\n
// Remove old accessed documents\n
var i,\n
promise_list = [];\n
for (i = 0; i < result_list.data.rows.length; i += 1) {\n
promise_list.push(\n
gadget.props.jio_navigation_gadget.remove(result_list.data.rows[i].id)\n
);\n
}\n
return RSVP.all(promise_list);\n
});\n
} else {\n
queue = new RSVP.Queue();\n
}\n
return queue\n
.push(function () {\n
return synchronousChangeState(hash);\n
});\n
}\n
\n
//////////////////////////////////////////////////////////////////\n
// exec command functions\n
//////////////////////////////////////////////////////////////////\n
function execDisplayCommand(next_options) {\n
function execDisplayCommand(gadget, next_options) {\n
// console.warn(command_options);\n
var jio_key = next_options.jio_key;\n
delete next_options.jio_key;\n
// XXX Implement history management\n
return synchronousChangeState(\n
getDisplayUrlFor(jio_key, next_options)\n
);\n
return addNavigationHistoryAndDisplay(gadget, jio_key, next_options);\n
}\n
\n
function execChangeCommand(previous_options, next_options) {\n
......@@ -302,9 +340,7 @@
})\n
.push(function (id) {\n
next_options.history = id;\n
return synchronousChangeState(\n
getDisplayUrlFor(jio_key, next_options)\n
);\n
return addNavigationHistoryAndDisplay(gadget, jio_key, next_options);\n
});\n
}\n
\n
......@@ -317,9 +353,7 @@
return addHistory(gadget, previous_options)\n
.push(function (id) {\n
next_options.history = id;\n
return synchronousChangeState(\n
getDisplayUrlFor(jio_key, next_options)\n
);\n
return addNavigationHistoryAndDisplay(gadget, jio_key, next_options);\n
});\n
}\n
\n
......@@ -345,12 +379,14 @@
getCommandUrlFor(gadget, COMMAND_HISTORY_PREVIOUS, previous_options)\n
);\n
}\n
return synchronousChangeState(\n
getDisplayUrlFor(result.data.rows[0].id, {\n
return addNavigationHistoryAndDisplay(\n
gadget,\n
result.data.rows[0].id,\n
{\n
selection: previous_options.selection,\n
selection_index: parseInt(previous_options.selection_index, 10) + 1,\n
history: previous_options.history\n
})\n
}\n
);\n
});\n
}, function (error) {\n
......@@ -391,12 +427,14 @@
getCommandUrlFor(gadget, COMMAND_HISTORY_PREVIOUS, previous_options)\n
);\n
}\n
return synchronousChangeState(\n
getDisplayUrlFor(result.data.rows[0].id, {\n
return addNavigationHistoryAndDisplay(\n
gadget,\n
result.data.rows[0].id,\n
{\n
selection: previous_options.selection,\n
selection_index: parseInt(previous_options.selection_index, 10) - 1,\n
history: previous_options.history\n
})\n
}\n
);\n
});\n
}, function (error) {\n
......@@ -417,9 +455,8 @@
uri;\n
if (parent_link !== undefined) {\n
uri = new URI(parent_link.href);\n
return synchronousChangeState(\n
getDisplayUrlFor(uri.segment(2), {})\n
);\n
\n
return addNavigationHistoryAndDisplay(gadget, uri.segment(2), {});\n
}\n
});\n
}\n
......@@ -454,9 +491,7 @@
var options = result_list[0].data,\n
next_jio_key = options.jio_key;\n
delete options.jio_key;\n
return synchronousChangeState(\n
getDisplayUrlFor(next_jio_key, options)\n
);\n
return addNavigationHistoryAndDisplay(gadget, next_jio_key, options);\n
});\n
}\n
\n
......@@ -484,6 +519,28 @@
})\n
);\n
}\n
} else if (command_options.args.page === \'history\') {\n
// This is an adhoc route to handle local navigation history\n
return gadget.props.jio_navigation_gadget.allDocs({\n
sort_on: [[\'access_time\', \'descending\']]\n
})\n
.push(function (result) {\n
var result_list = result.data.rows,\n
id_list = [],\n
i;\n
for (i = 0; i < result_list.length; i += 1) {\n
id_list.push(result_list[i].id);\n
}\n
\n
return {\n
url: "gadget_erp5_page_" + command_options.args.page + ".html",\n
// XXX Drop this options thing.\n
// Implement a "getSelection" method\n
options: {\n
id_list: id_list\n
}\n
};\n
});\n
}\n
\n
if (command_options.args.page === undefined) {\n
......@@ -539,7 +596,7 @@
}\n
\n
if (command_options.path === COMMAND_DISPLAY_STATE) {\n
return execDisplayCommand(next_options);\n
return execDisplayCommand(gadget, next_options);\n
}\n
if (command_options.path === COMMAND_INDEX_STATE) {\n
return execIndexCommand(gadget, previous_options, next_options);\n
......@@ -632,6 +689,20 @@
});\n
});\n
})\n
\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("jio_navigation_history")\n
.push(function (jio_gadget) {\n
gadget.props.jio_navigation_gadget = jio_gadget;\n
return jio_gadget.createJio({\n
type: "query",\n
sub_storage: {\n
type: "indexeddb",\n
database: "navigation_history"\n
}\n
});\n
});\n
})\n
\n
.declareMethod(\'getCommandUrlFor\', function (options) {\n
var command = options.command,\n
......@@ -842,7 +913,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.59190.22172.6929</string> </value>
<value> <string>947.784.43671.16128</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -860,7 +931,7 @@
</tuple>
<state>
<tuple>
<float>1446737639.1</float>
<float>1447162652.41</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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Page History Only Shows Module Sub Documents</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Page Front</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
\n
<!-- Access module, create a document, then create a sub document -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/web_site_module/renderjs_runner/#</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//h3[@data-i18n=\'Other\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//h3[@data-i18n=\'Other\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//a[@data-i18n=\'Foos\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>link=Foos</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>link=Add</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>link=Add</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//select[@name=\'field_your_portal_type\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//button[@data-i18n=\'Proceed\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name=\'field_your_portal_type\']</td>\n
<td>label=Foo</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//button[@data-i18n=\'Proceed\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForTextPresent</td>\n
<td>Save</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>link=Add</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//select[@name=\'field_your_portal_type\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//button[@data-i18n=\'Proceed\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name=\'field_your_portal_type\']</td>\n
<td>label=Foo Line</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//button[@data-i18n=\'Proceed\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForTextPresent</td>\n
<td>Save</td>\n
<td></td>\n
</tr>\n
\n
<!-- History only show 1 of the 3 documents accessed -->\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'1\' and contains(@href, \'#!change\') and contains(@href, \'n.page=breadcrumb\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'m\']//a[text()=\'ERP5\' and @href=\'#\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'panel\']//div[contains(@class, \'ui-panel-open\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'panel\']//a[text()=\'History\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Wait for gadget to be loaded -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Generate links to module -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'m\']//a[text()=\'2 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F2\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextNotPresent</td>\n
<td>Foo Module</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextNotPresent</td>\n
<td>Foo Line</td>\n
<td></td>\n
</tr>\n
\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </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>testPageHistoryDocumentListOnlyShowModuleSubDocuments</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>
<?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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Page History Only Shows Module Sub Documents</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Page Front</td></tr>\n
</thead><tbody>\n
\n
<!-- reuse listbox suite reset to clear modules. -->\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<!-- create a Foo -->\n
<td>${base_url}/foo_module/Foo_createObjects?start:int=1&amp;num:int=2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<!-- Access both documents -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForTextPresent</td>\n
<td>Title 1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'field_listbox\']//a[text()=\'Title 1\' and contains(@href, \'#!index\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForTextPresent</td>\n
<td>Title 2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'field_listbox\']//a[text()=\'Title 2\' and contains(@href, \'#!index\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Go to the history tab -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'panel\']//div[contains(@class, \'ui-panel-open\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'panel\']//a[text()=\'History\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Wait for gadget to be loaded -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Generate links to module -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'m\']//li[@class=\'ui-first-child\']//a[text()=\'Title 2 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F2\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'m\']//a[text()=\'Title 1 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F1\')]</td>\n
<td></td>\n
</tr>\n
\n
<!-- Click on second one to change the order -->\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'m\']//a[text()=\'Title 1 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F1\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//a[text()=\'Back\' and contains(@href, \'#!history_previous\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Go to the history tab -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'panel\']//div[contains(@class, \'ui-panel-open\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'panel\']//a[text()=\'History\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Wait for gadget to be loaded -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html\']</td>\n
<td></td>\n
</tr>\n
\n
<!-- Generate links to module -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'m\']//li[@class=\'ui-first-child\']//a[text()=\'Title 1 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F1\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'m\']//a[text()=\'Title 2 (Foo)\' and contains(@href, \'#!display\') and contains(@href, \'n.jio_key=foo_module%2F2\')]</td>\n
<td></td>\n
</tr>\n
\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </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>testPageHistoryDocumentListOrderedByAccessTime</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>
<?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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test History Page Menu Action</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/web_site_module/renderjs_runner/#/?page=history</td>\n
<td></td>\n
</tr>\n
\n
<!-- Wait for gadget to be loaded -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-url=\'${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForTextPresent</td>\n
<td>Menu</td>\n
<td></td>\n
</tr>\n
\n
<!-- Header has a menu button -->\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//div[@data-gadget-scope=\'panel\']//div[contains(@class, \'ui-panel-closed\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//div[@data-gadget-scope=\'header\']//button[text()=\'Menu\' and @type=\'submit\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//div[@data-gadget-scope=\'panel\']//div[contains(@class, \'ui-panel-open\')]</td>\n
<td></td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </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>testPageHistoryMenuAction</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>
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