// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`misc complex template 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, withKey } = helpers;
const comp1 = app.createComponent(\`SlotButton\`, true, false, false, false);
let block3 = createBlock(\`
\`);
let block17 = createBlock(\`
\`);
let block18 = createBlock(\`
\`);
let block19 = createBlock(\`
\`);
let block20 = createBlock(\`
\`);
let block21 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
const b2 = text(\`
\`);
let b4,b5,b9,b14,b16;
let attr1 = \`batch_tile \${ctx['options'].more?'more':'nomore'}\`;
let attr2 = \`card bg-\${ctx['klass']}-light\`;
let attr3 = \`/runbot/batch/\${ctx['batch'].id}\`;
let attr4 = \`badge badge-\${ctx['batch'].has_warning?'warning':'light'}\`;
let txt1 = ctx['batch'].formated_age;
if (ctx['batch'].has_warning) {
b4 = block4();
}
if (ctx['batch'].state=='preparing') {
const b6 = text(\`
\`);
const b7 = block7();
const b8 = text(\`
\`);
b5 = multi([b6, b7, b8]);
}
ctx = Object.create(ctx);
const [k_block9, v_block9, l_block9, c_block9] = prepareList(ctx['batch'].slot_ids.filter(_slot=>_slot.build_id.id&&!_slot.trigger_id.manual&&(ctx['options'].trigger_display[_slot.trigger_id.id])));;
for (let i1 = 0; i1 < l_block9; i1++) {
ctx[\`slot\`] = v_block9[i1];
const key1 = ctx['slot'].id;
const b11 = text(\`
\`);
const b12 = comp1({class: ctx['slot_container'],slot: ctx['slot']}, key + \`__1__\${key1}\`, node, this, null);
const b13 = text(\`
\`);
c_block9[i1] = withKey(multi([b11, b12, b13]), key1);
}
ctx = ctx.__proto__;
b9 = list(c_block9);
ctx = Object.create(ctx);
const [k_block14, v_block14, l_block14, c_block14] = prepareList([1,2,3,4]);;
for (let i1 = 0; i1 < l_block14; i1++) {
ctx[\`x\`] = v_block14[i1];
const key1 = ctx['x'];
c_block14[i1] = withKey(block15(), key1);
}
ctx = ctx.__proto__;
b14 = list(c_block14);
ctx = Object.create(ctx);
const [k_block16, v_block16, l_block16, c_block16] = prepareList(ctx['commit_links']);;
for (let i1 = 0; i1 < l_block16; i1++) {
ctx[\`commit_link\`] = v_block16[i1];
const key1 = ctx['commit_link'].id;
let b18,b19,b20,b21;
let attr5 = \`/runbot/commit/\${ctx['commit_link'].commit_id}\`;
let attr6 = \`badge badge-light batch_commit match_type_\${ctx['commit_link'].match_type}\`;
if (ctx['commit_link'].match_type=='new') {
b18 = block18();
}
if (ctx['commit_link'].match_type=='head') {
b19 = block19();
}
if (ctx['commit_link'].match_type=='base_match') {
b20 = block20();
}
if (ctx['commit_link'].match_type=='base_head') {
b21 = block21();
}
let txt2 = ctx['commit_link'].commit_dname;
let attr7 = 'https://%s/commit/%s'%(ctx['commit_link'].commit_remote_url,ctx['commit_link'].commit_name);
let txt3 = ctx['commit_link'].commit_subject;
c_block16[i1] = withKey(block17([attr5, attr6, txt2, attr7, txt3], [b18, b19, b20, b21]), key1);
}
ctx = ctx.__proto__;
b16 = list(c_block16);
const b3 = block3([attr1, attr2, attr3, attr4, txt1], [b4, b5, b9, b14, b16]);
return multi([b2, b3]);
}
}"
`;
exports[`misc global 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, isBoundary, withDefault, setContextValue, zero, withKey } = helpers;
const callTemplate_1 = app.getTemplate(\`_callee-uses-foo\`);
const callTemplate_2 = app.getTemplate(\`_callee-uses-foo\`);
const callTemplate_3 = app.getTemplate(\`_callee-uses-foo\`);
const callTemplate_4 = app.getTemplate(\`_callee-asc\`);
const callTemplate_5 = app.getTemplate(\`_callee-asc-toto\`);
let block3 = createBlock(\`
\`);
let block7 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
ctx = Object.create(ctx);
ctx[isBoundary] = 1
const b2 = text(\`
\`);
ctx = Object.create(ctx);
const [k_block4, v_block4, l_block4, c_block4] = prepareList([4,5,6]);;
for (let i1 = 0; i1 < l_block4; i1++) {
ctx[\`value\`] = v_block4[i1];
ctx[\`value_first\`] = i1 === 0;
ctx[\`value_last\`] = i1 === v_block4.length - 1;
ctx[\`value_index\`] = i1;
ctx[\`value_value\`] = k_block4[i1];
const key1 = ctx['value'];
const b6 = text(\`
\`);
let txt1 = ctx['value'];
const b7 = block7([txt1]);
const b8 = text(\`
\`);
ctx = Object.create(ctx);
ctx[isBoundary] = 1;
const b10 = text(\`
\`);
ctx = Object.create(ctx);
ctx[isBoundary] = 1;
const b12 = text(\`
\`);
setContextValue(ctx, \\"foo\\", 'aaa');
const b13 = text(\`
\`);
const b11 = multi([b12, b13]);
ctx[zero] = b11;
const b14 = callTemplate_1.call(this, ctx, node, key + \`__1__\${key1}\`);
ctx = ctx.__proto__;
const b15 = text(\`
\`);
const b16 = callTemplate_2.call(this, ctx, node, key + \`__2__\${key1}\`);
const b17 = text(\`
\`);
setContextValue(ctx, \\"foo\\", 'bbb');
const b18 = text(\`
\`);
const b19 = callTemplate_3.call(this, ctx, node, key + \`__3__\${key1}\`);
const b20 = text(\`
\`);
const b9 = multi([b10, b14, b15, b16, b17, b18, b19, b20]);
ctx[zero] = b9;
const b21 = callTemplate_4.call(this, ctx, node, key + \`__4__\${key1}\`);
ctx = ctx.__proto__;
const b22 = text(\`
\`);
c_block4[i1] = withKey(multi([b6, b7, b8, b21, b22]), key1);
}
ctx = ctx.__proto__;
const b4 = list(c_block4);
const b23 = callTemplate_5.call(this, ctx, node, key + \`__5\`);
const b3 = block3([], [b4, b23]);
return multi([b2, b3]);
}
}"
`;
exports[`misc global 2`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { withDefault } = helpers;
let block1 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
let txt1 = withDefault(ctx['foo'], \`foo default\`);
return block1([txt1]);
}
}"
`;
exports[`misc global 3`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { zero } = helpers;
let block1 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
let attr1 = 'agüero';
const b2 = ctx[zero];
return block1([attr1], [b2]);
}
}"
`;
exports[`misc global 4`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { safeOutput } = helpers;
let block1 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
const b3 = text(\`toto default\`);
const b2 = safeOutput(ctx['toto'], b3);
return block1([], [b2]);
}
}"
`;
exports[`misc other complex template 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, withKey } = helpers;
const callTemplate_1 = app.getTemplate(\`LOAD_INFOS_TEMPLATE\`);
const comp1 = app.createComponent(\`BundlesList\`, true, false, false, false);
const comp2 = app.createComponent(\`BundlesList\`, true, false, false, false);
let block3 = createBlock(\`
\`);
let block5 = createBlock(\`
\`);
let block10 = createBlock(\`
Login
\`);
let block16 = createBlock(\`
\`);
let block18 = createBlock(\`
\`);
let block22 = createBlock(\`
\`);
let block24 = createBlock(\`
\`);
let block27 = createBlock(\`
\`);
let block30 = createBlock(\`
\`);
let block32 = createBlock(\`
\`);
let block38 = createBlock(\`
\`);
let block41 = createBlock(\`
\`);
let block44 = createBlock(\`
\`);
let block45 = createBlock(\`
No project
\`);
let block46 = createBlock(\`
\`);
return function template(ctx, node, key = \\"\\") {
const refs = ctx.__owl__.refs;
const ref1 = (el) => refs[\`search_input\`] = el;
const ref2 = (el) => refs[\`settings_menu\`] = el;
const b2 = text(\`
\`);
let b4,b6,b30,b33,b43,b44,b45,b46;
let attr1 = \`/runbot/\${ctx['project'].slug}\`;
let txt1 = ctx['project'].name;
ctx = Object.create(ctx);
const [k_block4, v_block4, l_block4, c_block4] = prepareList(ctx['projects']);;
for (let i1 = 0; i1 < l_block4; i1++) {
ctx[\`project\`] = v_block4[i1];
const key1 = ctx['project'].id;
let hdlr1 = [ctx['selectProject'](ctx['project']), ctx];
let txt2 = ctx['project'].name;
c_block4[i1] = withKey(block5([hdlr1, txt2]), key1);
}
ctx = ctx.__proto__;
b4 = list(c_block4);
if (ctx['user']) {
let b7,b8,b12,b29;
b7 = text(\`
\`);
if (ctx['user'].public) {
const b9 = text(\`
\`);
let attr2 = \`/web/login?redirect=/\`;
const b10 = block10([attr2]);
const b11 = text(\`
\`);
b8 = multi([b9, b10, b11]);
} else {
let b13,b14,b20,b26,b27,b28;
b13 = text(\`
\`);
if (ctx['nb_assigned_errors']&&ctx['nb_assigned_errors']>0) {
const b15 = text(\`
\`);
let attr3 = \`You have \${ctx['nb_assigned_errors']} random bug assigned\`;
let txt3 = ctx['nb_assigned_errors'];
const b16 = block16([attr3, txt3]);
const b17 = text(\`
\`);
const b18 = block18();
const b19 = text(\`
\`);
b14 = multi([b15, b16, b17, b18, b19]);
} else if (ctx['nb_build_errors']&&ctx['nb_build_errors']>0) {
const b21 = text(\`
\`);
const b22 = block22();
const b23 = text(\`
\`);
const b24 = block24();
const b25 = text(\`
\`);
b20 = multi([b21, b22, b23, b24, b25]);
}
b26 = text(\`
\`);
let txt4 = ctx['user'].name.length>25?ctx['user'].namesubstring(0,23)+'...':ctx['user'].name;
let attr4 = \`/web/session/logout?redirect=/\`;
let attr5 = \`/web\`;
b27 = block27([txt4, attr4, attr5]);
b28 = text(\`
\`);
b12 = multi([b13, b14, b20, b26, b27, b28]);
}
b29 = text(\`
\`);
b6 = multi([b7, b8, b12, b29]);
}
let hdlr2 = [ctx['toggleSettingsMenu'], ctx];
let hdlr3 = [ctx['toggleMore'], ctx];
if (ctx['categories']&&ctx['categories'].length>1) {
ctx = Object.create(ctx);
const [k_block31, v_block31, l_block31, c_block31] = prepareList(ctx['categories']);;
for (let i1 = 0; i1 < l_block31; i1++) {
ctx[\`category\`] = v_block31[i1];
const key1 = ctx['category'].id;
let attr6 = ctx['category'].id;
let attr7 = ctx['category'].id==ctx['options'].active_category_id;
let txt5 = ctx['category'].name;
c_block31[i1] = withKey(block32([attr6, attr7, txt5]), key1);
}
ctx = ctx.__proto__;
const b31 = list(c_block31);
b30 = block30([], [b31]);
}
let attr8 = ctx['search'].value;
let hdlr4 = [ctx['updateFilter'], ctx];
let hdlr5 = [ctx['updateFilter'], ctx];
let hdlr6 = [ctx['clearSearch'], ctx];
if (ctx['triggers']) {
const b34 = text(\`
\`);
ctx = Object.create(ctx);
const [k_block35, v_block35, l_block35, c_block35] = prepareList(ctx['triggers']);;
for (let i1 = 0; i1 < l_block35; i1++) {
ctx[\`trigger\`] = v_block35[i1];
const key1 = ctx['trigger'].id;
let b37,b38,b39;
b37 = text(\`
\`);
if (!ctx['trigger'].manual&&ctx['trigger'].project_id===ctx['project'].id&&ctx['trigger'].category_id===ctx['options'].active_category_id) {
let attr9 = \`trigger_\${ctx['trigger'].id}\`;
let attr10 = \`trigger_\${ctx['trigger'].id}\`;
let attr11 = ctx['options'].trigger_display[ctx['trigger'].id];
let attr12 = ctx['trigger'].id;
let hdlr7 = [ctx['updateTriggerDisplay'], ctx];
let attr13 = \`trigger_\${ctx['trigger'].id}\`;
let txt6 = ctx['trigger'].name;
b38 = block38([attr9, attr10, attr11, attr12, hdlr7, attr13, txt6]);
}
b39 = text(\`
\`);
c_block35[i1] = withKey(multi([b37, b38, b39]), key1);
}
ctx = ctx.__proto__;
const b35 = list(c_block35);
const b40 = text(\`
\`);
let hdlr8 = [ctx['triggerAll'], ctx];
let hdlr9 = [ctx['triggerNone'], ctx];
let hdlr10 = [ctx['triggerDefault'], ctx];
let hdlr11 = [ctx['toggleSettingsMenu'], ctx];
const b41 = block41([hdlr8, hdlr9, hdlr10, hdlr11]);
const b42 = text(\`
\`);
b33 = multi([b34, b35, b40, b41, b42]);
}
if (ctx['load_infos']) {
b43 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
}
if (ctx['message']) {
let txt7 = ctx['message'];
b44 = block44([txt7]);
}
if (!ctx['project']) {
b45 = block45();
} else {
const b47 = comp1({bundles: ctx['bundles'].sticky,category_custom_views: ctx['category_custom_views'],search: ctx['search']}, key + \`__2\`, node, this, null);
const b48 = comp2({bundles: ctx['bundles'].dev,search: ctx['search']}, key + \`__3\`, node, this, null);
b46 = block46([], [b47, b48]);
}
const b3 = block3([attr1, txt1, hdlr2, hdlr3, attr8, hdlr4, hdlr5, ref1, hdlr6, ref2], [b4, b6, b30, b33, b43, b44, b45, b46]);
return multi([b2, b3]);
}
}"
`;