[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
+9 -7
View File
@@ -318,12 +318,13 @@ describe("t-set", () => {
<t t-set="v1" t-value="'after'"/>
<t t-set="v3" t-value="true"/>
<t t-raw="v2"/>
</div>`);
</div>`
);
expect(renderToString(qweb, "test")).toBe("<div><span>before</span></div>");
});
expect(renderToString(qweb, "test")).toBe("<div><span>before</span></div>");
});
test("t-set with t-value (truthy) and body", () => {
test("t-set with t-value (truthy) and body", () => {
qweb.addTemplate(
"test",
`<div>
@@ -335,10 +336,11 @@ describe("t-set", () => {
<t t-set="v1" t-value="'after'"/>
<t t-set="v3" t-value="false"/>
<t t-raw="v2"/>
</div>`);
</div>`
);
expect(renderToString(qweb, "test")).toBe("<div>Truthy</div>");
});
expect(renderToString(qweb, "test")).toBe("<div>Truthy</div>");
});
});
describe("t-if", () => {