mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
adapt tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user