load widget templates separately (so no more inline)

This commit is contained in:
Géry Debongnie
2019-02-02 11:41:19 +01:00
parent 4d30180862
commit 27f5845799
19 changed files with 177 additions and 183 deletions
@@ -1,7 +1,7 @@
import { Env } from "../../src/ts/env";
import { INotification } from "../../src/ts/services/notifications";
import { Notification } from "../../src/ts/widgets/notification";
import { makeTestEnv, makeTestFixture } from "../helpers";
import { makeTestEnv, makeTestFixture, loadTemplates } from "../helpers";
//------------------------------------------------------------------------------
// Setup and helpers
@@ -9,10 +9,16 @@ import { makeTestEnv, makeTestFixture } from "../helpers";
let fixture: HTMLElement;
let env: Env;
let templates: string;
beforeAll(async () => {
templates = await loadTemplates();
});
beforeEach(() => {
fixture = makeTestFixture();
env = makeTestEnv();
env.qweb.loadTemplates(templates);
});
afterEach(() => {