Commit 53528a41 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add a test to confirm if we have 'view' after clicking 'Save & View' button.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28950 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c199bff5
<?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_web_page</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/WebPage_viewEditor?editable_mode:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_editAndViewAsWeb:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Data updated.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTitle</td>\n
<td>Web Page - test_web_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/test_web_page/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>testWebPaveSaveAndView</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>web_page = context.newContent(portal_type=\'Web Page\', id=id, reference=reference)\n
return "Created Successfully."\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>id=id, reference=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>id</string>
<string>reference</string>
<string>_getattr_</string>
<string>context</string>
<string>web_page</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<global name="id" module="__builtin__"/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPageModule_createTestWebPage</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -54,22 +54,29 @@
<item>
<key> <string>_body</string> </key>
<value> <string># Reset everything for the test.\n
portal = context.getPortalObject()\n
\n
# Clean up the contents.\n
if context.has_key(\'test_web_site\'):\n
context.manage_delObjects(\'test_web_site\')\n
if portal.web_site_module.has_key(\'test_web_site\'):\n
portal.web_site_module.manage_delObjects(\'test_web_site\')\n
\n
if context.has_key(\'web_site_test\'):\n
context.manage_delObjects(\'web_site_test\')\n
if portal.web_site_module.has_key(\'web_site_test\'):\n
portal.web_site_module.manage_delObjects(\'web_site_test\')\n
\n
if context.has_key(\'test_web_site_2\'):\n
context.manage_delObjects(\'test_web_site_2\')\n
if portal.web_site_module.has_key(\'test_web_site_2\'):\n
portal.web_site_module.manage_delObjects(\'test_web_site_2\')\n
\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
\n
# Create new users\n
if not context.person_module.has_key(\'test_webmaster\'):\n
person = context.person_module.newContent(id=\'test_webmaster\', portal_type=\'Person\')\n
if not portal.person_module.has_key(\'test_webmaster\'):\n
person = portal.person_module.newContent(id=\'test_webmaster\', portal_type=\'Person\')\n
else:\n
person = context.person_module.test_webmaster\n
person = portal.person_module.test_webmaster\n
person.edit(first_name=\'Test\', last_name=\'Webmaster\',\n
reference=\'test_webmaster\', password=\'test_webmaster\')\n
person.setRole(\'internal\')\n
......@@ -130,6 +137,7 @@ return \'Reset Successfully.\'\n
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>person</string>
<string>len</string>
<string>assignment</string>
......
17
\ No newline at end of file
18
\ 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