diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-03-30 10:05:39 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-03-30 10:20:12 +0000 |
| commit | 634c00a32fe18365039f83d890965fe35de7d23b (patch) | |
| tree | 79ad606d3f8b630329e46c23dc789943029bb82e /addons | |
| parent | 0de552c7c50d9c6cc90e7d95724fb87aca1ce455 (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web_tour/static/tests/tour_manager_tests.js | 8 |
1 files changed, 7 insertions, 1 deletions
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. |
