From d85df9c50e50e8531970ae363be357d6dafa0e58 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 14 Jul 2021 08:03:23 +0000 Subject: [PATCH] [FIX] web: test: ensure to wait for dialog to be opened Before this commit, the modified test sometimes failed on runbot. We need to wait for an extra tick, because the dialog might be rendered in another animation frame that the crashing client action. closes odoo/odoo#73675 Signed-off-by: Lucas Perais (lpe) --- .../static/tests/webclient/actions/error_handling_tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/tests/webclient/actions/error_handling_tests.js b/addons/web/static/tests/webclient/actions/error_handling_tests.js index fdea5e97213..541df6ef161 100644 --- a/addons/web/static/tests/webclient/actions/error_handling_tests.js +++ b/addons/web/static/tests/webclient/actions/error_handling_tests.js @@ -1,10 +1,9 @@ /** @odoo-module **/ -import { browser } from "@web/core/browser/browser"; import { registry } from "@web/core/registry"; import { createWebClient, doAction, getActionManagerServerData } from "./../helpers"; import { registerCleanup } from "../../helpers/cleanup"; -import { click, patchWithCleanup } from "../../helpers/utils"; +import { click, nextTick, patchWithCleanup } from "../../helpers/utils"; import { errorService } from "@web/core/errors/error_service"; const { Component, tags } = owl; @@ -73,6 +72,7 @@ QUnit.module("ActionManager", (hooks) => { assert.containsOnce(webClient, ".my_button"); await click(document.querySelector(".my_button")); + await nextTick(); assert.containsOnce(webClient, ".my_button"); assert.containsOnce(webClient, ".o_dialog_error"); });