From 0eb67efd0f2b93343ff946f2a69b02522a0f7d71 Mon Sep 17 00:00:00 2001 From: "Adrien Guilliams (adgu)" Date: Tue, 5 Sep 2023 09:48:13 +0200 Subject: [PATCH] [FIX] l10n_fr_pos_cert: fix Chrome mount in QUnit tests In the QUnit tests, the Chrome is mounted with the popup services mocked but the globalState in the French localization for the PoS is using it. This led to error when Chrome tried to load a popup. The popup service is now correctly mounted in the QUnit tests of the PoS. closes odoo/odoo#134736 Runbot-bug-id: 23080 X-original-commit: 53143a48e4804415c5e8c52c8e6f6cdbdafab8a8 Signed-off-by: Joseph Caburnay (jcb) Signed-off-by: Adrien Guilliams (adgu) --- .../point_of_sale/static/tests/unit/pos_app_tests.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/addons/point_of_sale/static/tests/unit/pos_app_tests.js b/addons/point_of_sale/static/tests/unit/pos_app_tests.js index a99764bdef2..89c9e1e6e40 100644 --- a/addons/point_of_sale/static/tests/unit/pos_app_tests.js +++ b/addons/point_of_sale/static/tests/unit/pos_app_tests.js @@ -8,6 +8,7 @@ import { numberBufferService } from "@point_of_sale/app/utils/number_buffer_serv import { barcodeReaderService } from "@point_of_sale/app/barcode/barcode_reader_service"; import { EventBus } from "@odoo/owl"; import { uiService } from "@web/core/ui/ui_service"; +import { popupService } from "@point_of_sale/app/popup/popup_service"; QUnit.module("Chrome", { beforeEach() { @@ -17,6 +18,7 @@ QUnit.module("Chrome", { .add("number_buffer", numberBufferService) .add("barcode_reader", barcodeReaderService) .add("ui", uiService) + .add("popup", popupService) .add("barcode", { start() { return { bus: new EventBus() }; @@ -28,14 +30,7 @@ QUnit.module("Chrome", { }, }); - for (const service of [ - "popup", - "hardware_proxy", - "debug", - "pos_notification", - "sound", - "action", - ]) { + for (const service of ["hardware_proxy", "debug", "pos_notification", "sound", "action"]) { registry.category("services").add(service, { start() { return {};