Commit 940f67bf authored by Łukasz Nowak's avatar Łukasz Nowak

Check that admin can observe payment.

parent 91ef5fc9
...@@ -983,6 +983,49 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin): ...@@ -983,6 +983,49 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
self.assertEquals('account_module/bank', sale_line.getSource()) self.assertEquals('account_module/bank', sale_line.getSource())
self.assertEquals('account_module/bank', sale_line.getDestination()) self.assertEquals('account_module/bank', sale_line.getDestination())
def stepStoreCurrentPlannedConfirmedAccountingWorkflowCount(self, sequence,
**kw):
# there shall be no divergency
count = 0
current_skin = self.app.REQUEST.get('portal_skin', 'View')
try:
# Note: Worklists are cached, so in order to have next correct result
# clear cache
self.clearCache()
self.changeSkin('RSS')
for q in self.portal.ERP5Site_getWorklistObjectList():
if q.title.startswith("Accounting Transactions to Start"):
count = q.count
break
finally:
self.changeSkin(current_skin)
sequence['planned_confirmed_accounting_workflow_count'] = count
def stepCheckCurrentPlannedConfirmedAccountingWorkflowCount(self, sequence,
**kw):
# there shall be no divergency
count = 0
current_skin = self.app.REQUEST.get('portal_skin', 'View')
try:
# Note: Worklists are cached, so in order to have next correct result
# clear cache
self.clearCache()
self.changeSkin('RSS')
for q in self.portal.ERP5Site_getWorklistObjectList():
if q.title.startswith("Accounting Transactions to Start"):
count = q.count
break
finally:
self.changeSkin(current_skin)
self.assertEqual(count, sequence[
'planned_confirmed_accounting_workflow_count'])
def stepDecreaseCurrentPlannedConfirmedAccountingWorkflowCount(self,
sequence, **kw):
sequence['planned_confirmed_accounting_workflow_count'] = sequence[
'planned_confirmed_accounting_workflow_count'] - 1
def test_default_use_case(self): def test_default_use_case(self):
"""Test full default use case. """Test full default use case.
...@@ -998,6 +1041,9 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin): ...@@ -998,6 +1041,9 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
sequence_string = \ sequence_string = \
self.prepare_installed_software_release_sequence_string + \ self.prepare_installed_software_release_sequence_string + \
self.register_new_user_sequence_string + '\ self.register_new_user_sequence_string + '\
LoginTestVifibAdmin \
StoreCurrentPlannedConfirmedAccountingWorkflowCount \
Logout \
LoginWebUser \ LoginWebUser \
CheckRegistrationAccounting \ CheckRegistrationAccounting \
PayPayment \ PayPayment \
...@@ -1005,6 +1051,10 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin): ...@@ -1005,6 +1051,10 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
CallVifibUpdateDeliveryCausalityStateAlarm \ CallVifibUpdateDeliveryCausalityStateAlarm \
CleanTic \ CleanTic \
Logout \ Logout \
LoginTestVifibAdmin \
DecreaseCurrentPlannedConfirmedAccountingWorkflowCount \
CheckCurrentPlannedConfirmedAccountingWorkflowCount \
Logout \
LoginWebUser \ LoginWebUser \
CheckPaidRegistrationAccounting \ CheckPaidRegistrationAccounting \
' + \ ' + \
...@@ -1103,6 +1153,9 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin): ...@@ -1103,6 +1153,9 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
CallVifibUpdateDeliveryCausalityStateAlarm\ CallVifibUpdateDeliveryCausalityStateAlarm\
CleanTic \ CleanTic \
\ \
LoginTestVifibAdmin \
StoreCurrentPlannedConfirmedAccountingWorkflowCount \
Logout \
LoginWebUser \ LoginWebUser \
CheckWaitingInvoice \ CheckWaitingInvoice \
Tic \ Tic \
...@@ -1111,6 +1164,10 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin): ...@@ -1111,6 +1164,10 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
CallVifibUpdateDeliveryCausalityStateAlarm \ CallVifibUpdateDeliveryCausalityStateAlarm \
CleanTic \ CleanTic \
CheckPaidInvoice \ CheckPaidInvoice \
LoginTestVifibAdmin \
DecreaseCurrentPlannedConfirmedAccountingWorkflowCount \
CheckCurrentPlannedConfirmedAccountingWorkflowCount \
Logout \
LoginERP5TypeTestCase \ LoginERP5TypeTestCase \
CheckSiteConsistency \ CheckSiteConsistency \
Logout \ Logout \
......
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