Commit 910ce80b authored by Fabien Morin's avatar Fabien Morin

2008-10-01 fabien

* initial version

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23954 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f14a04d
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_ui_test_core</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>"""Set subversion working copy list and enable preference.\n
\n
This script is called by Products.ERP5Type.tests.runFunctionalTest to set\n
subversion working copy paths. It\'s not meant to be called by zelenium tests.\n
"""\n
\n
pref = getattr(context.portal_preferences, "erp5_ui_test_preference", None)\n
if pref is None:\n
pref = context.portal_preferences.newContent(id="erp5_ui_test_preference", portal_type="Preference")\n
pref.setPreferredSubversionWorkingCopyList(tuple(working_copy_list.split(\',\')))\n
pref.enable()\n
\n
return \'Set Preference Successfully.\'\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>working_copy_list</string> </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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>working_copy_list</string>
<string>getattr</string>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
<string>pref</string>
<string>tuple</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BTZuite_setPreference</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</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>portal_tests = container.portal_tests\n
results = [portal_tests.absolute_url() + \'/\' + e for e in portal_tests.objectIds(\'Zuite Results\')]\n
results.reverse()\n
return \'\\n\'.join(results) + \'\\n\'\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>container</string>
<string>portal_tests</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>e</string>
<string>results</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TestTool_getResults</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</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 encoding="cdata"><![CDATA[
# This script is called when you invoke a browser with "?auto=true" to portal_tests.\n
# FIXME: this script should send the result by email.\n
\n
get = request.form.get\n
\n
# Summary.\n
result = [\'Report on Functional Tests\', \'\']\n
result.append(\'Passed: %s\' % (get(\'result\').lower() == \'passed\' and \'Yes\' or \'No\'))\n
result.append(\'Total Time: %s\' % get(\'totalTime\'))\n
result.append(\'Passed Tests: %s\' % get(\'numTestPasses\'))\n
result.append(\'Failed Tests: %s\' % get(\'numTestFailures\'))\n
result.append(\'Passed Commands: %s\' % get(\'numCommandPasses\'))\n
result.append(\'Failed Commands: %s\' % get(\'numCommandFailures\'))\n
result.append(\'Commands with Errors: %s\' % get(\'numCommandErrors\'))\n
result.append(\'\')\n
\n
# Details.\n
table_list = []\n
for key in request.form.keys():\n
if key.startswith(\'testTable\'):\n
prefix, num = key.split(\'.\')\n
table_list.append((prefix, int(num)))\n
table_list.sort()\n
for table in table_list:\n
key = \'%s.%d\' % table\n
html = get(key)\n
\n
# Ugly, but get the title somehow.\n
i = html.index(\'<td\')\n
start = html.index(\'>\', i) + 1\n
end = html.index(\'<\', start)\n
title = html[start:end]\n
\n
# Count passes and failures.\n
num_passed_commands = html.count(\'bgcolor="#cfffcf"\', end)\n
num_failed_commands = html.count(\'bgcolor="#ffcfcf"\', end)\n
result.append(\'%s: %d passed, %d failed\' % (title, num_passed_commands, num_failed_commands))\n
\n
return \'\\n\'.join(result)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>request</string> </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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>request</string>
<string>_getattr_</string>
<string>get</string>
<string>result</string>
<string>table_list</string>
<string>_getiter_</string>
<string>key</string>
<string>prefix</string>
<string>num</string>
<string>int</string>
<string>table</string>
<string>html</string>
<string>i</string>
<string>start</string>
<string>end</string>
<string>_getitem_</string>
<string>title</string>
<string>num_passed_commands</string>
<string>num_failed_commands</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TestTool_reportResult</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</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>portal = context.getPortalObject()\n
if portal.hasProperty(\'erp5_ui_test_base_url\'):\n
portal.manage_changeProperties(erp5_ui_test_base_url=base_url)\n
else:\n
portal.manage_addProperty(\'erp5_ui_test_base_url\', base_url, type=\'string\')\n
\n
return \'Ok\'\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>base_url</string> </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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>base_url</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_setBaseUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</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 encoding="cdata"><![CDATA[
from Products.ERP5Type.Utils import sleep\n
count = 1000\n
while len(context.portal_activities.getMessageList()) > 0:\n
context.portal_activities.process_timer(0, 0)\n
count -= 1\n
sleep()\n
if count < 0:\n
raise RuntimeError, \'tic is endless\'\n
\n
return \'Done.\'\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.ERP5Type.Utils</string>
<string>sleep</string>
<string>count</string>
<string>len</string>
<string>_getattr_</string>
<string>context</string>
<string>_inplacevar_</string>
<string>RuntimeError</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_waitForActivities</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="File" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts22862605.97</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>user-extensions.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/**\n
* Selenium extensions for the ERP5 project\n
*/\n
\n
\n
/**\n
* Checks the element referenced by `locator` is a float equals to `text`.\n
* Values are converted to float, to be format-independant (ie. 1 000 = 1000.0)\n
*/\n
Selenium.prototype.assertFloat = function(locator, text) {\n
var actualValueText = getText(this.page().findElement(locator));\n
var actualValue = parseFloat(actualValueText\n
.replace(/ /g, "").replace(/&nbsp;/g, ""));\n
var expectedValue = parseFloat(text.replace(/ /g, "").replace(/&nbsp;/g, ""));\n
\n
if (isNaN(actualValue)) {\n
Assert.fail("Actual value "+ actualValueText +\n
" cannot be parsed as float");\n
}\n
Assert.matches(expectedValue.toString(), actualValue.toString());\n
};\n
\n
\n
/**\n
* like assertFloat, but for the value of <input elements.\n
*/\n
Selenium.prototype.assertFloatValue = function(locator, text) {\n
var actualValueText = getInputValue(this.page().findElement(locator));\n
var actualValue = parseFloat(actualValueText\n
.replace(/ /g, "").replace(/&nbsp;/g, ""));\n
var expectedValue = parseFloat(text.replace(/ /g, "").replace(/&nbsp;/g, ""));\n
\n
if (isNaN(actualValue)) {\n
Assert.fail("Actual value "+ actualValueText +\n
" cannot be parsed as float");\n
}\n
Assert.matches(expectedValue.toString(), actualValue.toString());\n
};\n
\n
\n
/**\n
* Checks the portal status message.\n
*/\n
Selenium.prototype.assertPortalStatusMessage = function(text) {\n
var psm_locator = "//div[@id=\'transition_message\']";\n
var actualValue = getText(this.page().findElement(psm_locator));\n
Assert.matches(text, actualValue);\n
};\n
\n
\n
Selenium.prototype.doType = function(locator, newText) {\n
netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");\n
var element = this.page().findElement(locator);\n
this.page().replaceText(element, newText);\n
};\n
\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1917</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2008-10-01 fabien
* initial version
\ No newline at end of file
Copyright (C) 2008 Nexedi SA
\ No newline at end of file
erp5_core
erp5_xhtml_style
\ No newline at end of file
Framework for user interface tests.
\ No newline at end of file
GPL
\ No newline at end of file
fabien
\ No newline at end of file
None
\ No newline at end of file
2
\ No newline at end of file
None
\ No newline at end of file
erp5_ui_test_core
\ No newline at end of file
erp5_ui_test_core
\ No newline at end of file
0.1
\ 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