2019-05-21 08:32:32 +02:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
2019-06-18 09:24:52 +02:00
|
|
|
exports[`animations t-transition combined with component 1`] = `
|
2019-05-21 08:32:32 +02:00
|
|
|
"function anonymous(context,extra
|
|
|
|
|
) {
|
|
|
|
|
let utils = this.utils;
|
2019-05-23 16:14:52 +02:00
|
|
|
let QWeb = this.constructor;
|
2019-07-09 16:38:30 +02:00
|
|
|
let parent = context;
|
2019-05-21 08:32:32 +02:00
|
|
|
let owner = context;
|
|
|
|
|
var h = this.utils.h;
|
|
|
|
|
let c1 = [], p1 = {key:1};
|
|
|
|
|
var vn1 = h('div', p1, c1);
|
2019-06-20 09:42:33 +02:00
|
|
|
//COMPONENT
|
2019-05-21 08:32:32 +02:00
|
|
|
let def3;
|
2019-07-11 14:00:15 +02:00
|
|
|
let w4 = 4 in parent.__owl__.cmap ? parent.__owl__.children[parent.__owl__.cmap[4]] : false;
|
2019-06-14 10:17:13 +02:00
|
|
|
let _2_index = c1.length;
|
|
|
|
|
c1.push(null);
|
2019-05-21 08:32:32 +02:00
|
|
|
let props4 = {};
|
2019-06-01 21:44:43 +02:00
|
|
|
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) {
|
|
|
|
|
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) {
|
|
|
|
|
def3 = w4.__owl__.renderPromise;
|
|
|
|
|
} else {
|
|
|
|
|
w4.destroy();
|
|
|
|
|
w4 = false;
|
|
|
|
|
}
|
2019-05-21 08:32:32 +02:00
|
|
|
}
|
|
|
|
|
if (!w4) {
|
2019-06-20 09:42:33 +02:00
|
|
|
let componentKey4 = \`Child\`;
|
|
|
|
|
let W4 = context.components && context.components[componentKey4] || QWeb.components[componentKey4];
|
|
|
|
|
if (!W4) {throw new Error('Cannot find the definition of component \\"' + componentKey4 + '\\"')}
|
2019-07-09 16:38:30 +02:00
|
|
|
w4 = new W4(parent, props4);
|
2019-07-11 14:00:15 +02:00
|
|
|
parent.__owl__.cmap[4] = w4.__owl__.id;
|
2019-06-24 13:02:12 +02:00
|
|
|
def3 = w4.__prepare();
|
|
|
|
|
def3 = def3.then(vnode=>{let pvnode=h(vnode.sel, {key: 4, hook: {insert(vn) {let nvn=w4.__mount(vnode, pvnode.elm);pvnode.elm=nvn.elm;utils.transitionInsert(vn, 'chimay');},remove() {},destroy(vn) {let finalize = () => {
|
2019-05-21 08:32:32 +02:00
|
|
|
w4.destroy();
|
|
|
|
|
};
|
2019-06-11 14:48:37 +02:00
|
|
|
utils.transitionRemove(vn, 'chimay', finalize);}}});c1[_2_index]=pvnode;w4.__owl__.pvnode = pvnode;});
|
2019-05-21 08:32:32 +02:00
|
|
|
} else {
|
2019-06-24 13:02:12 +02:00
|
|
|
def3 = def3 || w4.__updateProps(props4, extra.forceUpdate, extra.patchQueue);
|
2019-05-21 08:32:32 +02:00
|
|
|
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
|
|
|
|
}
|
|
|
|
|
extra.promises.push(def3);
|
|
|
|
|
return vn1;
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2019-06-20 09:42:33 +02:00
|
|
|
exports[`animations t-transition combined with t-component and t-if 1`] = `
|
2019-05-21 08:32:32 +02:00
|
|
|
"function anonymous(context,extra
|
|
|
|
|
) {
|
|
|
|
|
let utils = this.utils;
|
2019-05-23 16:14:52 +02:00
|
|
|
let QWeb = this.constructor;
|
2019-07-09 16:38:30 +02:00
|
|
|
let parent = context;
|
2019-05-21 08:32:32 +02:00
|
|
|
let owner = context;
|
|
|
|
|
var h = this.utils.h;
|
|
|
|
|
let c1 = [], p1 = {key:1};
|
|
|
|
|
var vn1 = h('div', p1, c1);
|
|
|
|
|
if (context['state'].display) {
|
2019-06-20 09:42:33 +02:00
|
|
|
//COMPONENT
|
2019-05-21 08:32:32 +02:00
|
|
|
let def3;
|
2019-07-11 14:00:15 +02:00
|
|
|
let w4 = 4 in parent.__owl__.cmap ? parent.__owl__.children[parent.__owl__.cmap[4]] : false;
|
2019-06-14 10:17:13 +02:00
|
|
|
let _2_index = c1.length;
|
|
|
|
|
c1.push(null);
|
2019-05-21 08:32:32 +02:00
|
|
|
let props4 = {};
|
2019-06-01 21:44:43 +02:00
|
|
|
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) {
|
|
|
|
|
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) {
|
|
|
|
|
def3 = w4.__owl__.renderPromise;
|
|
|
|
|
} else {
|
|
|
|
|
w4.destroy();
|
|
|
|
|
w4 = false;
|
|
|
|
|
}
|
2019-05-21 08:32:32 +02:00
|
|
|
}
|
|
|
|
|
if (!w4) {
|
2019-06-20 09:42:33 +02:00
|
|
|
let componentKey4 = \`Child\`;
|
|
|
|
|
let W4 = context.components && context.components[componentKey4] || QWeb.components[componentKey4];
|
|
|
|
|
if (!W4) {throw new Error('Cannot find the definition of component \\"' + componentKey4 + '\\"')}
|
2019-07-09 16:38:30 +02:00
|
|
|
w4 = new W4(parent, props4);
|
2019-07-11 14:00:15 +02:00
|
|
|
parent.__owl__.cmap[4] = w4.__owl__.id;
|
2019-06-24 13:02:12 +02:00
|
|
|
def3 = w4.__prepare();
|
|
|
|
|
def3 = def3.then(vnode=>{let pvnode=h(vnode.sel, {key: 4, hook: {insert(vn) {let nvn=w4.__mount(vnode, pvnode.elm);pvnode.elm=nvn.elm;utils.transitionInsert(vn, 'chimay');},remove() {},destroy(vn) {let finalize = () => {
|
2019-05-21 08:32:32 +02:00
|
|
|
w4.destroy();
|
|
|
|
|
};
|
2019-06-11 14:48:37 +02:00
|
|
|
utils.transitionRemove(vn, 'chimay', finalize);}}});c1[_2_index]=pvnode;w4.__owl__.pvnode = pvnode;});
|
2019-05-21 08:32:32 +02:00
|
|
|
} else {
|
2019-06-24 13:02:12 +02:00
|
|
|
def3 = def3 || w4.__updateProps(props4, extra.forceUpdate, extra.patchQueue);
|
2019-05-21 08:32:32 +02:00
|
|
|
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
|
|
|
|
|
}
|
|
|
|
|
extra.promises.push(def3);
|
|
|
|
|
}
|
|
|
|
|
return vn1;
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`animations t-transition with no delay/duration 1`] = `
|
|
|
|
|
"function anonymous(context,extra
|
|
|
|
|
) {
|
|
|
|
|
var h = this.utils.h;
|
|
|
|
|
let c1 = [], p1 = {key:1};
|
|
|
|
|
var vn1 = h('span', p1, c1);
|
|
|
|
|
p1.hook = {
|
|
|
|
|
insert: vn => {
|
2019-06-11 14:48:37 +02:00
|
|
|
this.utils.transitionInsert(vn, 'jupiler');
|
2019-05-21 08:32:32 +02:00
|
|
|
},
|
|
|
|
|
remove: (vn, rm) => {
|
2019-06-11 14:48:37 +02:00
|
|
|
this.utils.transitionRemove(vn, 'jupiler', rm);
|
2019-05-21 08:32:32 +02:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
c1.push({text: \`blue\`});
|
|
|
|
|
return vn1;
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`animations t-transition, on a simple node (insert) 1`] = `
|
|
|
|
|
"function anonymous(context,extra
|
|
|
|
|
) {
|
|
|
|
|
var h = this.utils.h;
|
|
|
|
|
let c1 = [], p1 = {key:1};
|
|
|
|
|
var vn1 = h('span', p1, c1);
|
|
|
|
|
p1.hook = {
|
|
|
|
|
insert: vn => {
|
2019-06-11 14:48:37 +02:00
|
|
|
this.utils.transitionInsert(vn, 'chimay');
|
2019-05-21 08:32:32 +02:00
|
|
|
},
|
|
|
|
|
remove: (vn, rm) => {
|
2019-06-11 14:48:37 +02:00
|
|
|
this.utils.transitionRemove(vn, 'chimay', rm);
|
2019-05-21 08:32:32 +02:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
c1.push({text: \`blue\`});
|
|
|
|
|
return vn1;
|
|
|
|
|
}"
|
|
|
|
|
`;
|