[Erp5-report] r28955 - in /erp5/trunk/bt5/erp5_web_ui_test: PathTemplateItem/portal_tests/e...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Sep 11 15:00:03 CEST 2009
Author: kazuhiko
Date: Fri Sep 11 15:00:01 2009
New Revision: 28955
URL: http://svn.erp5.org?rev=28955&view=rev
Log:
add a test to confirm if 'clone' works fine for web pages accessed by reference whose parent url is a web page.
Added:
erp5/trunk/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageClone.xml
Modified:
erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml
erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml
erp5/trunk/bt5/erp5_web_ui_test/bt/revision
Added: erp5/trunk/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageClone.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageClone.xml?rev=28955&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageClone.xml (added)
+++ erp5/trunk/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageClone.xml [utf8] Fri Sep 11 15:00:01 2009
@@ -1,0 +1,158 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+ xmlns:metal="http://xml.zope.org/namespaces/metal">\n
+<head>\n
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
+<title>Test Previous Next Selection In Website</title>\n
+</head>\n
+<body>\n
+<table cellpadding="1" cellspacing="1" border="1">\n
+<thead>\n
+<tr><td rowspan="1" colspan="3">Test Change Id Website</td></tr>\n
+</thead><tbody>\n
+<tal:block metal:use-macro="here/Zuite_erp5_web_common/macros/init" />\n
+<tr>\n
+ <td>open</td>\n
+ <td>${base_url}/web_site_module/WebSiteModule_createTestSite?id=test_web_site&title=Test Web Site</td>\n
+ <td></td>\n
+ <td>Create a new site</td>\n
+</tr>\n
+<tr>\n
+ <td>assertTextPresent</td>\n
+ <td>Created Successfully.</td>\n
+ <td></td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>open</td>\n
+ <td>${base_url}/web_page_module/WebPageModule_createTestWebPage?id=test_web_page&reference=test_page&publish:int=1</td>\n
+ <td></td>\n
+ <td>Create a new site</td>\n
+</tr>\n
+<tr>\n
+ <td>assertTextPresent</td>\n
+ <td>Created Successfully.</td>\n
+ <td></td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>open</td>\n
+ <td>${base_url}/web_page_module/WebPageModule_createTestWebPage?id=test_web_page_2&reference=test_page_2</td>\n
+ <td></td>\n
+ <td>Create a new site</td>\n
+</tr>\n
+<tr>\n
+ <td>assertTextPresent</td>\n
+ <td>Created Successfully.</td>\n
+ <td></td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>open</td>\n
+ <td>${base_url}/web_site_module/Zuite_waitForActivities</td>\n
+ <td></td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>assertTextPresent</td>\n
+ <td>Done.</td>\n
+ <td></td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>open</td>\n
+ <td>${base_url}/web_site_module/test_web_site/web_page_module/test_web_page_2/test_page</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>type</td>\n
+ <td>//input[@name="clone_version"]</td>\n
+ <td>1</td>\n
+</tr>\n
+<tr>\n
+ <td>clickAndWait</td>\n
+ <td>//button[@name="Base_cloneContent:method"]</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>assertTextPresent</td>\n
+ <td>Created Clone Web Page.</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>assertTitle</td>\n
+ <td>Web Page - test_page | ERP5</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>assertLocation</td>\n
+ <td>${base_url}/web_site_module/test_web_site/web_page_module/*/view*</td>\n
+ <td></td>\n
+</tr>\n
+</tbody></table>\n
+</body>\n
+</html>\n
+
+
+]]></string> </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>testWebPageClone</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml?rev=28955&r1=28954&r2=28955&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml [utf8] Fri Sep 11 15:00:01 2009
@@ -54,6 +54,8 @@
<item>
<key> <string>_body</string> </key>
<value> <string>web_page = context.newContent(portal_type=\'Web Page\', id=id, reference=reference)\n
+if publish:\n
+ web_page.publish()\n
return "Created Successfully."\n
</string> </value>
</item>
@@ -65,7 +67,7 @@
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>id=id, reference=None</string> </value>
+ <value> <string>id=id, reference=None, publish=False</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
@@ -93,7 +95,7 @@
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>2</int> </value>
+ <value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
@@ -101,6 +103,7 @@
<tuple>
<string>id</string>
<string>reference</string>
+ <string>publish</string>
<string>_getattr_</string>
<string>context</string>
<string>web_page</string>
@@ -118,6 +121,7 @@
<tuple>
<global name="id" module="__builtin__"/>
<none/>
+ <int>0</int>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml?rev=28955&r1=28954&r2=28955&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml [utf8] Fri Sep 11 15:00:01 2009
@@ -69,8 +69,9 @@
if portal.web_site_module.has_key(\'test_web_site\'):\n
portal.web_site_module.manage_delObjects(\'test_web_site\')\n
\n
-if portal.web_page_module.has_key(\'test_web_page\'):\n
- portal.web_page_module.manage_delObjects(\'test_web_page\')\n
+portal.web_page_module.manage_delObjects(\n
+ [x.getId() for x in portal.web_page_module.objectValues() \\\n
+ if x.getTitle().startswith(\'test_\')])\n
\n
# Create new users\n
if not portal.person_module.has_key(\'test_webmaster\'):\n
@@ -138,6 +139,10 @@
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>x</string>
<string>person</string>
<string>len</string>
<string>assignment</string>
Modified: erp5/trunk/bt5/erp5_web_ui_test/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ui_test/bt/revision?rev=28955&r1=28954&r2=28955&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ui_test/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ui_test/bt/revision [utf8] Fri Sep 11 15:00:01 2009
@@ -1,1 +1,1 @@
-18
+19
More information about the Erp5-report
mailing list