diff --git a/addons/payment_paypal/tests/test_paypal.py b/addons/payment_paypal/tests/test_paypal.py index bf70d425df2..676e3e0a08d 100644 --- a/addons/payment_paypal/tests/test_paypal.py +++ b/addons/payment_paypal/tests/test_paypal.py @@ -102,7 +102,10 @@ class PaypalForm(PaypalCommon): # check form result handling_found = False tree = objectify.fromstring(res) - self.assertEqual(tree.get('action'), 'https://www.sandbox.paypal.com/cgi-bin/webscr', 'paypal: wrong form POST url') + + data_set = tree.xpath("//input[@name='data_set']") + self.assertEqual(len(data_set), 1, 'paypal: Found %d "data_set" input instead of 1' % len(data_set)) + self.assertEqual(data_set[0].get('data-action-url'), 'https://www.sandbox.paypal.com/cgi-bin/webscr', 'paypal: wrong form POST url') for form_input in tree.input: if form_input.get('name') in ['handling']: handling_found = True diff --git a/addons/website_event_sale/static/src/js/website.tour.event_sale.js b/addons/website_event_sale/static/src/js/website.tour.event_sale.js index 895e6191f86..cae695c899a 100644 --- a/addons/website_event_sale/static/src/js/website.tour.event_sale.js +++ b/addons/website_event_sale/static/src/js/website.tour.event_sale.js @@ -81,12 +81,13 @@ tour.register('event_buy_tickets', { }, { content: "Select `Wire Transfer` payment method", - trigger: '#payment_method label:contains(Wire Transfer) input', + trigger: '#payment_method label:contains("Wire Transfer")', }, { content: "Pay", - extra_trigger: '#payment_method label:contains(Wire Transfer) input:checked', - trigger: '.o_payment_acquirer_button .btn[type="submit"]:visible', + //Either there are multiple payment methods, and one is checked, either there is only one, and therefore there are no radio inputs + extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))', + trigger: 'button[id="o_payment_form_pay"]:visible', }, { content: "Last step", diff --git a/addons/website_sale/static/src/js/website_sale_tour_buy.js b/addons/website_sale/static/src/js/website_sale_tour_buy.js index e3878a588f4..ade80828c12 100644 --- a/addons/website_sale/static/src/js/website_sale_tour_buy.js +++ b/addons/website_sale/static/src/js/website_sale_tour_buy.js @@ -71,12 +71,13 @@ tour.register('shop_buy_product', { }, { content: "select payment", - trigger: '#payment_method label:contains("Wire Transfer") input', + trigger: '#payment_method label:contains("Wire Transfer")', }, { content: "Pay Now", - extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked', - trigger: '.o_payment_acquirer_button .btn[type="submit"]:visible', + //Either there are multiple payment methods, and one is checked, either there is only one, and therefore there are no radio inputs + extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))', + trigger: 'button[id="o_payment_form_pay"]:visible', }, { content: "finish", diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index af10178c691..f9e58143a1d 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -1325,7 +1325,7 @@
-
+

Pay with