adapt tests

This commit is contained in:
Géry Debongnie
2019-02-20 09:46:22 +01:00
parent 7f3886ebba
commit 203ce91e92
16 changed files with 185 additions and 173 deletions
+5 -1
View File
@@ -1,7 +1,7 @@
import { WEnv } from "./core/component";
import { QWeb } from "./core/qweb_vdom";
import { idGenerator } from "./core/utils";
import { Store, Services, RPC } from "./store";
import { INotification, RPC, Services, Store } from "./store";
//------------------------------------------------------------------------------
// Types
@@ -12,6 +12,8 @@ export interface Env extends WEnv {
// helpers
dispatch(action: string, param?: any): void;
addNotification(notif: Partial<INotification>): number;
closeNotification(id: number);
rpc: RPC;
// configuration
@@ -33,6 +35,8 @@ export function makeEnv(store: Store, templates: string): Env {
getID: idGenerator(),
services: store.services,
dispatch: store.dispatch.bind(store),
addNotification: store.addNotification.bind(store),
closeNotification: store.closeNotification.bind(store),
rpc: store.rpc.bind(store),
debug: false,
isMobile: window.innerWidth <= 768