Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
7ac1453e
Commit
7ac1453e
authored
Aug 29, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_render_js_ui_test: add test for router's display_erp5_action command
parent
0009986c
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
813 additions
and
1 deletion
+813
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_router_zuite/testCommandDisplayAction.xml
...sts/renderjs_ui_router_zuite/testCommandDisplayAction.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_router_zuite/testCommandDisplayAction.zpt
...sts/renderjs_ui_router_zuite/testCommandDisplayAction.zpt
+52
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.html
...em/web_page_module/gadget_erp5_page_router_test_html.html
+30
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.xml
...tem/web_page_module/gadget_erp5_page_router_test_html.xml
+322
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.js
...teItem/web_page_module/gadget_erp5_page_router_test_js.js
+30
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.xml
...eItem/web_page_module/gadget_erp5_page_router_test_js.xml
+318
-0
bt5/erp5_web_renderjs_ui_test/bt/template_keep_last_workflow_history_only_path_list
...est/bt/template_keep_last_workflow_history_only_path_list
+1
-0
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
+2
-1
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_router_zuite/testCommandDisplayAction.xml
0 → 100644
View file @
7ac1453e
<?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>
testCommandDisplayAction
</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>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_router_zuite/testCommandDisplayAction.zpt
0 → 100644
View file @
7ac1453e
<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 Command Display Action
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Command Display Action
</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/#/?page=router_test
</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[@class="result-block"]//p[@class="result-0"]
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Test 0
</td>
<td></td>
</tr>
<!-- Test Link to Module Action -->
<tr>
<td>
click
</td>
<td>
//div[@class="result-block"]//p[@class="result-0"]//a[text()="Link 0"]
</td>
<td></td>
</tr>
<!-- Check redirection to dialog happened -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_dialog_loaded"
/>
<tr>
<td>
assertTextPresent
</td>
<td>
Do Massively nothing
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.html
0 → 100644
View file @
7ac1453e
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Router test
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_page_router_test.js"
type=
"text/javascript"
></script>
<script
id=
"result-list-template"
type=
"text/x-handlebars-template"
>
<
p
class
=
"
result-{{i}}
"
>
Test
{{
i
}}
:
<
a
href
=
"
{{link}}
"
>
Link
{{
i
}}
<
/a
>
<
/p
>
</script>
</head>
<body>
<h2>
Test router commands. Each line is the result of a test
</h2>
<div
class=
'result-block'
>
<p>
Test 1 :
<a
href=
"#"
>
Link 1
</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.xml
0 → 100644
View file @
7ac1453e
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.js
0 → 100644
View file @
7ac1453e
/*global window, rJS, RSVP, Handlebars */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
template_element
=
gadget_klass
.
__template_element
,
result_list_template
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
result-list-template
"
)
.
innerHTML
);
gadget_klass
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
,
result_inner_html
=
""
;
return
gadget
.
getUrlFor
({
command
:
'
display_erp5_action
'
,
options
:
{
jio_key
:
"
foo_module
"
,
page
:
"
empty_mass_action
"
}})
.
push
(
function
(
link
)
{
gadget
.
element
.
querySelector
(
"
.result-block
"
).
innerHTML
=
result_list_template
({
"
i
"
:
0
,
"
link
"
:
link
});
});
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.xml
0 → 100644
View file @
7ac1453e
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui_test/bt/template_keep_last_workflow_history_only_path_list
0 → 100644
View file @
7ac1453e
web_page_module/**
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
View file @
7ac1453e
...
...
@@ -46,3 +46,4 @@ portal_tests/renderjs_ui_translate_zuite
portal_tests/renderjs_ui_translate_zuite/**
portal_tests/renderjs_ui_zuite
portal_tests/renderjs_ui_zuite/**
web_page_module/gadget_erp5_page_router_test_*
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment