Commit 2e501ad4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add a test to confirm if 'clone' works fine for web pages accessed by...

add a test to confirm if 'clone' works fine for web pages accessed by reference whose parent url is a web page.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28955 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2ed1895f
<?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&amp;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&amp;reference=test_page&amp;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&amp;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>
......@@ -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 @@ return "Created Successfully."\n
</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 @@ return "Created Successfully."\n
<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 @@ return "Created Successfully."\n
<tuple>
<string>id</string>
<string>reference</string>
<string>publish</string>
<string>_getattr_</string>
<string>context</string>
<string>web_page</string>
......@@ -118,6 +121,7 @@ return "Created Successfully."\n
<tuple>
<global name="id" module="__builtin__"/>
<none/>
<int>0</int>
</tuple>
</value>
</item>
......
......@@ -69,8 +69,9 @@ if portal.web_site_module.has_key(\'test_web_site_2\'):\n
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 @@ return \'Reset Successfully.\'\n
<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>
......
18
\ No newline at end of file
19
\ No newline at end of file
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