[REF] tests: remove Widget common class

Bad name, and bad practice to use it. It makes tests less standalone.
This commit is contained in:
Géry Debongnie
2019-12-11 11:36:59 +01:00
committed by aab-odoo
parent 9921ae07b1
commit 97d8b3ed8c
5 changed files with 918 additions and 828 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
import { Env } from "../src/component/component";
import { Env, Component } from "../src/component/component";
import { scheduler } from "../src/component/scheduler";
import { EvalContext, QWeb } from "../src/qweb/qweb";
import { CompilationContext } from "../src/qweb/compilation_context";
@@ -25,6 +25,7 @@ beforeEach(() => {
slots = Object.assign({}, QWeb.slots);
nextId = QWeb.nextId;
TEMPLATES = Object.assign({}, QWeb.TEMPLATES);
Component.scheduler.tasks = [];
});
afterEach(() => {
@@ -32,6 +33,7 @@ afterEach(() => {
QWeb.slots = slots;
QWeb.nextId = nextId;
QWeb.TEMPLATES = TEMPLATES;
Component.scheduler.tasks = [];
});
// helpers