Commit bf8d4c54 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Kirill Smelkov

erp5_web_renderjs_ui: add editable mode & view mode concept for view

each view has both editable and view mode, they can be accessed and switched
Editable button bring to editable mode
View button select view instead of Tabs which is meaningless

/reviewed-on !108
parent cf9b6eaf
......@@ -141,7 +141,8 @@
['back_url', 'Back', 'times']
],
possible_right_link_list = [
['edit_url', 'Edit', 'pencil']
['edit_url', 'Editable', 'pencil'],
['view_url', 'Viewable', 'eye']
],
possible_right_button_list = [
['save_action', 'Save', 'check', 'submit'],
......@@ -149,7 +150,7 @@
['filter_action', 'Filter', 'filter', 'submit']
],
possible_sub_header_list = [
['tab_url', 'Tabs', 'eye'],
['tab_url', 'Views', 'eye'],
['jump_url', 'Jump', 'plane'],
['delete_url', 'Delete', 'times'],
['export_url', 'Export', 'share-square-o'],
......
......@@ -62,7 +62,7 @@
}
for (i = 0; i < view_list.length; i += 1) {
promise_list.push(gadget.getUrlFor({command: 'change', options: {view: view_list[i].href, page: undefined, editable: undefined}}));
promise_list.push(gadget.getUrlFor({command: 'change', options: {view: view_list[i].href, page: undefined, editable: options.editable}}));
}
if (erp5_document._links.action_object_clone_action) {
view_list.push(erp5_document._links.action_object_clone_action);
......
......@@ -49,6 +49,8 @@
parent_queue,
gadget = this,
erp5_document,
tab_title = "Views",
tab_icon = options.editable ? "pencil" : "eye",
jump_list;
function handleParent(parent_link) {
......@@ -100,16 +102,10 @@
if (jump_list.constructor !== Array) {
jump_list = [jump_list];
}
promise_list.push(gadget.getUrlFor({command: 'change', options: {
view: "view",
page: undefined,
editable: undefined
}}));
for (i = 0; i < view_list.length; i += 1) {
promise_list.push(gadget.getUrlFor({command: 'change', options: {
view: view_list[i].href,
editable: true,
editable: options.editable,
page: undefined
}}));
}
......@@ -126,7 +122,7 @@
})
.push(function (all_result) {
var i, j;
j = 1;
j = 0;
for (i = 0; i < view_list.length; i += 1) {
tab_list.push({
title: view_list[i].title,
......@@ -143,18 +139,11 @@
});
j += 1;
}
return gadget.translateHtml(table_template({
definition_title: "Views",
definition_i18n: "Views",
definition_icon: "eye",
documentlist: [{
title: view_list[0].title,
link: all_result[0]
}]
}) + table_template({
definition_title: "Editables",
definition_i18n: "Editables",
definition_icon: "edit",
definition_title: tab_title,
definition_i18n: tab_title,
definition_icon: tab_icon,
documentlist: tab_list
}) + table_template({
definition_title: "Jumps",
......@@ -175,14 +164,23 @@
gadget.getUrlFor({command: 'change', options: {
page: undefined
}}),
calculatePageTitle(gadget, erp5_document)
calculatePageTitle(gadget, erp5_document),
gadget.getUrlFor({command: 'change', options: {
editable: options.editable ? undefined : true
}})
]);
})
.push(function (url_list) {
return gadget.updateHeader({
var dict = {
back_url: url_list[0],
page_title: url_list[1]
});
};
if (options.editable) {
dict.view_url = url_list[2];
} else {
dict.edit_url = url_list[2];
}
return gadget.updateHeader(dict);
});
});
......
......@@ -125,32 +125,33 @@
<tr>
<td>click</td>
<td>//a[@data-i18n="Tabs"]</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="View"]</td>
<td>//div[@role="main"]//a[@data-i18n="View"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="View"]</td>
<td>//div[@role="main"]//a[@data-i18n="View"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>2022-12-21</td>
<td>waitForElementPresent</td>
<td>//input[@title="listbox_start_date"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>verifyElementPresent</td>
<td>//input[@title="listbox_start_date"]</td>
<td>2022-12-21</td>
<td></td>
</tr>
</tbody></table>
......
......@@ -149,7 +149,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Edit']</td>
<td>//a[@data-i18n='Editable']</td>
<td></td>
</tr>
......
......@@ -118,19 +118,40 @@
<tr>
<td>click</td>
<td>//a[@data-i18n="Tabs"]</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="View"]</td>
<td>//div[@role="main"]//a[@data-i18n="View"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="View"]</td>
<td>//div[@role="main"]//a[@data-i18n="View"]</td>
<td></td>
</tr>
......
......@@ -120,7 +120,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Edit']</td>
<td>//a[@data-i18n='Editable']</td>
<td></td>
</tr>
......
......@@ -32,12 +32,12 @@
<!-- Header has a link to the edit page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Edit' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Editable' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Edit' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Editable' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
......
......@@ -32,12 +32,12 @@
<!-- Header has a link to the action page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......@@ -55,11 +55,6 @@
<td>Views</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Editables</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Jumps</td>
......
......@@ -32,12 +32,12 @@
<!-- Header has a link to the action page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......@@ -55,11 +55,6 @@
<td>Views</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Editables</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Jumps</td>
......
......@@ -32,7 +32,7 @@
<!-- Follow one link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=')]</td>
<td></td>
</tr>
<tr>
......
......@@ -32,7 +32,7 @@
<!-- Follow one link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=')]</td>
<td></td>
</tr>
<tr>
......@@ -40,6 +40,13 @@
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_report_view.html']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>View ZODB History</td>
......
......@@ -32,7 +32,7 @@
<!-- Follow one link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='History' and contains(@href, '#!change') and contains(@href, 'history') and contains(@href, 'u.page=')]</td>
<td></td>
</tr>
<tr>
......@@ -40,6 +40,12 @@
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_report_view.html']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>View ZODB History</td>
......
......@@ -32,7 +32,7 @@
<!-- Get the list of tabs -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......
<?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>testPageActionDontChangeMode</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 Front</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Page Tab Breadcrumb List</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=tab</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_tab.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Actions"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Validate Action"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Validate Action"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Foo: Title 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Save"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -32,7 +32,7 @@
<!-- Get the list of tabs -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......@@ -64,14 +64,14 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<!-- Follow breadcrumb link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......
......@@ -30,12 +30,22 @@
</tr>
<!-- Generate links to parents -->
<tr>
<td>assertTextPresent</td>
<td>Editables</td>
<td>click</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
......@@ -47,6 +57,7 @@
<td></td>
</tr>
<!-- Follow one link -->
<tr>
<td>click</td>
......
<?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>testPageTabSwitchMode</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 Front</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Page Tab Breadcrumb List</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=tab</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_tab.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="header"]//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Relation Fields"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -30,22 +30,18 @@
</tr>
<!-- Generate links to parents -->
<tr>
<td>assertTextPresent</td>
<td>Views</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<!-- Follow one link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<tr>
......
......@@ -70,7 +70,7 @@
<!-- create a second history context by creating a subdocument -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Edit' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Editable' and contains(@href, '#!change') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
......@@ -95,12 +95,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
......@@ -108,9 +108,23 @@
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_tab.html']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Viewable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<tr>
......
......@@ -81,7 +81,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -103,7 +103,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -100,7 +100,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -106,7 +106,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -117,7 +117,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -56,12 +56,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -93,7 +93,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -67,12 +67,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -112,12 +112,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -167,7 +167,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -67,12 +67,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -146,7 +146,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n="Tabs"]</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
......
......@@ -67,12 +67,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -167,7 +167,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......
......@@ -67,12 +67,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Tabs']</td>
<td>//a[@data-i18n='Views']</td>
<td></td>
</tr>
......@@ -147,7 +147,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n="Tabs"]</td>
<td>//a[@data-i18n="Views"]</td>
<td></td>
</tr>
......
......@@ -174,34 +174,18 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>click</td>
<td>//a[@data-i18n="Tabs"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="View"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="View"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_my_short_title"]</td>
<td>//input[@name="field_my_short_title"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope="field_my_short_title"]</td>
<td>verifyValue</td>
<td>//input[@name="field_my_short_title"]</td>
<td>test_clone</td>
</tr>
......
......@@ -256,7 +256,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......@@ -280,13 +280,13 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......@@ -316,7 +316,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......@@ -347,13 +347,13 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......@@ -383,7 +383,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......@@ -409,7 +409,7 @@
<tr>
<td>click</td>
<td>//a[@data-i18n="Edit"]</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
......
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