support dynamic formatted attributes with dashes

This commit is contained in:
Géry Debongnie
2019-03-05 08:35:19 +01:00
parent b15761de8b
commit 484692b53a
3 changed files with 22 additions and 1 deletions
+6
View File
@@ -316,6 +316,12 @@ describe("attributes", () => {
expect(result).toBe(`<div data-action-id="32"></div>`);
});
test("dynamic formatted attributes with a dash", () => {
qweb.addTemplate("test", `<div t-attf-aria-label="Some text {{id}}"/>`);
const result = renderToString(qweb, "test", { id: 32 });
expect(result).toBe(`<div aria-label="Some text 32"></div>`);
});
test("fixed variable", () => {
qweb.addTemplate("test", `<div t-att-foo="value"/>`);
const result = renderToString(qweb, "test", { value: "ok" });