From cbb52702dd07efe430eed8a76b3e2e39ce038b8a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 11 Aug 2017 15:03:24 +0200 Subject: [PATCH] [FIX] point_of_sale: test pos_basic_order do not actually jump in the backend We avoid to actually jump in the back-end, to prevent phantomjs to send requests to the server without waiting for them. Indeed, clicking on the close & confirm button jumps ine the backend, but the tour is actually finished (and succeeded) once these buttons are clicked, and just clicked. The test does not actually check if these buttons makes the user come back in the backend, and it does not wait for the requests sent because of the jump in the backend to be completed. Besides, the jump in the backend triggers the compilation of the common and backend assets, which take some time. These requests for which phantomjs does not wait triggers the method `def _wait_remaining_requests(self)` in the class `class HttpCase(TransactionCase)`, which leads to the ugly tracebacks in the runbot, waiting for the requests triggered by phantomjs to be finished. --- addons/point_of_sale/static/src/js/tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/tests.js b/addons/point_of_sale/static/src/js/tests.js index 0c578088b20..c12d5c5bb0e 100644 --- a/addons/point_of_sale/static/src/js/tests.js +++ b/addons/point_of_sale/static/src/js/tests.js @@ -110,7 +110,8 @@ odoo.define('point_of_sale.Tour', function (require) { trigger: ".header-button", }, { content: "confirm closing the frontend", - trigger: ".header-button", + trigger: ".header-button.confirm", + run: function() {}, //it's a check, }]); tour.register('pos_basic_order', { test: true, url: '/pos/web' }, steps);