[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) <lpe@odoo.com>
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user