From 634c00a32fe18365039f83d890965fe35de7d23b Mon Sep 17 00:00:00 2001 From: Julien Mougenot Date: Mon, 30 Mar 2020 10:05:39 +0000 Subject: [PATCH] [FIX] web_tour: load xml at test start Before this commit, the template of the "Tip" widget was loaded on test runtime and caused a concurrency issue. Now, the template is loaded before the test suite is launched and is ready when the test is executed. closes odoo/odoo#48589 Signed-off-by: Aaron Bohy (aab) --- addons/web_tour/static/tests/tour_manager_tests.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web_tour/static/tests/tour_manager_tests.js b/addons/web_tour/static/tests/tour_manager_tests.js index 9d285732f06..61d9fefa219 100644 --- a/addons/web_tour/static/tests/tour_manager_tests.js +++ b/addons/web_tour/static/tests/tour_manager_tests.js @@ -1,9 +1,15 @@ -odoo.define('web_tour.tour_manager_tests', function (require) { +odoo.define('web_tour.tour_manager_tests', async function (require) { "use strict"; const TourManager = require('web_tour.TourManager'); const testUtils = require('web.test_utils'); + const ajax = require('web.ajax'); + const { qweb } = require('web.core'); + + // Pre-load the Tip widget template + await ajax.loadXML('/web_tour/static/src/xml/tip.xml', qweb); + /** * Create a widget and a TourManager instance with a list of given Tour objects. * @see TourManager.register() for more details on the Tours registry system.