diff --git a/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPaveSaveAndView.xml b/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPaveSaveAndView.xml new file mode 100644 index 0000000000000000000000000000000000000000..793369318fdce897d590e541193a0af2f4ee6c61 --- /dev/null +++ b/bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPaveSaveAndView.xml @@ -0,0 +1,141 @@ +<?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_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> diff --git a/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml new file mode 100644 index 0000000000000000000000000000000000000000..2351cdf2491e6e583a058638a17f9405625eb1b4 --- /dev/null +++ b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebPageModule_createTestWebPage.xml @@ -0,0 +1,137 @@ +<?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> diff --git a/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml index 7896cc5ce97866f60f6eb40d9fc13285613d726e..18d8b30b57babf23e00d16d77bfe40b7bb081535 100644 --- a/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml +++ b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml @@ -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> diff --git a/bt5/erp5_web_ui_test/bt/revision b/bt5/erp5_web_ui_test/bt/revision index 8e2afd342773582f9484b796cdc0b84736e8194e..25bf17fc5aaabd17402e77a2b16f95fbea7310d2 100644 --- a/bt5/erp5_web_ui_test/bt/revision +++ b/bt5/erp5_web_ui_test/bt/revision @@ -1 +1 @@ -17 \ No newline at end of file +18 \ No newline at end of file