mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
135 lines
4.4 KiB
Plaintext
135 lines
4.4 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`properly support svg add proper namespace to g tags 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<g block-ns=\\"http://www.w3.org/2000/svg\\"><circle cx=\\"50\\" cy=\\"50\\" r=\\"4\\" stroke=\\"green\\" stroke-width=\\"1\\" fill=\\"yellow\\"/> </g>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg add proper namespace to svg 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\" width=\\"100px\\" height=\\"90px\\"><circle cx=\\"50\\" cy=\\"50\\" r=\\"4\\" stroke=\\"green\\" stroke-width=\\"1\\" fill=\\"yellow\\"/> </svg>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg namespace to g tags not added if already in svg namespace 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><g/></svg>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg namespace to svg tags added even if already in svg namespace 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><svg/></svg>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg svg creates new block if it is within html -- 2 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/><block-child-0/></svg>\`);
|
|
let block3 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b3;
|
|
if (ctx['hasPath']) {
|
|
b3 = block3();
|
|
}
|
|
const b2 = block2([], [b3]);
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg svg creates new block if it is within html 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/></svg>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
const b2 = block2();
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg svg namespace added to sub templates if root tag is path 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
const callTemplate_1 = app.getTemplate(\`path\`);
|
|
|
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><block-child-0/></svg>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg svg namespace added to sub templates if root tag is path 2`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`properly support svg svg namespace added to sub-blocks 1`] = `
|
|
"function anonymous(app, bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
|
|
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><block-child-0/></svg>\`);
|
|
let block2 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2;
|
|
if (ctx['path']) {
|
|
b2 = block2();
|
|
}
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|