[FIX] web: adapt editFavoriteName helper

With the last realease of owl, .trim now implies .lazy. This means that
if t-model.trim is used, the value will be updated in the state only when
the change event is triggered. Here we adapt the helper editFavoriteName
which was supposed to update the state value.

X-original-commit: 7a16b75a35a5bd60190ee5b437b925a2fa99fb70
Part-of: odoo/odoo#149507
This commit is contained in:
Mathieu Duckerts-Antoine
2024-01-16 13:15:22 +00:00
parent 2f934bc91f
commit 3abba287f7
+2 -1
View File
@@ -9,6 +9,7 @@ import {
mount,
mouseEnter,
triggerEvent,
triggerEvents,
} from "@web/../tests/helpers/utils";
import { commandService } from "@web/core/commands/command_service";
import { dialogService } from "@web/core/dialog/dialog_service";
@@ -244,7 +245,7 @@ export async function editFavoriteName(el, name) {
`.o_favorite_menu .o_add_favorite + .o_accordion_values input[type="text"]`
);
input.value = name;
await triggerEvent(input, null, "input");
await triggerEvents(input, null, ["input", "change"]);
}
export async function saveFavorite(el) {