vanilla 19.0

This commit is contained in:
Ernad Husremovic 2025-10-08 10:49:46 +02:00
parent 991d2234ca
commit d1963a3c3a
3066 changed files with 1651266 additions and 922560 deletions

View file

@ -0,0 +1,24 @@
import { setupInteractionWhiteList, startInteractions } from "@web/../tests/public/helpers";
import { describe, expect, test } from "@odoo/hoot";
import { queryOne } from "@odoo/hoot-dom";
setupInteractionWhiteList("public.login");
describe.current.tags("interaction_dev");
test("add and remove loading effect", async () => {
const { core } = await startInteractions(`
<div class="oe_login_form">
<button type="submit">log in</button>
</div>`);
expect(core.interactions).toHaveLength(1);
// Not using manuallyDispatchProgrammaticEvent to keep a minimalist test. We
// don't need to send a proper "submit" event with FormData, method, action,
// etc. for this test.
const ev = new Event("submit");
queryOne(".oe_login_form").dispatchEvent(ev);
expect("button").toHaveClass(["o_btn_loading", "disabled"]);
ev.preventDefault();
expect("button").not.toHaveClass(["o_btn_loading", "disabled"]);
});