Commit 5bc5f0f9 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel_ui_test: fixup accounting scenario

parent 697b6489
...@@ -43,19 +43,23 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login, ...@@ -43,19 +43,23 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login,
# Ensure checkConsistency is OK on the website installed by ui_test bt5 # Ensure checkConsistency is OK on the website installed by ui_test bt5
portal.portal_alarms.upgrader_check_post_upgrade.activeSense( portal.portal_alarms.upgrader_check_post_upgrade.activeSense(
fixit=True) fixit=True)
# Organisation
organisation = portal.organisation_module.newContent(
portal_type="Organisation",
title="Test accounting organisation"
)
# Currency # Currency
currency = portal.currency_module.newContent( currency = portal.currency_module.newContent(
portal_type="Currency", portal_type="Currency",
title="Test currency" title="Test currency",
reference="Test currency"
) )
currency.validate()
# Organisation
organisation = portal.organisation_module.newContent(
portal_type="Organisation",
title="Test accounting organisation",
price_currency_value=currency
)
organisation.validate()
# Sale trade condition # Sale trade condition
trade_condition = portal.sale_trade_condition_module.newContent( trade_condition = portal.sale_trade_condition_module.newContent(
...@@ -153,6 +157,13 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login, ...@@ -153,6 +157,13 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, step, scenario, customer_login,
destination_project_value=project, destination_project_value=project,
function='production/manager' function='production/manager'
).open() ).open()
if scenario == 'accounting':
manager_person.newContent(
portal_type='Assignment',
title='Sale',
function='sale/manager'
).open()
customer_person.newContent( customer_person.newContent(
portal_type='Assignment', portal_type='Assignment',
title='Customer for project %s' % project.getTitle(), title='Customer for project %s' % project.getTitle(),
......
...@@ -202,7 +202,6 @@ ...@@ -202,7 +202,6 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr> <tr>
<td colspan="3"><b>Activate Allocation Supply</b></td> <td colspan="3"><b>Activate Allocation Supply</b></td>
</tr> </tr>
...@@ -228,7 +227,7 @@ ...@@ -228,7 +227,7 @@
<!--tr> <tr>
<td colspan="3"><b>Create Sale Supply</b></td> <td colspan="3"><b>Create Sale Supply</b></td>
</tr> </tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Sale Supply'}"> <tal:block tal:define="click_configuration python: {'text': 'Add Sale Supply'}">
...@@ -269,6 +268,18 @@ ...@@ -269,6 +268,18 @@
<tr>
<td colspan="3"><b>Define Sale Supply currency</b></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_my_price_currency']</td>
<td>Test currency</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr> <tr>
<td colspan="3"><b>Activate Sale Supply</b></td> <td colspan="3"><b>Activate Sale Supply</b></td>
</tr> </tr>
...@@ -279,7 +290,7 @@ ...@@ -279,7 +290,7 @@
<tal:block tal:define="notification_configuration python: {'class': 'success', <tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Sale Supply validated.'}"> 'text': 'Sale Supply validated.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block--> </tal:block>
......
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