Commit 1b5e3c72 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: add my account page

This page gathers all informations linked to the current user: preference, person, language, logout.

Drop all other language/preference links from other gadgets.
parent d63ee187
Pipeline #17454 failed with stage
...@@ -48,9 +48,7 @@ ...@@ -48,9 +48,7 @@
.push(function (result) { .push(function (result) {
var url_for_parameter_list = [ var url_for_parameter_list = [
// Back url // Back url
{command: 'display'}, {command: 'display'}
// Change language
{command: 'display', options: {page: 'language'}}
], ],
i; i;
row_list = result.data.rows; row_list = result.data.rows;
...@@ -67,11 +65,11 @@ ...@@ -67,11 +65,11 @@
dom_list = [], dom_list = [],
document_dict = {}; document_dict = {};
for (i = 2; i < url_list.length; i += 1) { for (i = 1; i < url_list.length; i += 1) {
document_dict[row_list[i - 2].id] = { document_dict[row_list[i - 1].id] = {
href: url_list[i], href: url_list[i],
text: (row_list[i - 2].value.title || row_list[i - 2].id) + text: (row_list[i - 1].value.title || row_list[i - 1].id) +
" (" + row_list[i - 2].value.translated_portal_type + ")" " (" + row_list[i - 1].value.translated_portal_type + ")"
}; };
} }
// Sort by access time // Sort by access time
...@@ -90,8 +88,7 @@ ...@@ -90,8 +88,7 @@
return gadget.updateHeader({ return gadget.updateHeader({
page_title: 'History', page_title: 'History',
page_icon: 'history', page_icon: 'history',
front_url: url_list[0], front_url: url_list[0]
language_url: url_list[1]
}); });
}); });
}) })
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>986.54157.57326.10274</string> </value> <value> <string>994.55592.35612.50193</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1600954453.92</float> <float>1632124106.47</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
var query_string, var query_string,
url_for_parameter_list = [ url_for_parameter_list = [
// Back URL // Back URL
{command: 'display'}, {command: 'display'}
// Change language URL
{command: 'display', options: {page: 'language'}}
], ],
display_options, display_options,
i; i;
...@@ -79,13 +77,13 @@ ...@@ -79,13 +77,13 @@
i, i,
dom_list = []; dom_list = [];
for (i = 2; i < url_list.length; i += 1) { for (i = 1; i < url_list.length; i += 1) {
dom_list.push(domsugar('li', {class: 'ui-li-has-count'}, [ dom_list.push(domsugar('li', {class: 'ui-li-has-count'}, [
domsugar('a', {href: url_list[i]}, [ domsugar('a', {href: url_list[i]}, [
action_list[i - 2].name, action_list[i - 1].name,
' ', ' ',
domsugar('span', {class: 'ui-li-count', domsugar('span', {class: 'ui-li-count',
text: action_list[i - 2].count}) text: action_list[i - 1].count})
]) ])
])); ]));
} }
...@@ -106,8 +104,7 @@ ...@@ -106,8 +104,7 @@
return gadget.updateHeader({ return gadget.updateHeader({
page_title: 'Worklist', page_title: 'Worklist',
page_icon: 'tasks', page_icon: 'tasks',
front_url: url_list[0], front_url: url_list[0]
language_url: url_list[1]
}); });
}); });
}) })
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>986.32404.49746.11571</string> </value> <value> <string>994.55590.51645.37529</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1600958231.92</float> <float>1632126331.02</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
data-i18n=Worklists data-i18n=Worklists
data-i18n=History data-i18n=History
data-i18n=Search data-i18n=Search
data-i18n=Preferences
data-i18n=Logout data-i18n=Logout
data-i18n=Views data-i18n=Views
data-i18n=Workflows data-i18n=Workflows
data-i18n=Actions data-i18n=Actions
data-i18n=Jumps data-i18n=Jumps
data-i18n=Global data-i18n=Global
data-i18n=My Account
--> -->
<!-- renderjs --> <!-- renderjs -->
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>989.60900.17207.44100</string> </value> <value> <string>994.51234.65222.57241</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1612990906.08</float> <float>1632227052.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
{command: 'display', options: {page: "worklist"}}, {command: 'display', options: {page: "worklist"}},
{command: 'display', options: {page: "history"}}, {command: 'display', options: {page: "history"}},
{command: 'display_stored_state', options: {page: "search"}}, {command: 'display_stored_state', options: {page: "search"}},
{command: 'display', options: {page: "preference"}}, {command: 'display', options: {page: "my_account"}},
{command: 'display', options: {page: "logout"}} {command: 'display', options: {page: "logout"}}
]), ]),
translation_list: gadget.getTranslationList([ translation_list: gadget.getTranslationList([
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
'Worklists', 'Worklists',
'History', 'History',
'Search', 'Search',
'Preferences', 'My Account',
'Logout' 'Logout'
]), ]),
checkbox_gadget: gadget.getDeclaredGadget("erp5_checkbox") checkbox_gadget: gadget.getDeclaredGadget("erp5_checkbox")
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
'history', 'h', 'history', 'h',
'search', 's', 'search', 's',
'sliders', null, 'sliders', null,
// 'sliders', null,
'power-off', 'o' 'power-off', 'o'
]; ];
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.51079.60050.30071</string> </value> <value> <string>994.55137.25232.35430</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631622266.86</float> <float>1632227072.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -92,8 +92,6 @@ ...@@ -92,8 +92,6 @@
} }
// Add global url calculation // Add global url calculation
url_dict_list.push({command: 'display'}); url_dict_list.push({command: 'display'});
// Add change language url calculation
url_dict_list.push({command: 'display', options: {page: 'language'}});
return RSVP.all([ return RSVP.all([
document_list, document_list,
gadget.getTranslationList(['Others', 'Tools']), gadget.getTranslationList(['Others', 'Tools']),
...@@ -165,8 +163,7 @@ ...@@ -165,8 +163,7 @@
return gadget.updateHeader({ return gadget.updateHeader({
page_title: 'Modules', page_title: 'Modules',
page_icon: 'puzzle-piece', page_icon: 'puzzle-piece',
front_url: url_list[i], front_url: url_list[i]
language_url: url_list[i + 1]
}); });
}); });
}); });
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>991.59254.15114.55603</string> </value> <value> <string>994.13854.35574.25361</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1620402959.3</float> <float>1631892657.11</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- <!--
data-i18n=User
data-i18n=Confirm data-i18n=Confirm
--> -->
<head> <head>
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>992.824.37160.29132</string> </value> <value> <string>992.40778.27781.1774</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1620830587.9</float> <float>1632217686.49</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,34 +24,12 @@ ...@@ -24,34 +24,12 @@
return new RSVP.Queue(RSVP.hash({ return new RSVP.Queue(RSVP.hash({
translation: gadget.getTranslationDict([ translation: gadget.getTranslationDict([
'Confirm', 'Confirm'
'User'
]), ]),
me: gadget.getSetting('me')
.push(function (me) {
if (me !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me + '"',
select_list: ['title']
});
}
})
.push(function (result) {
var user;
// Calculate user name
if (result === undefined) {
user = "Who are you?";
} else {
user = result.data.rows[0].value.title;
}
return user;
}),
erp5_form: gadget.getDeclaredGadget("erp5_form"), erp5_form: gadget.getDeclaredGadget("erp5_form"),
url_dict: gadget.getUrlForDict({ url_dict: gadget.getUrlForDict({
// Back url // Back url
back: {command: 'history_previous'}, back: {command: 'history_previous'}
// Change language
change_language: {command: 'display', options: {page: 'language'}}
}) })
})) }))
.push(function (result_dict) { .push(function (result_dict) {
...@@ -64,19 +42,11 @@ ...@@ -64,19 +42,11 @@
gadget.updateHeader({ gadget.updateHeader({
page_title: 'Logout', page_title: 'Logout',
page_icon: 'power-off', page_icon: 'power-off',
front_url: result_dict.url_dict.back, front_url: result_dict.url_dict.back
language_url: result_dict.url_dict.change_language
}), }),
result_dict.erp5_form.render({ result_dict.erp5_form.render({
erp5_document: {"_embedded": {"_view": { erp5_document: {"_embedded": {"_view": {
'User': {
"default": result_dict.me,
"editable": 0,
"key": "field_user",
"title": result_dict.translation.User,
"type": "StringField"
}
}}, }},
"_links": { "_links": {
"type": { "type": {
...@@ -86,10 +56,7 @@ ...@@ -86,10 +56,7 @@
} }
}, },
form_definition: { form_definition: {
group_list: [[ group_list: []
"left",
[["User"]]
]]
} }
}) })
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.55155.11493.60433</string> </value> <value> <string>994.61004.52513.15291</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631866791.5</float> <float>1632217737.36</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html>
<!--
data-i18n=Preferences
data-i18n=Language
data-i18n=Profile
data-i18n=Logout
data-i18n=My Account
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 PT Logoutpage</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_my_account.js" type="text/javascript"></script>
</head>
<body>
<section class="document_list"></section>
</body>
</html>
\ No newline at end of file
/*global window, rJS, domsugar, RSVP */
/*jslint indent: 2, maxerr: 3, nomen: true, maxlen: 80 */
(function (window, rJS, domsugar, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getUrlForDict", "getUrlForDict")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("getTranslationDict", "getTranslationDict")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var gadget = this,
me_relative_url;
return gadget.getSetting('me')
.push(function (result) {
me_relative_url = result;
return RSVP.hash({
translation: gadget.getTranslationDict([
'Preferences',
'Language',
'Profile',
'Logout',
'My Account'
]),
me: new RSVP.Queue()
.push(function () {
if (me_relative_url !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me_relative_url + '"',
select_list: ['title'],
limit: [0, 1]
});
}
})
.push(function (result) {
var user;
// Calculate user name
if (result === undefined) {
user = null;
} else {
user = result.data.rows[0].value.title;
}
return user;
}),
url_dict: gadget.getUrlForDict({
// Back url
back: {command: 'history_previous'},
preference: {command: 'push_history',
options: {page: "preference"}},
person: {command: 'push_history',
options: {jio_key: me_relative_url}},
// Change language
change_language: {command: 'push_history',
options: {page: 'language'}},
logout: {command: 'push_history', options: {page: 'logout'}}
})
});
})
.push(function (result_dict) {
domsugar(gadget.element.querySelector('.document_list'), [
domsugar('ul', {'class': 'document-listview'}, [
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.preference,
text: result_dict.translation.Preferences})
]),
(me_relative_url === undefined) ? '' :
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.person,
text: result_dict.translation.Profile})
]),
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.change_language,
text: result_dict.translation.Language})
]),
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.logout,
text: result_dict.translation.Logout})
])
])
]);
return gadget.updateHeader({
page_title: result_dict.translation['My Account'] +
((result_dict.me === null) ? '' : (': ' + result_dict.me)),
page_icon: 'sliders',
front_url: result_dict.url_dict.back
});
});
})
.declareMethod("triggerSubmit", function () {
return;
});
}(window, rJS, domsugar, RSVP));
\ No newline at end of file
...@@ -91,6 +91,8 @@ url_list = [ ...@@ -91,6 +91,8 @@ url_list = [
'gadget_erp5_page_history.js', 'gadget_erp5_page_history.js',
'gadget_erp5_page_jump.html', 'gadget_erp5_page_jump.html',
'gadget_erp5_page_jump.js', 'gadget_erp5_page_jump.js',
'gadget_erp5_page_my_account.html',
'gadget_erp5_page_my_account.js',
'gadget_erp5_page_language.html', 'gadget_erp5_page_language.html',
'gadget_erp5_page_language.js', 'gadget_erp5_page_language.js',
'gadget_erp5_page_logout.html', 'gadget_erp5_page_logout.html',
......
...@@ -15,10 +15,14 @@ ...@@ -15,10 +15,14 @@
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}"> <tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </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_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<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" />
<tal:block tal:define="click_configuration python: {'text': 'Views'}"> <tal:block tal:define="click_configuration python: {'text': 'Views'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block> </tal:block>
......
...@@ -29,10 +29,14 @@ ...@@ -29,10 +29,14 @@
<td>//a[text()="Business Templates" and href=contains(text(), "n.jio_key=portal_templates")]</td> <td>//a[text()="Business Templates" and href=contains(text(), "n.jio_key=portal_templates")]</td>
<td></td> <td></td>
</tr> </tr>
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}"> <tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </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_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<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" />
<tal:block tal:define="click_configuration python: {'text': 'User Interface'}"> <tal:block tal:define="click_configuration python: {'text': 'User Interface'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </tal:block>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="check_configuration python: {'precache_reference': '../renderjs_runner/WebSection_getPrecacheManifest', <tal:block tal:define="check_configuration python: {'precache_reference': '../renderjs_runner/WebSection_getPrecacheManifest',
'gadget_count': 72}"> 'gadget_count': 73}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUiInterface/macros/run_app_interface_check" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUiInterface/macros/run_app_interface_check" />
</tal:block> </tal:block>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<td>test</td> <td>test</td>
</tr> </tr>
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}"> <tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </tal:block>
...@@ -48,4 +48,4 @@ ...@@ -48,4 +48,4 @@
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td> <td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td> <td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td> <td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
...@@ -38,14 +40,14 @@ ...@@ -38,14 +40,14 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td> <td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td> <td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></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>testPageMyAccountBackLink</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 Form View Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/?page=my_account</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_my_account.html']</td>
<td></td>
</tr>
<!-- Header has a link to the front page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='My Account' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='My Account' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?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>testPageMyAccountListLink</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 Form View Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/?page=my_account</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_my_account.html']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Preferences' and contains(@href, '#!push_history') and contains(@href, 'n.page=preference')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Language' and contains(@href, '#!push_history') and contains(@href, 'n.page=language')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Logout' and contains(@href, '#!push_history') and contains(@href, 'n.page=logout')]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@class="ui-btn-icon-left ui-icon-sliders"]</td> <td>//a[@class="ui-btn-icon-left ui-icon-sliders"]</td>
<td>Preferences</td> <td>My Account</td>
</tr> </tr>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//div[@data-gadget-scope='panel']//a[@class="ui-btn-icon-left ui-icon-sliders"]</td> <td>//div[@data-gadget-scope='panel']//a[@class="ui-btn-icon-left ui-icon-sliders"]</td>
<td>pianai</td> <td>wodezhanghao</td>
</tr> </tr>
......
...@@ -20,11 +20,7 @@ ...@@ -20,11 +20,7 @@
<td>${base_url}/web_site_module/renderjs_runner/#/?page=preference</td> <td>${base_url}/web_site_module/renderjs_runner/#/?page=preference</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<!-- Search from the panel --> <!-- Search from the panel -->
<tr> <tr>
...@@ -69,14 +65,10 @@ ...@@ -69,14 +65,10 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//a[text()='Preferences']</td> <td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//a[text()='My Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<!-- Check the the global search link restore the search state --> <!-- Check the the global search link restore the search state -->
<tr> <tr>
......
...@@ -32,6 +32,7 @@ param_dict = [ ...@@ -32,6 +32,7 @@ param_dict = [
{ 'message': 'User', 'translation': 'yonghu', 'language': 'wo'}, { 'message': 'User', 'translation': 'yonghu', 'language': 'wo'},
{ 'message': 'Username', 'translation': u'turu jëfandikookat', 'language': 'wo'}, { 'message': 'Username', 'translation': u'turu jëfandikookat', 'language': 'wo'},
{ 'message': 'Recover your Account', 'translation': u'tëjju barabu këllu jëfandikookat', 'language': 'wo'}, { 'message': 'Recover your Account', 'translation': u'tëjju barabu këllu jëfandikookat', 'language': 'wo'},
{ 'message': 'My Account', 'translation': 'wodezhanghao', 'language': 'wo'},
{ 'message': 'Sort Editor', 'translation': 'paixubianyiqi', 'language': 'wo'}, { 'message': 'Sort Editor', 'translation': 'paixubianyiqi', 'language': 'wo'},
{ 'message': 'Home', 'translation': 'zhuye', 'language': 'wo'}, { 'message': 'Home', 'translation': 'zhuye', 'language': 'wo'},
{ 'message': 'State', 'translation': 'zhuangtai', 'language': 'wo'}, { 'message': 'State', 'translation': 'zhuangtai', 'language': 'wo'},
......
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