mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 07:12:09 +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,39 @@
|
|||
import * as viewHelpers from "@web/../tests/views/helpers";
|
||||
import * as webClientHelpers from "@web/../tests/webclient/helpers";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const serviceRegistry = registry.category("services");
|
||||
|
||||
function registerFakemailPopoutService() {
|
||||
if (!serviceRegistry.contains("mail.popout")) {
|
||||
serviceRegistry.add("mail.popout", {
|
||||
start() {
|
||||
return {
|
||||
get externalWindow() {
|
||||
return null;
|
||||
},
|
||||
popout() {},
|
||||
reset() {},
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const superSetupViewRegistries = viewHelpers.setupViewRegistries
|
||||
viewHelpers.setupViewRegistries = () => {
|
||||
registerFakemailPopoutService()
|
||||
return superSetupViewRegistries();
|
||||
}
|
||||
|
||||
const superSetupWebClientRegistries = webClientHelpers.setupWebClientRegistries
|
||||
webClientHelpers.setupWebClientRegistries = () => {
|
||||
registerFakemailPopoutService()
|
||||
return superSetupWebClientRegistries();
|
||||
}
|
||||
|
||||
const superCreateWebClient = webClientHelpers.createWebClient
|
||||
webClientHelpers.createWebClient = (params) => {
|
||||
registerFakemailPopoutService()
|
||||
return superCreateWebClient(params);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue