Commit e98c6db2 authored by Jérome Perrin's avatar Jérome Perrin

ui_test: add missing zelenium test for reinstall business template

parent 02c1724d
<?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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>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>testReinstallBusinessTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Re-install Business Template</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_and_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_and_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/BTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_setUpBusinessTemplateReinstallTest</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Setup OK</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>select_action</td>
<td>Re-install Business Template</td>
</tr>
<tr>
<tr>
<td>assertText</td>
<td>//button[@name="Base_callDialogMethod:method"]/span</td>
<td>Re-install Business Template</td>
</tr>
<tr>
<td>assertText</td>
<td>css=.listbox-current-page-total-number</td>
<td> 1 records </td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[1]</td>
<td>portal_skins/erp5_test/test_file</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[2]</td>
<td>Skin</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[3]</td>
<td>Modified</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[4]/label</td>
<td>Backup And Upgrade</td>
</tr>
<tr>
<td>assertChecked</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[4]/label/input</td>
<td></td>
</tr>
<!-- preview diff -->
<tr>
<td>clickAndWait</td>
<td>//tr[@class="listbox-data-line-0 DataA"]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>modified !</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>test1\n</td>
<td></td>
</tr>
<tr>
<td>goBack</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>//button[@name="Base_callDialogMethod:method"]/span</td>
<td>Re-install Business Template</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Status changed.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/portal_skins/erp5_test/test_file</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>test2</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td tal:content="string: ${here/portal_url}/foo_module/BTZuite_reset?end=1"/>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
</body>
</html>
\ No newline at end of file
"""Installs test_core and make local change, so that later we can reinstall
and see that our local changes are gone.
"""
portal = context.getPortalObject()
portal.portal_templates.installBusinessTemplateListFromRepository(['test_core'])
bt = portal.portal_templates.getInstalledBusinessTemplate('test_core')
portal.portal_skins.erp5_test.test_file.manage_edit(
title='',
content_type='text/plain',
filedata='modified !'
)
return bt.Base_redirect('view', keep_items={'portal_status_message': 'Setup OK'})
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_setUpBusinessTemplateReinstallTest</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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