19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:27 +01:00
parent d1963a3c3a
commit 2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions

View file

@ -0,0 +1,30 @@
import { describe, test } from "@odoo/hoot";
import { runAllTimers, waitFor } from "@odoo/hoot-dom";
import {
asyncStep,
contains,
getService,
MockServer,
mountWithCleanup,
waitForSteps,
} from "@web/../tests/web_test_helpers";
import { browser } from "@web/core/browser/browser";
import { WebClient } from "@web/webclient/webclient";
import { defineBusModels } from "./bus_test_helpers";
defineBusModels();
describe.current.tags("desktop");
test("can listen on bus and display notifications in DOM", async () => {
browser.location.addEventListener("reload", () => asyncStep("reload-page"));
await mountWithCleanup(WebClient);
getService("bus_service").subscribe("bundle_changed", () => asyncStep("bundle_changed"));
MockServer.env["bus.bus"]._sendone("broadcast", "bundle_changed", {
server_version: "NEW_MAJOR_VERSION",
});
await waitForSteps(["bundle_changed"]);
await runAllTimers();
await waitFor(".o_notification", { contains: "The page appears to be out of date." });
await contains(".o_notification button:contains(Refresh)").click();
await waitForSteps(["reload-page"]);
});