diff --git a/addons/web/static/tests/qunit.js b/addons/web/static/tests/qunit.js index 8187fabae17..9fd8fa50905 100644 --- a/addons/web/static/tests/qunit.js +++ b/addons/web/static/tests/qunit.js @@ -305,7 +305,8 @@ export function setupQUnit() { errorMessages.push(`${result.failed} / ${result.total} tests failed.`); } if (!result.failed && allModulesLoaded) { - console.log("test successful"); + console.log("QUnit test suite done."); + console.log("test successful"); // for ChromeBowser to know it's over and ok } else { logErrors(); } diff --git a/addons/web_tour/static/src/tour_service/tour_service.js b/addons/web_tour/static/src/tour_service/tour_service.js index eefa2da9fdc..7765bafa5d7 100644 --- a/addons/web_tour/static/src/tour_service/tour_service.js +++ b/addons/web_tour/static/src/tour_service/tour_service.js @@ -1,6 +1,7 @@ /** @odoo-module **/ import { markup, whenReady, reactive } from "@odoo/owl"; +import { browser } from "@web/core/browser/browser"; import { isMobileOS } from "@web/core/browser/feature_detection"; import { _t } from "@web/core/l10n/translation"; import { MacroEngine } from "@web/core/macro"; @@ -186,7 +187,7 @@ export const tourService = { } pointer.stop(); // Used to signal the python test runner that the tour finished without error. - console.log("test successful"); + browser.console.log("test successful"); }, }); } diff --git a/addons/web_tour/static/tests/tour_service_tests.js b/addons/web_tour/static/tests/tour_service_tests.js index 734680d9777..db62217cf67 100644 --- a/addons/web_tour/static/tests/tour_service_tests.js +++ b/addons/web_tour/static/tests/tour_service_tests.js @@ -1,5 +1,6 @@ /** @odoo-module **/ +import { browser } from "@web/core/browser/browser"; import { registry } from "@web/core/registry"; import { tourService } from "@web_tour/tour_service/tour_service"; import { rpcService } from "@web/core/network/rpc_service"; @@ -15,6 +16,7 @@ import { click, triggerEvent, nextTick, + patchWithCleanup, } from "@web/../tests/helpers/utils"; import { makeTestEnv } from "@web/../tests/helpers/mock_env"; import { Component, useState, xml } from "@odoo/owl"; @@ -59,6 +61,10 @@ QUnit.module("Tour service", (hooks) => { .add("notification", notificationService) .add("effect", effectService) .add("tour_service", tourService); + patchWithCleanup(browser.console, { + // prevent form logging "tour successful" which would end the qunit suite test + log: () => {} + }); }); hooks.afterEach(() => {