mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-23 04:12:03 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -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"]);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue