mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
34b781aeed
This means that unrelated ids (eg the id of a template, variable or key) not longer share the same incrementing counter, meaning that you no longer see a variable named "v2" unless another variable "v1" was generated previously, this is also true for block data.
92 lines
2.5 KiB
Plaintext
92 lines
2.5 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`loading templates can initialize qweb with a string 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<div>jupiler</div>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`loading templates can initialize qweb with an XMLDocument 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<div>jupiler</div>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`loading templates can load a few templates from a xml string 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
let { getTemplate } = helpers;
|
|
const callTemplate_1 = getTemplate(\`items\`);
|
|
|
|
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`loading templates can load a few templates from a xml string 2`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
let block2 = createBlock(\`<li>ok</li>\`);
|
|
let block3 = createBlock(\`<li>foo</li>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2 = block2();
|
|
let b3 = block3();
|
|
return multi([b2, b3]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`loading templates can load a few templates from an XMLDocument 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
let { getTemplate } = helpers;
|
|
const callTemplate_1 = getTemplate(\`items\`);
|
|
|
|
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`loading templates can load a few templates from an XMLDocument 2`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
let block2 = createBlock(\`<li>ok</li>\`);
|
|
let block3 = createBlock(\`<li>foo</li>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2 = block2();
|
|
let b3 = block3();
|
|
return multi([b2, b3]);
|
|
}
|
|
}"
|
|
`;
|