Commit 11f4db7d authored by Rafael Monnerat's avatar Rafael Monnerat

Minor fixups related to UI Tests

See merge request nexedi/slapos.core!450
parents 737c0ad5 0fa87227
...@@ -24,7 +24,7 @@ else: ...@@ -24,7 +24,7 @@ else:
argument_list=[line]) argument_list=[line])
else: else:
is_node_from_line_receivable = isNodeFromLineReceivable(line) is_node_from_line_receivable = isNodeFromLineReceivable(line)
if is_node_from_line_receivable: if is_node_from_line_receivable:
if not line.hasGroupingReference(): if not line.hasGroupingReference():
paid = False paid = False
...@@ -53,7 +53,7 @@ else: ...@@ -53,7 +53,7 @@ else:
callable_object=payment.PaymentTransaction_getExternalPaymentId, callable_object=payment.PaymentTransaction_getExternalPaymentId,
argument_list=[])[0] argument_list=[])[0]
if external_payment_id is None: if external_payment_id is None:
result = "Pay now" result = "Pay Now"
else: else:
result = "Waiting for payment confirmation" result = "Waiting for payment confirmation"
......
payment_transaction = context.SaleInvoiceTransaction_getSlapOSPaymentRelatedValue()
if payment_transaction is not None:
return payment_transaction.getRelativeUrl()
<?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>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleInvoiceTransaction_getSlapOSPaymentRelated</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html> <!DOCTYPE html>
<!--
data-i18n=Return to Invoice List
-->
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1000.2322.46712.16657</string> </value> <value> <string>1001.26171.19762.42854</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1655131178.92</float> <float>1668438559.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html> <!DOCTYPE html>
<!--
data-i18n=Pay Now
data-i18n=Paid
-->
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1000.58194.15602.170</string> </value> <value> <string>1004.20711.32301.34730</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1655123719.67</float> <float>1668439357.85</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
rJS(window) rJS(window)
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getTranslationDict", "getTranslationDict")
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1000.2322.46712.16657</string> </value> <value> <string>1004.20858.14913.15650</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1655131980.97</float> <float>1668439460.43</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
state = context.AccountingTransaction_getPaymentState() state = context.AccountingTransaction_getPaymentState()
payment_transaction = None payment_transaction = None
payment_mode = None payment_mode = None
if state == "Pay now": if state == "Pay Now":
payment_transaction_value = context.SaleInvoiceTransaction_getSlapOSPaymentRelatedValue() payment_transaction_value = context.SaleInvoiceTransaction_getSlapOSPaymentRelatedValue()
payment_transaction = payment_transaction_value.getRelativeUrl() payment_transaction = payment_transaction_value.getRelativeUrl()
payment_mode = payment_transaction_value.getPaymentMode() payment_mode = payment_transaction_value.getPaymentMode()
......
...@@ -714,7 +714,7 @@ class TestSlapOSPayzenAccountingTransaction_getPaymentState( ...@@ -714,7 +714,7 @@ class TestSlapOSPayzenAccountingTransaction_getPaymentState(
destination_section=person.getRelativeUrl()) destination_section=person.getRelativeUrl())
self.tic() self.tic()
self.login(person.getUserId()) self.login(person.getUserId())
self.assertEqual("Pay now", invoice.AccountingTransaction_getPaymentState()) self.assertEqual("Pay Now", invoice.AccountingTransaction_getPaymentState())
def test_AccountingTransaction_getPaymentState_waiting_payment(self): def test_AccountingTransaction_getPaymentState_waiting_payment(self):
person = self.makePerson() person = self.makePerson()
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>testSlapOSPayzenSkins</string> </value> <value> <string>testSlapOSPayzenSkins</string> </value>
...@@ -55,28 +49,13 @@ ...@@ -55,28 +49,13 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -89,7 +68,7 @@ ...@@ -89,7 +68,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -98,7 +77,7 @@ ...@@ -98,7 +77,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
......
...@@ -591,7 +591,7 @@ class TestSlapOSWechatAccountingTransaction_getPaymentState( ...@@ -591,7 +591,7 @@ class TestSlapOSWechatAccountingTransaction_getPaymentState(
destination_section=person.getRelativeUrl()) destination_section=person.getRelativeUrl())
self.tic() self.tic()
self.login(person.getUserId()) self.login(person.getUserId())
self.assertEqual("Pay now", invoice.AccountingTransaction_getPaymentState()) self.assertEqual("Pay Now", invoice.AccountingTransaction_getPaymentState())
def test_AccountingTransaction_getPaymentState_waiting_payment(self): def test_AccountingTransaction_getPaymentState_waiting_payment(self):
person = self.makePerson() person = self.makePerson()
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>testSlapOSWechatSkins</string> </value> <value> <string>testSlapOSWechatSkins</string> </value>
...@@ -55,28 +49,13 @@ ...@@ -55,28 +49,13 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -89,7 +68,7 @@ ...@@ -89,7 +68,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -98,7 +77,7 @@ ...@@ -98,7 +77,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
......
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