Commit 802b79e0 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_panel_ui_test: Create use different project title every run

   Otherwise, whenever you run the tests multiple times, it ends up failing by selecting the wrong one on the listbox.
parent 89cea970
......@@ -22,7 +22,8 @@ def ERP5Site_activateAlarmSlapOSPanelTest(self):
def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login,
manager_login, remote_customer_login,
passwd, currency=None):
passwd, currency=None,
project_title='Test Project'):
if step not in ['trade_condition', 'account']:
raise ValueError('Unsupported bootstrap step: %s' % step)
......@@ -191,7 +192,7 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login,
# Create Project
project = manager_person.Person_addVirtualMaster(
'Test Project',
project_title,
scenario == 'accounting',
scenario == 'accounting',
currency.getRelativeUrl(),
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -195,7 +195,7 @@
<td colspan="3"><b>Go to the project page</b></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -292,7 +292,7 @@
</tr>
<tr>
<td>click</td>
<td>//label[text()='Test Project']</td>
<td tal:content="python: '//label[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -202,7 +202,7 @@
</tr>
<tr>
<td>click</td>
<td>//label[text()='Test Project']</td>
<td tal:content="python: '//label[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......@@ -319,7 +319,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -385,7 +385,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -114,7 +114,7 @@
<tr>
<td>select</td>
<td>//select[@name='field_your_destination_project']</td>
<td>Test Project</td>
<td tal:content="python: user_configuration['project_title']"></td>
</tr>
<tr>
<td>type</td>
......@@ -329,7 +329,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//a[text()='Test Project']</td>
<td tal:content="python: '//a[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -115,7 +115,7 @@
<tr>
<td>select</td>
<td>//select[@name='field_your_destination_project']</td>
<td>Test Project</td>
<td tal:content="python: user_configuration['project_title']"></td>
</tr>
<tr>
<td>type</td>
......@@ -333,7 +333,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//a[text()='Test Project']</td>
<td tal:content="python: '//a[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -197,7 +197,7 @@
</tr>
<tr>
<td>click</td>
<td>//label[text()='Test Project']</td>
<td tal:content="python: '//label[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -92,10 +92,8 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
</tr>
......@@ -212,7 +210,7 @@
<td colspan="3"><b>Go to the project page</b></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -373,7 +371,7 @@
</tr>
<tr>
<td>click</td>
<td>//label[text()='Test Project']</td>
<td tal:content="python: '//label[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......
......@@ -41,7 +41,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......
......@@ -31,8 +31,6 @@
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/login" />
</tal:block>
<tr>
<td colspan="3"><b>Go to the project page</b></td>
</tr>
......@@ -41,7 +39,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -57,7 +55,6 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Back to the project</b></td>
</tr>
......@@ -66,9 +63,6 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a compute node</b></td>
</tr>
......@@ -196,7 +190,7 @@
</tr>
<tr>
<td>click</td>
<td>//label[text()='Test Project']</td>
<td tal:content="python: '//label[text()=\'%s\']' % user_configuration['project_title']"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......@@ -286,7 +280,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -301,7 +295,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Allocation Supply related to Project : Test Project.'}">
'text': 'Allocation Supply related to Project : %s.' % user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -326,7 +320,7 @@
<tr>
<td colspan="3"><b>Back to the project</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -419,7 +413,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block tal:define="click_configuration python: {'text': user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -434,7 +428,7 @@
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Upgrade Decision related to Project : Test Project.'}">
'text': 'Upgrade Decision related to Project : %s.' % user_configuration['project_title']}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......
......@@ -6,5 +6,6 @@ return {
'customer_login': 'testcustomer%s' % now,
'remote_customer_login': 'testremotecustomer%s' % now,
'manager_login': 'testmanager%s' % now,
'passwd': 'eiChaxo5Eefier9vAek7phie$%s' % now
'passwd': 'eiChaxo5Eefier9vAek7phie$%s' % now,
'project_title': 'TestProject%s' % now
}
......@@ -6,18 +6,18 @@
</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"/>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple/>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
......
......@@ -11,7 +11,7 @@
<tr>
<td>open</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?step=trade_condition&scenario=%s&manager_login=%s&customer_login=%s&remote_customer_login=%s&passwd=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['remote_customer_login'], user_configuration['passwd'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?step=trade_condition&scenario=%s&manager_login=%s&customer_login=%s&remote_customer_login=%s&passwd=%s&project_title=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['remote_customer_login'], user_configuration['passwd'], user_configuration['project_title'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
......@@ -23,7 +23,7 @@
<tr>
<td>open</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?step=account&scenario=%s&manager_login=%s&customer_login=%s&remote_customer_login=%s&passwd=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['remote_customer_login'], user_configuration['passwd'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?step=account&scenario=%s&manager_login=%s&customer_login=%s&remote_customer_login=%s&passwd=%s&project_title=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['remote_customer_login'], user_configuration['passwd'], user_configuration['project_title'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
......
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