From 98f72efcbe228709d1858d43f4aa5bb43912032c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 21 Nov 2017 14:36:00 +0100 Subject: [PATCH] [FIX] web_tour: add some logging messages With this commit, we add a few extra logs to help debugging issues with phantomjs. I suspect that the recent problems with phantomjs are due to the localstorage not being cleared properly, but the logs are not sufficient to determine the exact cause. --- addons/web_tour/static/src/js/tour_manager.js | 2 ++ odoo/tests/phantomtest.js | 1 + 2 files changed, 3 insertions(+) diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index 8d6d35c102f..9b5d4a19718 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -204,6 +204,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { this.running_step_delay = parseInt(local_storage.getItem(get_running_delay_key()), 10) || 10; this.edition = (_.last(session.server_version_info) === 'e') ? 'enterprise' : 'community'; this._log = []; + console.log('Tour Manager is ready. running_tour=' + this.running_tour); }, /** * Registers a tour described by the following arguments (in order) @@ -271,6 +272,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { }).bind(this)); }, run: function (tour_name, step_delay) { + console.log(_.str.sprintf("Preparing tour %s", tour_name)); if (this.running_tour) { this._deactivate_tip(this.active_tooltips[this.running_tour]); this._consume_tour(this.running_tour, _.str.sprintf("Killing tour %s", this.running_tour)); diff --git a/odoo/tests/phantomtest.js b/odoo/tests/phantomtest.js index a372821d58e..b77cc3ffe9d 100644 --- a/odoo/tests/phantomtest.js +++ b/odoo/tests/phantomtest.js @@ -61,6 +61,7 @@ function PhantomTest() { console.log(''+message+''); }; this.page.onLoadFinished = function(status) { + console.log('PhantomJS: onLoadFinished. Status=', status); if (status === "success") { for (var k in self.inject) { var found = false;