diff --git a/addons/web/static/tests/helpers/mock_server.js b/addons/web/static/tests/helpers/mock_server.js index f677b3e7298..318c48103cf 100644 --- a/addons/web/static/tests/helpers/mock_server.js +++ b/addons/web/static/tests/helpers/mock_server.js @@ -498,7 +498,7 @@ export class MockServer { if (!action) { // when the action doesn't exist, the real server doesn't crash, it // simply returns false - console.warn("No action found for ID " + kwargs.action_id); + console.warn(`No action found for ID ${kwargs.action_id} during test ${QUnit.config.current.testName}`); } return action || false; } diff --git a/addons/web/static/tests/legacy/helpers/mock_server.js b/addons/web/static/tests/legacy/helpers/mock_server.js index 0cea8e11fbf..2ce6392b56b 100644 --- a/addons/web/static/tests/legacy/helpers/mock_server.js +++ b/addons/web/static/tests/legacy/helpers/mock_server.js @@ -1160,7 +1160,7 @@ var MockServer = Class.extend({ if (!action) { // when the action doesn't exist, the real server doesn't crash, it // simply returns false - console.warn("No action found for ID " + kwargs.action_id); + console.warn(`No action found for ID ${kwargs.action_id} during test ${QUnit.config.current.testName} (legacy)`); } return action || false; }, diff --git a/addons/web/static/tests/webclient/actions/misc_tests.js b/addons/web/static/tests/webclient/actions/misc_tests.js index 3cde098f53d..578854c4a11 100644 --- a/addons/web/static/tests/webclient/actions/misc_tests.js +++ b/addons/web/static/tests/webclient/actions/misc_tests.js @@ -6,7 +6,7 @@ import core from "web.core"; import testUtils from "web.test_utils"; import Widget from "web.Widget"; import { makeTestEnv } from "../../helpers/mock_env"; -import { legacyExtraNextTick, patchWithCleanup } from "../../helpers/utils"; +import {hushConsole, legacyExtraNextTick, patchWithCleanup} from "../../helpers/utils"; import { createWebClient, doAction, @@ -97,6 +97,7 @@ QUnit.module("ActionManager", (hooks) => { QUnit.test("properly handle case when action id does not exist", async (assert) => { assert.expect(2); const webClient = await createWebClient({ serverData }); + patchWithCleanup(window, {console: hushConsole}, {pure: true}); patchWithCleanup(webClient.env.services.notification, { add(message) { assert.strictEqual(message, "No action with id '4448' could be found");