Files
odoo_source/addons/web/static/tests/main_tests.js
T
Julien MougenotandMathieu Duckerts-Antoine 0a129284e4 [IMP] web,*: Enhance test helpers
1. Test utils helpers adapted to properly instantiate the new Owl control panel
2. New file 'test_utils_control_panel' to create a control panel and use helpers
3. New helper: createComponent (creates a generic component, see jsdoc)
4. Use of the new helpers in the current tests (more in sibling commits)
5. Helper 'addMockEnvironment' is now asynchronous
6. Owl config mode set to 'dev' in test suite (props validation)

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 11:39:53 +00:00

17 lines
458 B
JavaScript

// define the 'web.web_client' module because some other modules require it
odoo.define('web.web_client', async function (require) {
"use strict";
const session = require("web.session");
const WebClient = require('web.WebClient');
owl.config.mode = "dev";
const webClient = new WebClient();
await session.is_bound;
session.owlTemplates = session.owlTemplates.replace(/t-transition/g, 'transition');
return webClient;
});