From 9bc5009481de188b72da21bd7a0d246a60a070ef Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 27 Oct 2017 11:32:10 +0200 Subject: [FIX] web(_editor): enable mobile tests This rev. introduces a new test suite meant to test the webclient components on mobile devices. The key 'config.device.isMobile' is forced to true in this test suite, so that mobile specific JS files are properly executed, which isn't the case in the classic JS test suite (setting isMobile to true in the test definition is too late, as the JS files are already processed). For now, this new test suite contains a single test, which was skipped until this rev. as it couldn't be executed in the classical JS test suite. Both suites are executed at each build of the runbot, and they can be manually executed from the webclient as well (via the debug manager). --- addons/web/static/src/js/widgets/debug_manager.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/widgets/debug_manager.js') diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js index a214d8b55a4..8007dc2ab7e 100644 --- a/addons/web/static/src/js/widgets/debug_manager.js +++ b/addons/web/static/src/js/widgets/debug_manager.js @@ -6,7 +6,6 @@ var dialogs = require('web.view_dialogs'); var core = require('web.core'); var Dialog = require('web.Dialog'); var field_utils = require('web.field_utils'); -var framework = require('web.framework'); var session = require('web.session'); var SystrayMenu = require('web.SystrayMenu'); var utils = require('web.utils'); @@ -189,6 +188,9 @@ var DebugManager = Widget.extend({ } }).open(); }, + /** + * Runs the JS (desktop) tests + */ perform_js_tests: function () { this.do_action({ name: _t("JS Tests"), @@ -197,6 +199,17 @@ var DebugManager = Widget.extend({ url: '/web/tests?mod=*' }); }, + /** + * Runs the JS mobile tests + */ + perform_js_mobile_tests: function () { + this.do_action({ + name: _t("JS Mobile Tests"), + target: 'new', + type: 'ir.actions.act_url', + url: '/web/tests/mobile?mod=*' + }); + }, split_assets: function() { window.location = $.param.querystring(window.location.href, 'debug=assets'); }, -- cgit v1.2.3