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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
a9f126a2
Commit
a9f126a2
authored
Feb 15, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_js_style: do not redirect to the default page URL when submitting a form
parent
55299097
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1076 additions
and
95 deletions
+1076
-95
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
...ateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
+1
-1
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
...portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
+21
-2
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionFormAndDefaultPage.xml
...s_style_zuite/testJsStyleWebSectionFormAndDefaultPage.xml
+58
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionFormAndDefaultPage.zpt
...s_style_zuite/testJsStyleWebSectionFormAndDefaultPage.zpt
+275
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
...em/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
+21
-2
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.xml
...s/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.xml
+58
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.zpt
...s/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.zpt
+275
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt
...ests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt
+40
-40
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleForm.zpt
...al_tests/js_style_zuite/testJsStyleWebSiteNoStyleForm.zpt
+27
-8
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.xml
...yle_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.xml
+58
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.zpt
...yle_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.zpt
+186
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt
...al_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt
+40
-40
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py
...b_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py
+16
-2
No files found.
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
View file @
a9f126a2
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<form
id=
"main_form"
<form
id=
"main_form"
tal:attributes=
"enctype enctype | form/Form_getEnctype | nothing;
tal:attributes=
"enctype enctype | form/Form_getEnctype | nothing;
action url;
action
python: '%s/' % web_section.absolute_url() if request.get('is_web_section_default_document', False) else
url;
method python:str(path('form/method | string:post')).lower()"
>
method python:str(path('form/method | string:post')).lower()"
>
<input
type=
"hidden"
name=
"dialog_method"
tal:attributes=
"value form/action"
/>
<input
type=
"hidden"
name=
"dialog_method"
tal:attributes=
"value form/action"
/>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
View file @
a9f126a2
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site/erp5_web_js_style_test_section_form
/
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site/erp5_web_js_style_test_section_form
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -105,11 +105,21 @@
...
@@ -105,11 +105,21 @@
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<tr>
<td>
type
</td>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td>
dialog_submit_button
</td>
...
@@ -160,7 +170,7 @@
...
@@ -160,7 +170,7 @@
<tr>
<tr>
<td>
assertValue
</td>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td>
field_your_title
</td>
<td>
Demo Section Form
</td>
<td>
temporary_foo_title
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -174,6 +184,15 @@
...
@@ -174,6 +184,15 @@
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
</tr>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionFormAndDefaultPage.xml
0 → 100644
View file @
a9f126a2
<?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>
testJsStyleWebSectionFormAndDefaultPage
</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_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionFormAndDefaultPage.zpt
0 → 100644
View file @
a9f126a2
<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 JS Style Demo Style
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test JS Style Demo Style
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/ERP5Site_createWebJSStyleZuiteTestData?configuration=form_and_default_page
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Web Site created.
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//head/link[@rel='prerender' and @href='jsstyle_demo.html']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the page content uses the web site
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//button[@id='dialog_submit_button']//span[text()='Do It']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), '')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//head/link[@rel='icon']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), 'Input data has errors. Please look at the error messages below.')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
a
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
b
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), 'Submitted a b')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
View file @
a9f126a2
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site
/
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -105,11 +105,21 @@
...
@@ -105,11 +105,21 @@
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<tr>
<td>
type
</td>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td>
dialog_submit_button
</td>
...
@@ -160,7 +170,7 @@
...
@@ -160,7 +170,7 @@
<tr>
<tr>
<td>
assertValue
</td>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td>
field_your_title
</td>
<td>
Demo Form
</td>
<td>
temporary_foo_title
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -174,6 +184,15 @@
...
@@ -174,6 +184,15 @@
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
</tr>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.xml
0 → 100644
View file @
a9f126a2
<?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>
testJsStyleWebSiteFormAndDefaultPage
</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_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormAndDefaultPage.zpt
0 → 100644
View file @
a9f126a2
<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 JS Style Demo Style
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test JS Style Demo Style
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/ERP5Site_createWebJSStyleZuiteTestData?configuration=form_and_default_page
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Web Site created.
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site/
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//head/link[@rel='prerender' and @href='jsstyle_demo.html']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the page content uses the web site
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//button[@id='dialog_submit_button']//span[text()='Do It']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), '')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//head/link[@rel='icon']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), 'Input data has errors. Please look at the error messages below.')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
a
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
b
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//header/h1[text()='JS Style Demo']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='feed_url' and not(text())]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='render_count'][contains(text(), '1')]
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), 'Submitted a b')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt
View file @
a9f126a2
...
@@ -39,91 +39,91 @@
...
@@ -39,91 +39,91 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag Form']
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag Form']
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='description' and @content='this is a form description']
</td>
<td>
//meta[@name='description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:description' and @content='this is a form description']
</td>
<td>
//meta[@property='og:description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:description' and @content='this is a form description']
</td>
<td>
//meta[@name='twitter:description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:locale' and @content='en_US']
</td>
<td>
//meta[@property='og:locale' and @content='en_US']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -141,91 +141,91 @@
...
@@ -141,91 +141,91 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag Form']
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag Form']
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='description' and @content='this is a form description']
</td>
<td>
//meta[@name='description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:description' and @content='this is a form description']
</td>
<td>
//meta[@property='og:description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:description' and @content='this is a form description']
</td>
<td>
//meta[@name='twitter:description' and @content='this is a form description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:locale' and @content='fr_FR']
</td>
<td>
//meta[@property='og:locale' and @content='fr_FR']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -243,62 +243,62 @@
...
@@ -243,62 +243,62 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Demo Section 1']
</td>
<td>
//meta[@property='og:title' and @content='Demo Section 1']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Demo Section 1']
</td>
<td>
//meta[@name='twitter:title' and @content='Demo Section 1']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag Form']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleForm.zpt
View file @
a9f126a2
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- Initialize -->
<!-- Initialize -->
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site
/
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -60,12 +60,12 @@
...
@@ -60,12 +60,12 @@
<td
colspan=
"3"
><b>
Check the form content
</b></td>
<td
colspan=
"3"
><b>
Check the form content
</b></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_site
</td>
<td>
erp5_web_js_style_test_site
</td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_title
</td>
<td>
field_your_title
</td>
<td>
No Style Form
</td>
<td>
No Style Form
</td>
</tr>
</tr>
...
@@ -78,11 +78,21 @@
...
@@ -78,11 +78,21 @@
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<tr>
<td>
type
</td>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<tr>
<td>
clickAndWait
</td>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td>
dialog_submit_button
</td>
...
@@ -90,14 +100,14 @@
...
@@ -90,14 +100,14 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_title
</td>
<td>
field_your_title
</td>
<td>
No Style Form
</td>
<td>
temporary_foo_title
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -116,6 +126,15 @@
...
@@ -116,6 +126,15 @@
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
</tr>
...
@@ -136,12 +155,12 @@
...
@@ -136,12 +155,12 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_id
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_site
</td>
<td>
erp5_web_js_style_test_site
</td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
Value
</td>
<td>
assert
Value
</td>
<td>
field_your_title
</td>
<td>
field_your_title
</td>
<td>
No Style Form
</td>
<td>
No Style Form
</td>
</tr>
</tr>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.xml
0 → 100644
View file @
a9f126a2
<?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>
testJsStyleWebSiteNoStyleFormAndDefaultPage
</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_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNoStyleFormAndDefaultPage.zpt
0 → 100644
View file @
a9f126a2
<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 JS Style Demo Style
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test JS Style Demo Style
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/ERP5Site_createWebJSStyleZuiteTestData?configuration=nostyleform_and_default_page
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Web Site created.
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_web_js_style_test_site/
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//head/link[@rel='prerender']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//head/link[@rel='alternate' and @type='application/rss+xml' and @href='feed.rss']
</td>
<td></td>
</tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
No Style Form
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check no document list is rendered
</b></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//aside[@id='document_list']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form content
</b></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//button[@id='dialog_submit_button']//span[text()='Do It']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form validation
</b></td>
</tr>
<tr>
<td>
store
</td>
<td>
javascript{selenium.browserbot.currentWindow.location.href}
</td>
<td>
original_form_location
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td>
temporary_foo_title
</td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='information_area' and contains(text(), 'Input data has errors. Please look at the error messages below.')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), '')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form URL is stable during validation
</b></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function() {return selenium.browserbot.currentWindow.location.href;})()
<td>
${original_form_location}
</td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check the form submission
</b></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_id
</td>
<td>
a
</td>
</tr>
<tr>
<td>
type
</td>
<td>
field_your_title
</td>
<td>
b
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
dialog_submit_button
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_id
</td>
<td>
erp5_web_js_style_test_frontpage
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_your_title
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//p[@id='information_area']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='portal_status_message' and contains(text(), 'Submitted a b')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//span[@class='error' and contains(text(), 'Input is required but no input given.')]
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt
View file @
a9f126a2
...
@@ -39,91 +39,91 @@
...
@@ -39,91 +39,91 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag']
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag']
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='description' and @content='this is a description']
</td>
<td>
//meta[@name='description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:description' and @content='this is a description']
</td>
<td>
//meta[@property='og:description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:description' and @content='this is a description']
</td>
<td>
//meta[@name='twitter:description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:locale' and @content='en_US']
</td>
<td>
//meta[@property='og:locale' and @content='en_US']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -141,91 +141,91 @@
...
@@ -141,91 +141,91 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag']
</td>
<td>
//meta[@property='og:title' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag']
</td>
<td>
//meta[@name='twitter:title' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='description' and @content='this is a description']
</td>
<td>
//meta[@name='description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:description' and @content='this is a description']
</td>
<td>
//meta[@property='og:description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:description' and @content='this is a description']
</td>
<td>
//meta[@name='twitter:description' and @content='this is a description']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td>
//meta[@name='keywords' and @content='keyword1,keyword2']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:locale' and @content='fr_FR']
</td>
<td>
//meta[@property='og:locale' and @content='fr_FR']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -243,62 +243,62 @@
...
@@ -243,62 +243,62 @@
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td>
//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:title' and @content='Demo Section 1']
</td>
<td>
//meta[@property='og:title' and @content='Demo Section 1']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:title' and @content='Demo Section 1']
</td>
<td>
//meta[@name='twitter:title' and @content='Demo Section 1']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td>
//meta[@property='og:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td>
//meta[@name='twitter:image' and @content='favicon.ico']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td>
//meta[@name='application-name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td>
//meta[@property='og:site_name' and @content='Meta Tag']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verify
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td>
//meta[@property='og:type' and @content='website']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
...
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py
View file @
a9f126a2
...
@@ -183,6 +183,12 @@ configuration_dict = {
...
@@ -183,6 +183,12 @@ configuration_dict = {
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'site_map_section_parent'
:
True
'site_map_section_parent'
:
True
},
},
'nostyleform_and_default_page'
:
{
'title'
:
"No Style Form"
,
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'site_map_section_parent'
:
True
,
'aggregate_value'
:
module
.
restrictedTraverse
(
web_page_frontend_en_id
)
},
'section'
:
{
'section'
:
{
'configuration_style_gadget_url'
:
"jsstyle_demo.html"
,
'configuration_style_gadget_url'
:
"jsstyle_demo.html"
,
'title'
:
"Demo Style"
,
'title'
:
"Demo Style"
,
...
@@ -254,6 +260,13 @@ configuration_dict = {
...
@@ -254,6 +260,13 @@ configuration_dict = {
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'site_map_section_parent'
:
True
'site_map_section_parent'
:
True
},
},
'form_and_default_page'
:
{
'configuration_style_gadget_url'
:
"jsstyle_demo.html"
,
'title'
:
"Demo Form"
,
'custom_render_method_id'
:
'WebSite_viewJSStyleTestDialog'
,
'site_map_section_parent'
:
True
,
'aggregate_value'
:
module
.
restrictedTraverse
(
web_page_frontend_en_id
)
},
'empty_sitemap'
:
{
'empty_sitemap'
:
{
'title'
:
'Empty Sitemap'
,
'title'
:
'Empty Sitemap'
,
'configuration_style_gadget_url'
:
"jsstyle_demo.html"
'configuration_style_gadget_url'
:
"jsstyle_demo.html"
...
@@ -298,12 +311,13 @@ web_site.newContent(
...
@@ -298,12 +311,13 @@ web_site.newContent(
visible
=
True
visible
=
True
)
)
if
configuration
==
'form'
:
if
configuration
in
(
'form'
,
'form_and_default_page'
)
:
web_site
.
newContent
(
web_site
.
newContent
(
portal_type
=
web_section_portal_type
,
portal_type
=
web_section_portal_type
,
id
=
'%sform'
%
web_section_id_prefix
,
id
=
'%sform'
%
web_section_id_prefix
,
title
=
"Demo Section Form"
,
title
=
"Demo Section Form"
,
custom_render_method_id
=
'WebSite_viewJSStyleTestDialog'
custom_render_method_id
=
'WebSite_viewJSStyleTestDialog'
,
aggregate_value
=
web_site
.
getAggregateValue
()
)
)
return
"Web Site created."
return
"Web Site created."
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