mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: reintroduce test on t-debug
This commit is contained in:
@@ -21,6 +21,37 @@ exports[`debugging t-debug 1`] = `
|
|||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`debugging t-debug on sub template 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<p>coucou</p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
debugger;
|
||||||
|
return block1();
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`debugging t-debug on sub template 2`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`debugging t-log 1`] = `
|
exports[`debugging t-log 1`] = `
|
||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -14,19 +14,11 @@ describe("debugging", () => {
|
|||||||
console.log = consoleLog;
|
console.log = consoleLog;
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip("t-debug on sub template", () => {
|
test("t-debug on sub template", () => {
|
||||||
// const consoleLog = console.log;
|
let template = `<p t-debug="">coucou</p>`;
|
||||||
// console.log = jest.fn();
|
snapshotTemplateCode(template);
|
||||||
// qweb.addTemplates(`
|
template = `<div><t t-call="sub"/></div>`;
|
||||||
// <templates>
|
snapshotTemplateCode(template);
|
||||||
// <p t-name="sub" t-debug="">coucou</p>
|
|
||||||
// <div t-name="test">
|
|
||||||
// <t t-call="sub"/>
|
|
||||||
// </div>
|
|
||||||
// </templates>`);
|
|
||||||
// qweb.render("test");
|
|
||||||
// expect(console.log).toHaveBeenCalledTimes(1);
|
|
||||||
// console.log = consoleLog;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("t-log", () => {
|
test("t-log", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user