[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) <aab@odoo.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user