From f8faed2f43ba68d99fdf7fe8f6d167e31fdd6485 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 15 Mar 2021 14:28:47 +0000 Subject: [PATCH] [FIX] point_of_sale: tour waits for everything to be loaded Before this commit, the first step of the tour pos_basic_order waited for something not precise enough, and that was true before anything was loaded After this commit, we wait both the the webClient and the Chrome to be loaded with a more specific selector Runbot issue fingerprint: bd10372b7db10c743f38312470ff528a74bfe9dcc0348a3e1f0bd47f55764378 Runbot issue id: 1357 closes odoo/odoo#67904 X-original-commit: 166e30b132fb659aa5a35a03cc73e5225575af2b Signed-off-by: pimodoo --- addons/point_of_sale/static/tests/tours/point_of_sale.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/tests/tours/point_of_sale.js b/addons/point_of_sale/static/tests/tours/point_of_sale.js index 2380fef68b9..25f88d3a4cc 100644 --- a/addons/point_of_sale/static/tests/tours/point_of_sale.js +++ b/addons/point_of_sale/static/tests/tours/point_of_sale.js @@ -44,9 +44,12 @@ odoo.define('point_of_sale.tour.pricelist', function (require) { }; } + // The global posmodel is only present when the posmodel is instanciated + // So, wait for everythiong to be loaded var steps = [{ // Leave category displayed by default content: 'waiting for loading to finish', - trigger: 'body:not(:has(.loader))', + extra_trigger: 'body .pos:not(:has(.loader))', // Pos has finished loading + trigger: 'body:not(.oe_wait)', // WebClient has finished Loading run: function () { var product_wall_shelf = posmodel.db.search_product_in_category(0, 'Wall Shelf Unit')[0]; var product_small_shelf = posmodel.db.search_product_in_category(0, 'Small Shelf')[0];