Commit 35ab3cd1 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin Committed by Łukasz Nowak

Add vifib_web_ui_test bt

parent 55925702
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_web_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Instanciation tests</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_web_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Skin Folder for Vifib Interface tests</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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[
#Couldn\'t make query work so feel free to modify this script\n
#from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ERP5Type.DateUtils import createDateTimeFromMillis \n
\n
instance_list = [\'empty\']\n
time = DateTime().millis() - 1800000\n
#query = Query(**{\'delivery.start_date\':createDateTimeFromMillis(time), \'range\':\'ngt\'})\n
\n
for document in context.portal_catalog.searchResults(portal_type="Software Instance", client="First Name Last Name"):\n
instance = document.getObject()\n
instanceCreationDate = instance.getCreationDate()\n
if time >= instanceCreationDate.millis():\n
if instance.SoftwareInstance_getStatus() not in ("Destroyed", "Destruction in progress", "Instanciation in progress"):\n
try:\n
instance.requestDestroyComputerPartition()\n
except:\n
instance_list.append(["Couldn\'t destroy instance %s with status %s" % (instance.getReference(), instance.SoftwareInstance_getStatus())])\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_deleteTestDocument</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>"""\n
Check if the instance has the right status\n
"""\n
request = context.REQUEST\n
instance_reference = request.get("instance_reference")\n
instance = context.portal_catalog.searchResults(portal_type="Software Instance", reference=instance_reference)[0].getObject()\n
\n
return instance.SoftwareInstance_getStatus()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getInstanceStatus</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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[
"""\n
We wait until all activities are finished\n
"""\n
if len(context.portal_activities.getMessageList()) > 0:\n
return \'False.\'\n
else:\n
return \'True.\'\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_hasFinishedProcessingActivity</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>"""\n
Storage for the login and password of the test user\n
"""\n
\n
return {\'test_user_login\' :\'test_customer_vifib_web\',\n
\'test_user_password\': \'testuser\'}\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Vifib_testUserInfo</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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> <unicode encoding="cdata"><![CDATA[
<tal:block metal:define-macro="init_environment">\n
<!-- Initialize test environment -->\n
<tr>\n
<td>setTimeout</td>\n
<td>120000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>store</td>\n
<td tal:content="python:\n
context.REQUEST.get(\'URL\')[0:here.REQUEST.get(\'URL\').find(\'/portal_tests/\')]">erp5</td>\n
<td>base_url</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/web_site_module/hosting</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
\n
<tal:block metal:define-macro="finished_processing_activities">\n
<!-- We wait for zope to finish his activities processing -->\n
<tr>\n
<td>storeAttribute</td>\n
<td>//head/base@href</td>\n
<td>address</td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>new Ajax.Request(\'ERP5Site_hasFinishedProcessingActivity\',\n
{asynchronous: false}).transport.responseText === "True."; var i;\n
for (i = 0; i < 10000000; i++){};</td>\n
<td>120000</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
\n
<tal:block metal:define-macro="check_for_started_instance">\n
<!-- Wait until the instance is Started -->\n
<tr>\n
<td>storeAttribute</td>\n
<td>//head/base@href</td>\n
<td>address</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}/getReference</td>\n
<td></td>\n
</tr>\n
<tr> \n
<td>storeText</td>\n
<td>//body/pre</td>\n
<td>instance_reference</td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>new\n
Ajax.Request(\'ERP5Site_getInstanceStatus?instance_reference=${instance_reference}\',\n
{asynchronous: false}).transport.responseText === "Started"; var i;\n
for (i = 0; i < 10000000; i++){};</td>\n
<td>600000</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
\n
<tal:block metal:define-macro="destroy_instance">\n
<!-- Order the destruction of the instance and check for it -->\n
<tr>\n
<td>assertElementPresent</td>\n
<td>name=SoftwareInstance_requestDestroy:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>name=SoftwareInstance_requestDestroy:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//head/base@href</td>\n
<td>address</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}/getReference</td>\n
<td></td>\n
</tr>\n
<tr> \n
<td>storeText</td>\n
<td>//body/pre</td>\n
<td>instance_reference</td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>new\n
Ajax.Request(\'ERP5Site_getInstanceStatus?instance_reference=${instance_reference}\',\n
{asynchronous: false}).transport.responseText === "Destroyed"; var\n
i; for (i = 0; i < 10000000; i++){};</td>\n
<td>600000</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}</td>\n
<td></td>\n
</tr>\n
</tal:block>
]]></unicode> </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>Zuite_vifib_instanciation_macro_library</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2011-11-01 Cedric
* Initial version
\ No newline at end of file
Nexedi SA 2011
\ No newline at end of file
vifib_web
erp5_ui_test
\ No newline at end of file
Selenium tests for Vifib web interface
\ No newline at end of file
GPL
\ No newline at end of file
Vivien Alger
Cedric de Saint Martin
\ No newline at end of file
5
\ No newline at end of file
portal_tests/vifib_web_zuite
portal_tests/vifib_web_zuite/**
\ No newline at end of file
vifib_web_ui_test
\ No newline at end of file
vifib_web_ui_test
\ No newline at end of file
001
\ 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