From 3c6013e5ae57a63d3341da2a207b8eda41359185 Mon Sep 17 00:00:00 2001 From: "Loukas Wets (lowe)" Date: Tue, 4 Apr 2023 10:21:41 +0000 Subject: [PATCH] [FIX] point_of_sale: random error when running PaymentScreenTotalDueWithOverPayment PaymentScreenTotalDueWithOverPayment result to random runbot error because the test is performing a series of steps that clicks the validate button which will randomly result to going to the ReceiptScreen which is not the goal of the test. In this commit, we replace the use of `pay` method with a more granular series of steps to make sure that the test doesn't click the validate button and will properly make the succeeding checks on the amounts in the PaymentScreen. closes odoo/odoo#117844 X-original-commit: d51fa82d1fa9e154b9f9d57a5532e8c5fe48e33d Signed-off-by: Trinh Jacky (trj) Signed-off-by: Joseph Caburnay (jcb) --- addons/point_of_sale/static/tests/tours/PaymentScreen.tour.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/tests/tours/PaymentScreen.tour.js b/addons/point_of_sale/static/tests/tours/PaymentScreen.tour.js index 60c59227005..7520e5ebc34 100644 --- a/addons/point_of_sale/static/tests/tours/PaymentScreen.tour.js +++ b/addons/point_of_sale/static/tests/tours/PaymentScreen.tour.js @@ -181,7 +181,8 @@ ProductScreen.exec.addOrderline('Product Test', '1'); ProductScreen.do.clickPayButton(); PaymentScreen.check.totalIs('1.95'); -PaymentScreen.exec.pay('Cash', '5'); +PaymentScreen.do.clickPaymentMethod('Cash'); +PaymentScreen.do.pressNumpad('5'); PaymentScreen.check.remainingIs('0.0'); PaymentScreen.check.changeIs('3.05');