
/* /web/static/tests/legacy/ignore_missing_deps_start.js */
window.__odooIgnoreMissingDependencies=true;;

/* /base/static/tests/test_ir_model_fields_translation.js */
odoo.define('@base/../tests/test_ir_model_fields_translation',['@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");function checkLoginColumn(translation){return[stepUtils.showAppsMenuItem(),{content:"Settings",trigger:'a[data-menu-xmlid="base.menu_administration"]',run:'click',},{content:"Open Users & Companies",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:"click",},{content:`Login column should be ${translation}`,trigger:`[data-name="login"] span:contains("${translation}")`,}]}
registry.category("web_tour.tours").add('ir_model_fields_translation_en_tour',{url:'/odoo',steps:()=>checkLoginColumn('Login')});registry.category("web_tour.tours").add('ir_model_fields_translation_en_tour2',{url:'/odoo',steps:()=>checkLoginColumn('Login2')});registry.category("web_tour.tours").add('ir_model_fields_translation_fr_tour',{url:'/odoo',steps:()=>checkLoginColumn('Identifiant')});registry.category("web_tour.tours").add('ir_model_fields_translation_fr_tour2',{url:'/odoo',steps:()=>checkLoginColumn('Identifiant2')});return __exports;});;

/* /web/static/tests/legacy/helpers/cleanup.js */
odoo.define('@web/../tests/legacy/helpers/cleanup',[],function(require){'use strict';let __exports={};const cleanups=[];__exports.registerCleanup=registerCleanup;function registerCleanup(callback){cleanups.push(callback);}
if(window.QUnit){QUnit.on("OdooAfterTestHook",(info)=>{if(QUnit.config.debug){return;}
let cleanup;while((cleanup=cleanups.pop())){try{cleanup(info);}catch(error){console.error(error);}}});const validElements=[{tagName:"DIV",attr:"id",value:"qunit",keep:true},{tagName:"DIV",attr:"id",value:"qunit-fixture",keep:true},{tagName:"SCRIPT",attr:"id",value:""},{tagName:"DIV",attr:"class",value:"o_notification_manager"},{tagName:"DIV",attr:"class",value:"tooltip fade bs-tooltip-auto"},{tagName:"DIV",attr:"class",value:"tooltip fade bs-tooltip-auto show"},{tagName:"DIV",attr:"class",value:"tooltip tooltip-field-info fade bs-tooltip-auto"},{tagName:"DIV",attr:"class",value:"tooltip tooltip-field-info fade bs-tooltip-auto show",},{tagName:"DIV",attr:"class",value:"ui-helper-hidden-accessible"},{tagName:"UL",attr:"class",value:"ui-menu ui-widget ui-widget-content ui-autocomplete ui-front",},{tagName:"UL",attr:"class",value:"ui-menu ui-widget ui-widget-content ui-autocomplete dropdown-menu ui-front",},];QUnit.on("OdooAfterTestHook",function(info){if(QUnit.config.debug){return;}
const failed=info.testReport.getStatus()==="failed";const toRemove=[];for(const bodyChild of document.body.children){const tolerated=validElements.find((e)=>e.tagName===bodyChild.tagName&&bodyChild.getAttribute(e.attr)===e.value);if(!failed&&!tolerated){QUnit.pushFailure(`Body still contains undesirable elements:\n${bodyChild.outerHTML}`);}
if(!tolerated||!tolerated.keep){toRemove.push(bodyChild);}}
const qunitFixture=document.getElementById("qunit-fixture");if(qunitFixture.children.length){toRemove.push(...qunitFixture.children);}
for(const el of toRemove){el.remove();}
document.body.classList.remove("modal-open");});}
return __exports;});odoo.define(`@web/../tests/helpers/cleanup`,['@web/../tests/legacy/helpers/cleanup'],function(require){return require('@web/../tests/legacy/helpers/cleanup');});;

/* /web/static/tests/legacy/helpers/utils.js */
odoo.define('@web/../tests/legacy/helpers/utils',['@web/core/templates','@web/core/browser/browser','@web/core/browser/feature_detection','@web/core/network/download','@web/core/popover/popover','@web/core/utils/concurrency','@web/core/utils/patch','@web/core/utils/ui','@web/core/l10n/translation','@web/../tests/legacy/helpers/cleanup','@odoo/owl'],function(require){'use strict';let __exports={};const{getTemplate}=require("@web/core/templates");const{browser}=require("@web/core/browser/browser");const{isMacOS}=require("@web/core/browser/feature_detection");const{download}=require("@web/core/network/download");const{getPopoverForTarget}=require("@web/core/popover/popover");const{Deferred}=require("@web/core/utils/concurrency");const{patch}=require("@web/core/utils/patch");const{isVisible}=require("@web/core/utils/ui");const{_t}=require("@web/core/l10n/translation");const{registerCleanup}=require("@web/../tests/legacy/helpers/cleanup");const{App,onError,onMounted,onPatched,onRendered,onWillDestroy,onWillPatch,onWillRender,onWillStart,onWillUnmount,onWillUpdateProps,useComponent,}=require("@odoo/owl");__exports.patchDate=patchDate;function patchDate(year,month,day,hours,minutes,seconds,ms=0){var RealDate=window.Date;var actualDate=new RealDate();var fakeDate=new RealDate(year,month,day,hours,minutes,seconds,ms);if(!(luxon.Settings.defaultZone instanceof luxon.FixedOffsetZone)){throw new Error("luxon.Settings.defaultZone must be a FixedOffsetZone");}
const browserOffset=-fakeDate.getTimezoneOffset();const patchedOffset=luxon.Settings.defaultZone.offset();const offsetDiff=patchedOffset-browserOffset;const correctedMinutes=fakeDate.getMinutes()-offsetDiff;fakeDate.setMinutes(correctedMinutes);var timeInterval=actualDate.getTime()-fakeDate.getTime();window.Date=(function(NativeDate){function Date(Y,M,D,h,m,s,ms){var length=arguments.length;let date;if(arguments.length>0){date=length==1&&String(Y)===Y?new NativeDate(Date.parse(Y)):length>=7?new NativeDate(Y,M,D,h,m,s,ms):length>=6?new NativeDate(Y,M,D,h,m,s):length>=5?new NativeDate(Y,M,D,h,m):length>=4?new NativeDate(Y,M,D,h):length>=3?new NativeDate(Y,M,D):length>=2?new NativeDate(Y,M):length>=1?new NativeDate(Y):new NativeDate();date.constructor=Date;return date;}else{date=new NativeDate();var time=date.getTime();time-=timeInterval;date.setTime(time);return date;}}
for(var key in NativeDate){Date[key]=NativeDate[key];}
Date.now=function(){var date=new NativeDate();var time=date.getTime();time-=timeInterval;return time;};Date.UTC=NativeDate.UTC;Date.prototype=NativeDate.prototype;Date.prototype.constructor=Date;Date.parse=NativeDate.parse;return Date;})(Date);registerCleanup(()=>{window.Date=RealDate;});}
__exports.patchTimeZone=patchTimeZone;function patchTimeZone(offset){patchWithCleanup(luxon.Settings,{defaultZone:luxon.FixedOffsetZone.instance(offset)});}
__exports.patchWithCleanup=patchWithCleanup;function patchWithCleanup(obj,patchValue){const unpatch=patch(obj,patchValue);registerCleanup(()=>{unpatch();});}
__exports.getFixture=getFixture;function getFixture(){if(!window.QUnit){return document;}
if(QUnit.config.debug){return document.body;}else{return document.getElementById("qunit-fixture");}}
__exports.nextTick=nextTick;async function nextTick(){await new Promise((resolve)=>window.requestAnimationFrame(resolve));await new Promise((resolve)=>setTimeout(resolve));}
__exports.makeDeferred=makeDeferred;function makeDeferred(){return new Deferred();}
__exports.findElement=findElement;function findElement(el,selector){let target=el;if(selector){const els=el.querySelectorAll(selector);if(els.length===0){throw new Error(`No element found (selector: ${selector})`);}
if(els.length>1){throw new Error(`Found ${els.length} elements, instead of 1 (selector: ${selector})`);}
target=els[0];}
return target;}
const mapBubblingEvent=(args)=>({...args,bubbles:true});const mapNonBubblingEvent=(args)=>({...args,bubbles:false});const mapBubblingPointerEvent=(args={})=>({clientX:args.pageX,clientY:args.pageY,...args,bubbles:true,cancelable:true,view:window,});const mapNonBubblingPointerEvent=(args)=>({...mapBubblingPointerEvent(args),bubbles:false,cancelable:false,});const mapCancelableTouchEvent=(args={})=>({...args,bubbles:true,cancelable:true,composed:true,rotation:0.0,touches:args.touches?[...args.touches.map((e)=>new Touch(e))]:undefined,view:window,zoom:1.0,});const mapNonCancelableTouchEvent=(args)=>({...mapCancelableTouchEvent(args),cancelable:false,});const mapKeyboardEvent=(args)=>({...args,bubbles:true,cancelable:true,});const getEventConstructor=(eventType)=>{switch(eventType){case"auxclick":case"click":case"contextmenu":case"dblclick":case"mousedown":case"mouseup":case"mousemove":case"mouseover":case"mouseout":{return[MouseEvent,mapBubblingPointerEvent];}
case"mouseenter":case"mouseleave":{return[MouseEvent,mapNonBubblingPointerEvent];}
case"pointerdown":case"pointerup":case"pointermove":case"pointerover":case"pointerout":{return[PointerEvent,mapBubblingPointerEvent];}
case"pointerenter":case"pointerleave":{return[PointerEvent,mapNonBubblingPointerEvent];}
case"focusin":{return[FocusEvent,mapBubblingEvent];}
case"focus":case"blur":{return[FocusEvent,mapNonBubblingEvent];}
case"cut":case"copy":case"paste":{return[ClipboardEvent,mapBubblingEvent];}
case"keydown":case"keypress":case"keyup":{return[KeyboardEvent,mapKeyboardEvent];}
case"drag":case"dragend":case"dragenter":case"dragstart":case"dragleave":case"dragover":case"drop":{return[DragEvent,mapBubblingEvent];}
case"input":{return[InputEvent,mapBubblingEvent];}
case"compositionstart":case"compositionend":{return[CompositionEvent,mapBubblingEvent];}
case"scroll":{return[UIEvent,mapNonBubblingEvent];}
case"touchstart":case"touchend":case"touchmove":{return[TouchEvent,mapCancelableTouchEvent];}
case"touchcancel":{return[TouchEvent,mapNonCancelableTouchEvent];}
default:{return[Event,mapBubblingEvent];}}};__exports.triggerEvent=triggerEvent;function triggerEvent(el,selector,eventType,eventInit,options={}){const errors=[];const target=findElement(el,selector);if(typeof eventType!=="string"){errors.push("event type must be a string");}
if(!target){errors.push("cannot find target");}else if(!options.skipVisibilityCheck&&!isVisible(target)){errors.push("target is not visible");}
if(errors.length){throw new Error(`Cannot trigger event${eventType ? `"${eventType}"` : ""}${
                selector ? `(with selector"${selector}")` : ""
            }: ${errors.join(" and ")}`);}
const[Constructor,processParams]=getEventConstructor(eventType);const event=new Constructor(eventType,processParams(eventInit));target.dispatchEvent(event);if(window.QUnit&&QUnit.config.debug){const group=`%c[${event.type.toUpperCase()}]`;console.groupCollapsed(group,"color: #b52c9b");console.log(target,event);console.groupEnd(group,"color: #b52c9b");}
if(options.sync){return event;}else{return nextTick().then(()=>event);}}
__exports.triggerEvents=triggerEvents;function triggerEvents(el,selector,eventDefs,options={}){const events=[...eventDefs].map((eventDef)=>{const[eventType,eventInit]=Array.isArray(eventDef)?eventDef:[eventDef,{}];return triggerEvent(el,selector,eventType,eventInit,options);});if(options.sync){return events;}else{return nextTick().then(()=>events);}}
__exports.triggerScroll=triggerScroll;async function triggerScroll(target,coordinates={left:null,top:null},canPropagate=true){const isScrollable=(target.scrollHeight>target.clientHeight&&target.clientHeight>0)||(target.scrollWidth>target.clientWidth&&target.clientWidth>0);if(!isScrollable&&!canPropagate){return;}
if(isScrollable){const canScrollFrom={left:coordinates.left>target.scrollLeft?target.scrollLeft+target.clientWidth<target.scrollWidth:target.scrollLeft>0,top:coordinates.top>target.scrollTop?target.scrollTop+target.clientHeight<target.scrollHeight:target.scrollTop>0,};const scrollCoordinates={};Object.entries(coordinates).forEach(([key,value])=>{if(value!==null&&canScrollFrom[key]){scrollCoordinates[key]=value;delete coordinates[key];}});target.scrollTo(scrollCoordinates);await triggerEvent(target,null,"scroll");if(!canPropagate||!Object.entries(coordinates).length){return;}}
target.parentElement?triggerScroll(target.parentElement,coordinates):triggerEvent(window,null,"scroll");await nextTick();}
__exports.click=click;function click(el,selector,{mouseEventInit={},skipDisabledCheck=false,skipVisibilityCheck=false}={}){if(!skipDisabledCheck&&el.disabled){throw new Error("Can't click on a disabled button");}
return triggerEvents(el,selector,["pointerdown","mousedown","focus","focusin","pointerup","mouseup",["click",mouseEventInit],],{skipVisibilityCheck});}
__exports.clickCreate=clickCreate;function clickCreate(htmlElement){if(htmlElement.querySelectorAll(".o_control_panel_main_buttons .o_form_button_create").length){return click(htmlElement,".o_control_panel_main_buttons .o_form_button_create");}else if(htmlElement.querySelectorAll(".o_control_panel_main_buttons .o_list_button_create").length){return click(htmlElement,".o_control_panel_main_buttons .o_list_button_create");}else{throw new Error("No edit button found to be clicked.");}}
__exports.clickEdit=clickEdit;function clickEdit(htmlElement){if(htmlElement.querySelectorAll(".o_list_button_edit").length){return click(htmlElement,".o_list_button_edit");}else{throw new Error("No edit button found to be clicked.");}}
__exports.clickSave=clickSave;async function clickSave(htmlElement){if(htmlElement.querySelectorAll(".o_form_status_indicator").length){await mouseEnter(htmlElement,".o_form_status_indicator");}
if(htmlElement.querySelectorAll(".o_form_button_save").length){return click(htmlElement,".o_form_button_save");}
const listSaveButtons=htmlElement.querySelectorAll(".o_list_button_save");if(listSaveButtons.length){return listSaveButtons.length>=2?click(listSaveButtons[1]):click(listSaveButtons[0]);}else{throw new Error("No save button found to be clicked.");}}
__exports.clickDiscard=clickDiscard;async function clickDiscard(htmlElement){if(htmlElement.querySelectorAll(".o_form_status_indicator").length){await mouseEnter(htmlElement,".o_form_status_indicator");}
if(htmlElement.querySelectorAll(".o_form_button_cancel").length){return click(htmlElement,".o_form_button_cancel");}else if($(htmlElement).find(".o_list_button_discard:visible").length){return click($(htmlElement).find(".o_list_button_discard:visible").get(0));}else{throw new Error("No discard button found to be clicked.");}}
__exports.mouseEnter=mouseEnter;async function mouseEnter(el,selector,coordinates){const target=el.querySelector(selector)||el;const atPos=coordinates||{clientX:target.getBoundingClientRect().left+target.getBoundingClientRect().width/2,clientY:target.getBoundingClientRect().top+target.getBoundingClientRect().height/2,};return triggerEvents(target,null,["pointerenter","mouseenter"],atPos);}
__exports.mouseLeave=mouseLeave;async function mouseLeave(el,selector){const target=el.querySelector(selector)||el;return triggerEvents(target,null,["pointerleave","mouseleave"]);}
__exports.editInput=editInput;async function editInput(el,selector,value){const input=findElement(el,selector);if(!(input instanceof HTMLInputElement||input instanceof HTMLTextAreaElement)){throw new Error("Only 'input' and 'textarea' elements can be edited with 'editInput'.");}
if(!["text","textarea","email","search","color","number","file","tel"].includes(input.type)){throw new Error(`Type "${input.type}" not supported by 'editInput'.`);}
const eventOpts={};if(input.type==="file"){const files=Array.isArray(value)?value:[value];const dataTransfer=new DataTransfer();for(const file of files){if(!(file instanceof File)){throw new Error(`File input value should be one or several File objects.`);}
dataTransfer.items.add(file);}
input.files=dataTransfer.files;eventOpts.skipVisibilityCheck=true;}else{input.value=value;}
await triggerEvents(input,null,["input","change"],eventOpts);if(input.type==="file"){await nextTick();await nextTick();}}
__exports.editSelect=editSelect;function editSelect(el,selector,value){const select=findElement(el,selector);if(select.tagName!=="SELECT"){throw new Error("Only select tag can be edited with selectInput.");}
select.value=value;return triggerEvent(select,null,"change");}
__exports.editSelectMenu=editSelectMenu;async function editSelectMenu(el,selector,value){const dropdown=el.querySelector(selector);await click(dropdown.querySelector(".dropdown-toggle"));for(const item of Array.from(el.querySelectorAll(".o_select_menu_menu .dropdown-item"))){if(item.textContent===value){return click(item);}}}
__exports.triggerHotkey=triggerHotkey;async function triggerHotkey(hotkey,addOverlayModParts=false,eventAttrs={}){eventAttrs.key=hotkey.split("+").pop();if(/shift/i.test(hotkey)){eventAttrs.shiftKey=true;}
if(/control/i.test(hotkey)){if(isMacOS()){eventAttrs.metaKey=true;}else{eventAttrs.ctrlKey=true;}}
if(/alt/i.test(hotkey)||addOverlayModParts){if(isMacOS()){eventAttrs.ctrlKey=true;}else{eventAttrs.altKey=true;}}
if(!("bubbles"in eventAttrs)){eventAttrs.bubbles=true;}
const[keydownEvent,keyupEvent]=await triggerEvents(document.activeElement,null,[["keydown",eventAttrs],["keyup",eventAttrs],],{skipVisibilityCheck:true});return{keydownEvent,keyupEvent};}
__exports.mockDownload=mockDownload;function mockDownload(cb){patchWithCleanup(download,{_download:cb});}
const hushConsole=__exports.hushConsole=Object.create(null);for(const propName of Object.keys(window.console)){hushConsole[propName]=()=>{};}
__exports.mockSendBeacon=mockSendBeacon;function mockSendBeacon(mock){patchWithCleanup(navigator,{sendBeacon:(url,blob)=>{return mock(url,blob)!==false;},});}
__exports.mockTimeout=mockTimeout;function mockTimeout(){const timeouts=new Map();let currentTime=0;let id=1;patchWithCleanup(browser,{setTimeout(fn,delay=0){timeouts.set(id,{fn,scheduledFor:delay+currentTime,id});return id++;},clearTimeout(id){timeouts.delete(id);},});return{execRegisteredTimeouts(){for(const{fn}of timeouts.values()){fn();}
timeouts.clear();},async advanceTime(duration){await nextTick();currentTime+=duration;for(const{fn,scheduledFor,id}of timeouts.values()){if(scheduledFor<=currentTime){fn();timeouts.delete(id);}}
await nextTick();},};}
__exports.mockAnimationFrame=mockAnimationFrame;function mockAnimationFrame(){const callbacks=new Map();let currentTime=0;let id=1;patchWithCleanup(browser,{requestAnimationFrame(fn){callbacks.set(id,{fn,scheduledFor:16+currentTime,id});return id++;},cancelAnimationFrame(id){callbacks.delete(id);},performance:{now:()=>currentTime},});return{execRegisteredAnimationFrames(){for(const{fn}of callbacks.values()){fn(currentTime);}
callbacks.clear();},async advanceFrame(count=1){await nextTick();currentTime+=16*count;for(const{fn,scheduledFor,id}of callbacks.values()){if(scheduledFor<=currentTime){fn(currentTime);callbacks.delete(id);}}
await nextTick();},};}
__exports.mount=mount;async function mount(Comp,target,config={}){let{props,env}=config;env=env||{};const configuration={env,getTemplate,test:true,props,};if(env.services&&"localization"in env.services){configuration.translateFn=_t;}
const app=new App(Comp,configuration);registerCleanup(()=>app.destroy());return app.mount(target);}
__exports.destroy=destroy;function destroy(comp){comp.__owl__.app.destroy();}
__exports.findChildren=findChildren;function findChildren(comp,predicate=(e)=>e){const queue=[];[].unshift.apply(queue,Object.values(comp.__owl__.children));while(queue.length>0){const curNode=queue.pop();if(predicate(curNode)){return curNode;}
[].unshift.apply(queue,Object.values(curNode.component.__owl__.children));}}
__exports.useChild=useChild;function useChild(){const node=useComponent().__owl__;const setChild=()=>{const componentNode=Object.values(node.children)[0];node.component.child=componentNode.component;};onMounted(setChild);onPatched(setChild);}
__exports.useLogLifeCycle=useLogLifeCycle;function useLogLifeCycle(logFn,name=""){const component=useComponent();let loggedName=`${component.constructor.name}`;if(name){loggedName=`${component.constructor.name} ${name}`;}
onError(()=>{logFn(`onError ${loggedName}`);});onMounted(()=>{logFn(`onMounted ${loggedName}`);});onPatched(()=>{logFn(`onPatched ${loggedName}`);});onRendered(()=>{logFn(`onRendered ${loggedName}`);});onWillDestroy(()=>{logFn(`onWillDestroy ${loggedName}`);});onWillPatch(()=>{logFn(`onWillPatch ${loggedName}`);});onWillRender(()=>{logFn(`onWillRender ${loggedName}`);});onWillStart(()=>{logFn(`onWillStart ${loggedName}`);});onWillUnmount(()=>{logFn(`onWillUnmount ${loggedName}`);});onWillUpdateProps(()=>{logFn(`onWillUpdateProps ${loggedName}`);});}
function getDifferentParents(n1,n2){const parents=[n2];while(parents[0].parentNode){const parent=parents[0].parentNode;if(parent.contains(n1)){break;}
parents.unshift(parent);}
return parents;}
__exports.dragAndDrop=dragAndDrop;async function dragAndDrop(from,to,position){const{drop}=await drag(from);await drop(to,position);}
__exports.drag=drag;async function drag(from,pointerType="mouse"){const assertIsDragging=(fn,endDrag)=>{return{async[fn.name](...args){if(dragEndReason){throw new Error(`Cannot execute drag helper '${fn.name}': drag sequence has been ended by '${dragEndReason}'.`);}
await fn(...args);if(endDrag){dragEndReason=fn.name;}},}[fn.name];};const cancel=assertIsDragging(async function cancel(){await triggerEvent(window,null,"keydown",{key:"Escape"});},true);const drop=assertIsDragging(async function drop(to,position){if(to){await moveTo(to,position);}
await triggerEvent(target||source,null,"pointerup",targetPosition);},true);const getEl=(selector)=>selector instanceof Element?selector:fixture.querySelector(selector);const getTargetPosition=(position)=>{const tRect=target.getBoundingClientRect();const tPos={clientX:Math.floor(tRect.x),clientY:Math.floor(tRect.y),};if(position&&typeof position==="object"){tPos.clientX+=position.x||0;tPos.clientY+=position.y||0;}else{const positions=typeof position==="string"?position.split("-"):[];if(positions.includes("left")){tPos.clientX-=1;}else if(positions.includes("right")){tPos.clientX+=Math.ceil(tRect.width)+1;}else{tPos.clientX+=Math.floor(tRect.width/2);}
if(positions.includes("top")){tPos.clientY-=1;}else if(positions.includes("bottom")){tPos.clientY+=Math.ceil(tRect.height)+1;}else{tPos.clientY+=Math.floor(tRect.height/2);}}
return tPos;};const moveTo=assertIsDragging(async function moveTo(to,position){target=getEl(to);if(!target){return;}
targetPosition=getTargetPosition(position);await triggerEvent(source,null,"pointermove",{...targetPosition,button:-1});for(const parent of getDifferentParents(source,target)){triggerEvent(parent,null,"pointerenter",targetPosition);}
await nextTick();return dragHelpers;},false);const dragHelpers={cancel,drop,moveTo};const fixture=getFixture();const source=getEl(from instanceof Element?from:fixture.querySelector(from));const sourceRect=source.getBoundingClientRect();let dragEndReason=null;let target;let targetPosition;await triggerEvent(source,null,"pointerdown",{pointerType,clientX:sourceRect.x+sourceRect.width/2,clientY:sourceRect.y+sourceRect.height/2,});return dragHelpers;}
__exports.getDropdownMenu=getDropdownMenu;function getDropdownMenu(target,togglerSelector){if(!(target instanceof HTMLElement)){throw new Error(`getDropdownMenu: target is not an HTMLElement.`);}
let el=togglerSelector instanceof HTMLElement?togglerSelector:target.querySelector(togglerSelector);if(el&&!el.classList.contains("o-dropdown")){el=el.querySelector(".o-dropdown");}
if(!el){throw new Error(`getDropdownMenu: Could not find element "${togglerSelector}".`);}
return getPopoverForTarget(el);}
__exports.clickDropdown=clickDropdown;async function clickDropdown(target,fieldName){const dropdownInput=target.querySelector(`[name='${fieldName}'] .dropdown input`);dropdownInput.focus();await nextTick();await click(dropdownInput);}
__exports.clickOpenedDropdownItem=clickOpenedDropdownItem;async function clickOpenedDropdownItem(target,fieldName,itemContent){const dropdowns=target.querySelectorAll(`[name='${fieldName}'] .dropdown .dropdown-menu`);if(dropdowns.length===0){throw new Error(`No dropdown found for field ${fieldName}`);}else if(dropdowns.length>1){throw new Error(`Found ${dropdowns.length} dropdowns for field ${fieldName}`);}
const dropdownItems=dropdowns[0].querySelectorAll("li");const indexToClick=Array.from(dropdownItems).map((html)=>html.textContent).indexOf(itemContent);if(indexToClick===-1){throw new Error(`The element '${itemContent}' does not exist in the dropdown`);}
await click(dropdownItems[indexToClick]);}
__exports.selectDropdownItem=selectDropdownItem;async function selectDropdownItem(target,fieldName,itemContent){await clickDropdown(target,fieldName);await clickOpenedDropdownItem(target,fieldName,itemContent);}
__exports.getNodesTextContent=getNodesTextContent;function getNodesTextContent(nodes){return Array.from(nodes).map((n)=>n.textContent);}
__exports.clickOpenM2ODropdown=clickOpenM2ODropdown;async function clickOpenM2ODropdown(el,fieldName,selector){const m2oSelector=`${selector || ""} .o_field_many2one[name=${fieldName}] input`;const matches=el.querySelectorAll(m2oSelector);if(matches.length!==1){throw new Error(`cannot open m2o: selector ${selector} has been found ${matches.length} instead of 1`);}
await click(matches[0]);return matches[0];}
__exports.clickM2OHighlightedItem=clickM2OHighlightedItem;async function clickM2OHighlightedItem(el,fieldName,selector){const m2oSelector=`${selector || ""} .o_field_many2one[name=${fieldName}] input`;const matches=el.querySelectorAll(m2oSelector);if(matches.length!==1){throw new Error(`cannot open m2o: selector ${selector} has been found ${matches.length} instead of 1`);}
return click(matches[0].parentElement.querySelector("li"));}
__exports.addRow=addRow;async function addRow(target,selector){await click(target.querySelector(`${selector ? selector : ""} .o_field_x2many_list_row_add a`));}
__exports.removeRow=removeRow;async function removeRow(target,index){await click(target.querySelectorAll(".o_list_record_remove")[index]);}
return __exports;});odoo.define(`@web/../tests/helpers/utils`,['@web/../tests/legacy/helpers/utils'],function(require){return require('@web/../tests/legacy/helpers/utils');});;

/* /web/static/tests/legacy/utils.js */
odoo.define('@web/../tests/legacy/utils',['@web/core/utils/ui','@web/../tests/helpers/cleanup','@web/../tests/helpers/utils'],function(require){'use strict';let __exports={};const{isVisible}=require("@web/core/utils/ui");const{registerCleanup}=require("@web/../tests/helpers/cleanup");const{click:webClick,getFixture,makeDeferred,triggerEvents:webTriggerEvents,}=require("@web/../tests/helpers/utils");function createFakeDataTransfer(files){return{dropEffect:"all",effectAllowed:"all",files,items:[],types:["Files"],};}
__exports.click=click;async function click(selector,options={}){const{shiftKey}=options;delete options.shiftKey;await contains(selector,{click:{shiftKey},...options});}
__exports.dragenterFiles=dragenterFiles;async function dragenterFiles(selector,files,options){await contains(selector,{dragenterFiles:files,...options});}
__exports.dragoverFiles=dragoverFiles;async function dragoverFiles(selector,files,options){await contains(selector,{dragoverFiles:files,...options});}
__exports.dropFiles=dropFiles;async function dropFiles(selector,files,options){await contains(selector,{dropFiles:files,...options});}
__exports.inputFiles=inputFiles;async function inputFiles(selector,files,options){await contains(selector,{inputFiles:files,...options});}
__exports.pasteFiles=pasteFiles;async function pasteFiles(selector,files,options){await contains(selector,{pasteFiles:files,...options});}
__exports.focus=focus;async function focus(selector,options){await contains(selector,{setFocus:true,...options});}
__exports.insertText=insertText;async function insertText(selector,content,options={}){const{replace=false}=options;delete options.replace;await contains(selector,{...options,insertText:{content,replace}});}
__exports.scroll=scroll;async function scroll(selector,scrollTop,options){await contains(selector,{setScroll:scrollTop,...options});}
__exports.triggerEvents=triggerEvents;async function triggerEvents(selector,events,options){await contains(selector,{triggerEvents:events,...options});}
function log(ok,message){if(window.QUnit){QUnit.assert.ok(ok,message);}else{if(ok){console.log(message);}else{console.error(message);}}}
let hasUsedContainsPositively=false;if(window.QUnit){QUnit.testStart(()=>(hasUsedContainsPositively=false));}
class Contains{constructor(selector,options={}){this.selector=selector;this.options=options;this.options.count??=1;this.options.targetParam=this.options.target;this.options.target??=getFixture();let selectorMessage=`${this.options.count} of "${this.selector}"`;if(this.options.visible!==undefined){selectorMessage=`${selectorMessage} ${
                this.options.visible ? "visible" : "invisible"
            }`;}
if(this.options.targetParam){selectorMessage=`${selectorMessage} inside a specific target`;}
if(this.options.parent){selectorMessage=`${selectorMessage} inside a specific parent`;}
if(this.options.contains){selectorMessage=`${selectorMessage} with a specified sub-contains`;}
if(this.options.text!==undefined){selectorMessage=`${selectorMessage} with text "${this.options.text}"`;}
if(this.options.textContent!==undefined){selectorMessage=`${selectorMessage} with textContent "${this.options.textContent}"`;}
if(this.options.value!==undefined){selectorMessage=`${selectorMessage} with value "${this.options.value}"`;}
if(this.options.scroll!==undefined){selectorMessage=`${selectorMessage} with scroll "${this.options.scroll}"`;}
if(this.options.after!==undefined){selectorMessage=`${selectorMessage} after a specified element`;}
if(this.options.before!==undefined){selectorMessage=`${selectorMessage} before a specified element`;}
this.selectorMessage=selectorMessage;if(this.options.contains&&!Array.isArray(this.options.contains[0])){this.options.contains=[this.options.contains];}
if(this.options.count){hasUsedContainsPositively=true;}else if(!hasUsedContainsPositively){throw new Error(`Starting a test with "contains" of count 0 for selector "${this.selector}" is useless because it might immediately resolve. Start the test by checking that an expected element actually exists.`);}
this.successMessage=undefined;this.executeError=undefined;}
run(){this.done=false;this.def=makeDeferred();this.scrollListeners=new Set();this.onScroll=()=>this.runOnce("after scroll");if(!this.runOnce("immediately")){this.timer=setTimeout(()=>this.runOnce("Timeout of 5 seconds",{crashOnFail:true}),5000);this.observer=new MutationObserver((mutations)=>{try{this.runOnce("after mutations");}catch(e){this.def.reject(e);}});this.observer.observe(this.options.target,{attributes:true,childList:true,subtree:true,});registerCleanup(()=>{if(!this.done){this.runOnce("Test ended",{crashOnFail:true});}});}
return this.def;}
runOnce(whenMessage,{crashOnFail=false,executeOnSuccess=true}={}){const res=this.select();if(res?.length===this.options.count||crashOnFail){this.observer?.disconnect();clearTimeout(this.timer);for(const el of this.scrollListeners??[]){el.removeEventListener("scroll",this.onScroll);}
this.done=true;}
if(res?.length===this.options.count){this.successMessage=`Found ${this.selectorMessage} (${whenMessage})`;if(executeOnSuccess){this.executeAction(res[0]);}
return res;}else{this.executeError=()=>{let message=`Failed to find ${this.selectorMessage} (${whenMessage}).`;message=res?`${message} Found ${res.length} instead.`:`${message} Parent not found.`;if(this.parentContains){if(this.parentContains.successMessage){log(true,this.parentContains.successMessage);}else{this.parentContains.executeError();}}
log(false,message);this.def?.reject(new Error(message));for(const childContains of this.childrenContains||[]){if(childContains.successMessage){log(true,childContains.successMessage);}else{childContains.executeError();}}};if(crashOnFail){this.executeError();}}}
executeAction(el){let message=this.successMessage;if(this.options.click){message=`${message} and clicked it`;webClick(el,undefined,{mouseEventInit:this.options.click,skipDisabledCheck:true,skipVisibilityCheck:true,});}
if(this.options.dragenterFiles){message=`${message} and dragentered ${this.options.dragenterFiles.length} file(s)`;const ev=new Event("dragenter",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dragenterFiles),});el.dispatchEvent(ev);}
if(this.options.dragoverFiles){message=`${message} and dragovered ${this.options.dragoverFiles.length} file(s)`;const ev=new Event("dragover",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dragoverFiles),});el.dispatchEvent(ev);}
if(this.options.dropFiles){message=`${message} and dropped ${this.options.dropFiles.length} file(s)`;const ev=new Event("drop",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dropFiles),});el.dispatchEvent(ev);}
if(this.options.inputFiles){message=`${message} and inputted ${this.options.inputFiles.length} file(s)`;const dataTransfer=new window.DataTransfer();for(const file of this.options.inputFiles){dataTransfer.items.add(file);}
el.files=dataTransfer.files;const versionRaw=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);const chromeVersion=versionRaw?parseInt(versionRaw[2],10):false;if(!chromeVersion||chromeVersion>=73){el.dispatchEvent(new Event("change"));}}
if(this.options.insertText!==undefined){message=`${message} and inserted text "${this.options.insertText.content}" (replace: ${this.options.insertText.replace})`;el.focus();if(this.options.insertText.replace){el.value="";el.dispatchEvent(new window.KeyboardEvent("keydown",{key:"Backspace"}));el.dispatchEvent(new window.KeyboardEvent("keyup",{key:"Backspace"}));el.dispatchEvent(new window.InputEvent("input"));}
for(const char of this.options.insertText.content){el.value+=char;el.dispatchEvent(new window.KeyboardEvent("keydown",{key:char}));el.dispatchEvent(new window.KeyboardEvent("keyup",{key:char}));el.dispatchEvent(new window.InputEvent("input"));}
el.dispatchEvent(new window.InputEvent("change"));}
if(this.options.pasteFiles){message=`${message} and pasted ${this.options.pasteFiles.length} file(s)`;const ev=new Event("paste",{bubbles:true});Object.defineProperty(ev,"clipboardData",{value:createFakeDataTransfer(this.options.pasteFiles),});el.dispatchEvent(ev);}
if(this.options.setFocus){message=`${message} and focused it`;el.focus();}
if(this.options.setScroll!==undefined){message=`${message} and set scroll to "${this.options.setScroll}"`;el.scrollTop=this.options.setScroll==="bottom"?el.scrollHeight:this.options.setScroll;}
if(this.options.triggerEvents){message=`${message} and triggered "${this.options.triggerEvents.join(", ")}" events`;webTriggerEvents(el,null,this.options.triggerEvents,{skipVisibilityCheck:true,});}
if(this.parentContains){log(true,this.parentContains.successMessage);}
log(true,message);for(const childContains of this.childrenContains){log(true,childContains.successMessage);}
this.def?.resolve();}
select(){const target=this.selectParent();if(!target){return;}
const baseRes=[...target.querySelectorAll(this.selector)].map((el)=>(this.options.shadowRoot?el.shadowRoot:el)).filter((el)=>el);this.childrenContains=[];const res=baseRes.filter((el,currentIndex)=>{let condition=(this.options.textContent===undefined||el.textContent.trim()===this.options.textContent)&&(this.options.value===undefined||el.value===this.options.value)&&(this.options.scroll===undefined||(this.options.scroll==="bottom"?Math.abs(el.scrollHeight-el.clientHeight-el.scrollTop)<=1:Math.abs(el.scrollTop-this.options.scroll)<=1));if(condition&&this.options.text!==undefined){if(el.textContent.trim()!==this.options.text&&[...el.querySelectorAll("*")].every((el)=>el.textContent.trim()!==this.options.text)){condition=false;}}
if(condition&&this.options.contains){for(const param of this.options.contains){const childContains=new Contains(param[0],{...param[1],target:el});if(!childContains.runOnce(`as child of el ${currentIndex + 1})`,{executeOnSuccess:false,})){condition=false;}
this.childrenContains.push(childContains);}}
if(condition&&this.options.visible!==undefined){if(isVisible(el)!==this.options.visible){condition=false;}}
if(condition&&this.options.after){const afterContains=new Contains(this.options.after[0],{...this.options.after[1],target,});const afterEl=afterContains.runOnce(`as "after"`,{executeOnSuccess:false,})?.[0];if(!afterEl||!(el.compareDocumentPosition(afterEl)&Node.DOCUMENT_POSITION_PRECEDING)){condition=false;}
this.childrenContains.push(afterContains);}
if(condition&&this.options.before){const beforeContains=new Contains(this.options.before[0],{...this.options.before[1],target,});const beforeEl=beforeContains.runOnce(`as "before"`,{executeOnSuccess:false,})?.[0];if(!beforeEl||!(el.compareDocumentPosition(beforeEl)&Node.DOCUMENT_POSITION_FOLLOWING)){condition=false;}
this.childrenContains.push(beforeContains);}
return condition;});if(this.options.scroll!==undefined&&this.scrollListeners&&baseRes.length===this.options.count&&res.length!==this.options.count){for(const el of baseRes){if(!this.scrollListeners.has(el)){this.scrollListeners.add(el);el.addEventListener("scroll",this.onScroll);}}}
return res;}
selectParent(){if(this.options.parent){this.parentContains=new Contains(this.options.parent[0],{...this.options.parent[1],target:this.options.target,});return this.parentContains.runOnce(`as parent`,{executeOnSuccess:false})?.[0];}
return this.options.target;}}
__exports.contains=contains;async function contains(selector,options){await new Contains(selector,options).run();}
const stepState={expectedSteps:null,deferred:null,timeout:null,currentSteps:[],clear(){clearTimeout(this.timeout);this.timeout=null;this.deferred=null;this.currentSteps=[];this.expectedSteps=null;},check({crashOnFail=false}={}){const success=this.expectedSteps.length===this.currentSteps.length&&this.expectedSteps.every((s,i)=>s===this.currentSteps[i]);if(!success&&!crashOnFail){return;}
QUnit.config.current.assert.verifySteps(this.expectedSteps);if(success){this.deferred.resolve();}else{this.deferred.reject(new Error("Steps do not match."));}
this.clear();},};if(window.QUnit){QUnit.testStart(()=>registerCleanup(()=>{if(stepState.expectedSteps){stepState.check({crashOnFail:true});}else{stepState.clear();}}));}
__exports.step=step;function step(step){stepState.currentSteps.push(step);QUnit.config.current.assert.step(step);if(stepState.expectedSteps){stepState.check();}}
__exports.assertSteps=assertSteps;function assertSteps(steps){if(stepState.expectedSteps){stepState.check({crashOnFail:true});}
stepState.expectedSteps=steps;stepState.deferred=makeDeferred();stepState.timeout=setTimeout(()=>stepState.check({crashOnFail:true}),2000);stepState.check();return stepState.deferred;}
return __exports;});odoo.define(`@web/../tests/utils`,['@web/../tests/legacy/utils'],function(require){return require('@web/../tests/legacy/utils');});;

/* /web/static/tests/tours/user_switch_tour.js */
odoo.define('@web/../tests/tours/user_switch_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function logout(){return[{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",run:"click",},{content:"click the Log out button",trigger:".dropdown-item[data-menu=logout]",run:"click",expectUnloadPage:true,},];}
registry.category("web_tour.tours").add("test_user_switch",{url:"/odoo",steps:()=>[...logout(),{content:"check if the login input is empty",trigger:"input#login:empty",},{content:"check if the password input is empty",trigger:"input#password:empty",},{content:"Should contains the user switch button",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Click on Marc Demo on the quick login page",trigger:".o_user_switch:not(:has(.list-group-item:nth-child(2))) .list-group-item:contains('Marc Demo')",run:"click",},{content:"Check user choice button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Display the login form",trigger:".o_user_switch .fa-user-circle-o",run:"click",},{content:"fill the login",trigger:"input#login",run:"edit admin",},{content:"fill the password",trigger:"input#password",run:"edit admin",},{content:"click on login button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},...logout(),{content:"Check if there is Mitchell Admin in user list selection",trigger:".o_user_switch .list-group-item:nth-child(1):contains('Mitchell Admin')",},{content:"Check if there is Marc Demo in user list selection",trigger:".o_user_switch .list-group-item:nth-child(2):contains('Marc Demo')",},{content:"Choice demo",trigger:".o_user_switch .list-group-item:contains('Marc Demo')",run:"click",},{content:"check the login for demo",trigger:"input#login:value('demo')",},{content:"fill the password",trigger:"input#password",run:"edit demo",},{content:"Check back button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Check have 2 users",trigger:".o_user_switch .list-group-item:nth-child(2)",},{content:"Click on Mitchell Admin",trigger:".o_user_switch .list-group-item:nth-child(1):contains('Mitchell Admin')",run:"click",},{content:"check the login for admin",trigger:"input#login:value('admin')",},{content:"fill the password",trigger:"input#password",run:"edit admin",},{content:"Check back button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Display the login form",trigger:".o_user_switch .fa-user-circle-o",run:"click",},{content:"the login form is display",trigger:"form.oe_login_form:not(.d-none)",},{content:"check if the login input is empty",trigger:"input#login:empty",},{content:"check if the password input is empty",trigger:"input#password:empty",},{content:"Back to user switch",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Remove the admin user from page",trigger:".o_user_switch .d-flex:first-child .fa-times",run:"click",},{content:"only one user is left on quick login",trigger:".o_user_switch:not(:has(.list-group-item:nth-child(2))) .list-group-item:contains('Marc Demo')",},],});return __exports;});;

/* /mail/static/tests/tours/activity_date_format_tour.js */
odoo.define('@mail/../tests/tours/activity_date_format_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_activity_date_format",{steps:()=>[{trigger:"button:contains('Activities')",run:"click",},{trigger:"input[id*='activity_type_id']",run:"click",},{trigger:".dropdown-item:contains('To-Do')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Go Party",},{trigger:"button:contains('Schedule')",run:"click",},{trigger:".o-mail-Activity:contains('Go Party')",run:"click",},{trigger:".o-mail-Activity-info i",run:"click",},{trigger:".o-mail-Activity-details tr:contains('Created') td:contains('01/Jan/24 09:00:00 AM')",},{trigger:".o-mail-Activity-details tr:contains('Due on') td:contains('06/Jan/24')",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_as_guest_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_as_guest_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_channel_as_guest_tour.js",{steps:()=>[{content:"Channel secret token has been hidden on welcome page",trigger:".o-mail-WelcomePage",run(){if(!window.location.pathname.startsWith("/discuss/channel")){console.error("Channel secret token is still present in URL.");}},},{content:"Click join",trigger:"button[title='Join Channel']",run:"click",},{content:"Check that we are on channel page",trigger:".o-mail-Thread",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_call_public_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_call_public_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_channel_call_public_tour.js",{steps:()=>[{content:"The call does not start on the welcome page",trigger:".o-mail-WelcomePage",async run(){await new Promise((r)=>setTimeout(r,250));const rtcService=odoo.__WOWL_DEBUG__.root.env.services["discuss.rtc"];if(rtcService?.selfSession||rtcService?.state.hasPendingRequest){console.error("The call should not have started.");}},},{content:"Click join",trigger:"button[title='Join Channel']",run:"click",},{content:"Check that the call has started",trigger:".o-discuss-Call",},{content:"Check that current user is in call ('disconnect' button visible)",trigger:"button[title='Disconnect']",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_public_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_public_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{inputFiles}=require("@web/../tests/utils");const messageSelector=".o-mail-Message:has(.o-mail-Message-body:contains('cheese'))";const editedMessageSelector=".o-mail-Message:has(.o-mail-Message-body:contains('vegetables'))";registry.category("web_tour.tours").add("discuss_channel_public_tour.js",{steps:()=>[{trigger:".o-mail-Discuss",},{trigger:".o-mail-Thread",run(){if(!window.location.pathname.startsWith("/discuss/channel")){console.error("Channel secret token is still present in URL.");}
const errors=odoo.loader.findErrors();if(Object.keys(errors).length){console.error("Couldn't load all JS modules.",errors);}
document.body.classList.add("o_discuss_channel_public_modules_loaded");if(document.title!==document.querySelector(".o-mail-Discuss-threadName")?.value){console.error("Tab title should match conversation name.");}},},{trigger:".o_discuss_channel_public_modules_loaded",},{trigger:".o-mail-Composer-input",run:"edit cheese",},{trigger:".o-mail-Composer button[aria-label='Attach files']",async run(){const text=new File(["hello, world"],"text.txt",{type:"text/plain"});await inputFiles(".o-mail-Composer-coreMain .o_input_file",[text]);},},{trigger:".o-mail-AttachmentCard:not(.o-isUploading):contains(text.txt)",},{trigger:".o-mail-Composer button[aria-label='Attach files']",async run(){await inputFiles(".o-mail-Composer-coreMain .o_input_file",[new File([await(await fetch("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P4v5ThPwAG7wKklwQ/bwAAAABJRU5ErkJggg==")).blob(),],"image.png",{type:"image/png"}),]);},},{trigger:'.o-mail-AttachmentImage:not(.o-isUploading)[title="image.png"]',async run(){const store=odoo.__WOWL_DEBUG__.root.env.services["mail.store"];if(store.self.type==="guest"){const src=this.anchor.querySelector("img").src;const token=store.Attachment.get((src.match("/web/image/([0-9]+)")||[]).at(-1))?.access_token;if(!(token&&src.includes(`access_token=${token}`))){throw new Error("Access token of the attachment isn't correct.");}}},},{trigger:".o-mail-Composer-send:enabled",run:"click",},{trigger:`${messageSelector}[data-persistent]`,},{trigger:`${messageSelector} .o-mail-AttachmentCard:contains("text.txt")`,},{trigger:messageSelector,run:`hover && click ${messageSelector} [title='Add a Reaction']`,},{trigger:".o-EmojiPicker .o-Emoji:contains('🙂')",run:"click",},{trigger:`${messageSelector} .o-mail-MessageReaction:contains('🙂')`,run:"click",},{trigger:`${messageSelector}:not(:has(.o-mail-MessageReaction:contains('🙂')))`,},{trigger:`${messageSelector}`,run:`hover && click ${messageSelector} [title='Expand']`,},{trigger:`.o-mail-Message-moreMenu [title='Edit'], ${messageSelector} [title='Edit']`,run:"click",},{trigger:".o-mail-Message .o-mail-Composer-input",run:"edit vegetables",},{trigger:".o-mail-Message button[aria-label='Attach files']",async run(){const extratxt=new File(["hello 2"],"extra.txt",{type:"text/plain"});await inputFiles(".o-mail-Message .o_input_file",[extratxt]);},},{trigger:".o-mail-Message .o-mail-Composer .o-mail-AttachmentCard:not(.o-isUploading):contains(extra.txt)",},{trigger:".o-mail-Message a:contains(save)",run:"click",},{trigger:editedMessageSelector,},{trigger:`${editedMessageSelector} .o-mail-AttachmentCard:contains("text.txt")`,},{trigger:`${editedMessageSelector} .o-mail-AttachmentCard:contains("extra.txt")`,},{trigger:`${editedMessageSelector} .o-mail-AttachmentCard:contains("extra.txt") .o-mail-AttachmentCard-unlink`,run:"click",},{trigger:".modal:contains(Confirmation) .btn:contains(Ok)",run:"click",},{trigger:`${editedMessageSelector}:not(:has(.o-mail-AttachmentCard:contains("extra.txt")))`,},{trigger:"button[title='Search Messages']",run:"click",},{trigger:".o_searchview_input",run:"edit text.txt",},{trigger:"button[aria-label='Search button']",run:"click",},{trigger:`.o-mail-SearchMessagesPanel ${editedMessageSelector} .o-mail-AttachmentCard:contains("text.txt")`,},],});return __exports;});;

/* /mail/static/tests/tours/discuss_configuration_tour.js */
odoo.define('@mail/../tests/tours/discuss_configuration_tour',['@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");registry.category("web_tour.tours").add("discuss_configuration_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="mail.menu_root_discuss"]',run:"click",},{trigger:".o_main_navbar button:contains('Configuration')",run:"click",},{trigger:".dropdown-menu a:contains('Notification')",run:"click",},{trigger:".o-mail-DiscussNotificationSettings label:contains('Mute')",run:"click",},{trigger:"button:contains('All Messages')",run:"click",},{trigger:"button:contains('Mentions Only')",run:"click",},{trigger:"button:contains('Nothing')",run:"click",},{trigger:".modal-header button[aria-label='Close']",run:"click",},{trigger:".o_main_navbar button:contains('Configuration')",run:"click",},{trigger:".dropdown-menu a:contains('Voice & Video')",run:"click",},{trigger:"select[name='inputDevice']",},{trigger:"button:contains('Voice Detection')",run:"click",},{trigger:"label:contains('Voice detection threshold')",},{trigger:"button:contains('Push to Talk')",run:"click",},{trigger:"label:contains('Push-to-talk key')",},{trigger:"label:contains('Delay after releasing push-to-talk')",},{trigger:"input[aria-label='Show video participants only']",},{trigger:"input[aria-label='Blur video background']",run:"click",},{trigger:"label:contains('Background blur intensity')",},{trigger:"label:contains('Edge blur intensity')",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_go_back_to_thread_from_breadcrumbs_tour.js */
odoo.define('@mail/../tests/tours/discuss_go_back_to_thread_from_breadcrumbs_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_go_back_to_thread_from_breadcrumbs.js",{steps:()=>[{trigger:".o-mail-Discuss-threadName[title='Inbox']"},{trigger:".o-mail-DiscussSidebar-item:contains(Starred)",run:"click"},{trigger:"button[title='View or join channels']",run:"click"},{trigger:".breadcrumb-item:contains(Starred)",run:"click"},{trigger:".o-mail-Discuss-threadName[title='Starred']"},],});return __exports;});;

/* /mail/static/tests/tours/discuss_sidebar_in_public_page_tour.js */
odoo.define('@mail/../tests/tours/discuss_sidebar_in_public_page_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("sidebar_in_public_page_tour",{steps:()=>[{trigger:".o-mail-Discuss-header [title='Channel 1']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 1).o-active",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2)",run:"click",},{trigger:".o-mail-Discuss-header [title='Channel 2']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2).o-active",run(){history.back();},},{trigger:".o-mail-Discuss-header [title='Channel 1']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 1).o-active",run(){history.forward();},},{trigger:".o-mail-Discuss-header [title='Channel 2']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2).o-active",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_sub_channel_search_tour.js */
odoo.define('@mail/../tests/tours/discuss_sub_channel_search_tour',['@mail/discuss/core/public_web/sub_channel_list','@odoo/owl','@web/core/registry','@web/core/utils/concurrency','@web/core/utils/patch','@web/core/utils/reactive','@web/../tests/utils'],function(require){'use strict';let __exports={};const{SubChannelList}=require("@mail/discuss/core/public_web/sub_channel_list");const{status}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{Deferred}=require("@web/core/utils/concurrency");const{patch}=require("@web/core/utils/patch");const{effect}=require("@web/core/utils/reactive");const{contains,dragenterFiles,dropFiles,scroll}=require("@web/../tests/utils");let waitForLoadMoreToDisappearDef;registry.category("web_tour.tours").add("test_discuss_sub_channel_search",{steps:()=>[{trigger:"body",run(){patch(SubChannelList.prototype,{setup(){super.setup(...arguments);effect((state)=>{if(status(this)==="destroyed"){return;}
if(!state.isVisible){waitForLoadMoreToDisappearDef?.resolve();}},[this.loadMoreState]);},});},},{trigger:"button[title='Threads']",run:"click",},{trigger:".o-mail-SubChannelList",async run(){for(let i=99;i>69;i--){await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel ${i}`,});await contains(".o-mail-SubChannelList-thread",{count:30});}},},{trigger:".o-mail-ActionPanel:has(.o-mail-SubChannelList) .o_searchview_input",run:"edit Sub Channel 10",},{trigger:".o-mail-ActionPanel:has(.o-mail-SubChannelList) button[aria-label='Search button']",run:"click",},{trigger:".o-mail-SubChannelList-thread:contains(Sub Channel 10)",async run(){await contains(".o-mail-SubChannelList-thread",{count:1});waitForLoadMoreToDisappearDef=new Deferred();},},{trigger:".o_searchview_input",run:"clear",},{trigger:".o-mail-SubChannelList-thread:contains(Sub Channel 99)",async run(){await contains(".o-mail-SubChannelList-thread",{count:31});for(let i=99;i>69;i--){await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel ${i}`,});}
await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel 10`});await waitForLoadMoreToDisappearDef;waitForLoadMoreToDisappearDef=new Deferred();await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelList-thread:contains(Sub Channel 40)",async run(){await contains(".o-mail-SubChannelList-thread",{count:61});for(let i=99;i>39;i--){await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel ${i}`,});}
await waitForLoadMoreToDisappearDef;waitForLoadMoreToDisappearDef=new Deferred();await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelList-thread:contains(Sub Channel 11)",async run(){await contains(".o-mail-SubChannelList-thread",{count:90});for(let i=99;i>9;i--){await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel ${i}`,});}
await waitForLoadMoreToDisappearDef;await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelList-thread:contains(Sub Channel 0)",async run(){await contains(".o-mail-SubChannelList-thread",{count:100});for(let i=99;i>0;i--){await contains(".o-mail-SubChannelList-thread",{text:`Sub Channel ${i}`,});}},},],});registry.category("web_tour.tours").add("create_thread_for_attachment_without_body",{steps:()=>[{content:"Open general channel",trigger:'.o-mail-DiscussSidebarChannel-itemName:contains("general")',run:"click",},{content:"Drop a file",trigger:".o-mail-Discuss-main",async run(){const files=[new File(["hi there"],"file2.txt",{type:"text/plain"})];await dragenterFiles(".o-mail-Discuss-main",files);await dropFiles(".o-Dropzone",files);},},{trigger:'.o-mail-AttachmentCard:not(.o-isUploading):contains("file2.txt")',},{content:"Click on send button",trigger:".o-mail-Composer-send:enabled",run:"click",},{content:"Hover on attachment",trigger:'.o-mail-Message .o-mail-AttachmentCard:contains("file2.txt")',run:"hover",},{content:"Click on expand button",trigger:'.o-mail-Message [title="Expand"]',run:"click",},{content:"Create a new thread",trigger:'.o-dropdown-item:contains("Create Thread")',run:"click",},{content:"Check a new thread is created",trigger:'.o-mail-Discuss:contains("New Thread")',},],});return __exports;});;

/* /mail/static/tests/tours/mail_activity_schedule_from_chatter.js */
odoo.define('@mail/../tests/tours/mail_activity_schedule_from_chatter',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_activity_schedule_from_chatter",{steps:()=>[{trigger:"button:contains('Activities')",run:"click",},{trigger:"input[id*='activity_type_id']",run:"click",},{trigger:".dropdown-item:contains('Call')",run:"click",},{trigger:"input[id*='activity_type_id']:value('Call')",},{trigger:"button:contains('Schedule')",},{trigger:"input[id*='activity_type_id']",run:"click",},{trigger:".dropdown-item:contains('To-Do')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Play Mario Party",},{trigger:"button:contains('Schedule')",run:"click",},{trigger:".o-mail-Activity:contains('Play Mario Party')",run:"click",},{trigger:"button:contains('Activities')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Play Mario Kart",},{trigger:"button:contains('Mark as Done')",run:"click",},{trigger:".o-mail-Message:contains('Play Mario Kart')",},],});return __exports;});;

/* /mail/static/tests/tours/mail_composer_test_tour.js */
odoo.define('@mail/../tests/tours/mail_composer_test_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,dragenterFiles,dropFiles,inputFiles}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail/static/tests/tours/mail_composer_test_tour.js",{steps:()=>[{content:"Wait for the chatter to be fully loaded",trigger:".o-mail-Chatter",async run(){await contains(".o-mail-Message",{count:1});},},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Write something in composer",trigger:".o-mail-Composer-input",run:"edit blahblah @Not && click body",},{content:"Mention a partner",trigger:".o-mail-Composer-suggestion:contains(Not A Demo User)",run:"click",},{content:"Add one file in composer",trigger:".o-mail-Composer button[aria-label='Attach files']",async run(){const files=[new File(["hello, world"],"file1.txt",{type:"text/plain"})];await inputFiles(".o-mail-Composer-coreMain .o_input_file",files);},},{trigger:'.o-mail-AttachmentCard:not(.o-isUploading):contains("file1.txt")',},{content:"Open full composer",trigger:"button[aria-label='Full composer']",run:"click",},{content:"Check composer keeps open after pushing Escape",trigger:".o_mail_composer_form_view",run:"press Escape",},{content:"Check the earlier provided attachment is listed",trigger:".o_field_mail_composer_attachment_list a:contains(file1.txt)",},{content:"Check subject is autofilled",trigger:'[name="subject"] input',run(){const subjectValue=document.querySelector('[name="subject"] input').value;if(subjectValue!=="Jane"){console.error(`Full composer should have "Jane" in subject input (actual: ${subjectValue})`);}},},{content:"Check composer content is kept and contains the user's signature",trigger:'.o_field_html[name="body"]',run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if(!bodyContent.includes("blahblah @Not A Demo User")){console.error(`Full composer should contain text from small composer ("blahblah @Not A Demo User") in body input (actual: ${bodyContent})`);}
const mentionLink=document.querySelector('.o_field_html[name="body"] a').textContent;if(!mentionLink.includes("@Not A Demo User")){console.error(`Full composer should contain mention link from small composer ("@Not A Demo User") in body input)`);}
if((bodyContent.match(/--\nErnest/g)||[]).length!==1){console.error("Full composer should contain the user's signature once.");}},},{content:"Drop a file on the full composer",trigger:".o_mail_composer_form_view",async run(){const files=[new File(["hi there"],"file2.txt",{type:"text/plain"})];await dragenterFiles(".o_mail_composer_form_view .o_form_renderer",files);await dropFiles(".o-Dropzone",files);},},{content:"Check the attachment is listed",trigger:".o_field_mail_composer_attachment_list a:contains(file2.txt)",},{content:"Click on the mail template selector",trigger:".mail-composer-template-dropdown-btn",run:"click",},{content:"Check a template is listed",trigger:'.mail-composer-template-dropdown.popover .o-dropdown-item:contains("Test template")',},{content:"Verify admin template is NOT listed",trigger:".mail-composer-template-dropdown.popover",run(){const hasAdminTemplate=[...document.querySelectorAll(".o-dropdown-item")].some((item)=>item.textContent.includes("Test template for admin"));if(hasAdminTemplate){console.error("Template assigned to the admin is visible to a non-assigned user! This should not happen.");}},},{content:"Send message from full composer",trigger:".o_mail_send",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("blahblah @Not A Demo User")',run:"click",},{content:"Click on envelope to see recipients of message",trigger:'.o-mail-Message:has(.o-mail-Message-body:contains("blahblah @Not A Demo User")) .o-mail-Message-notification',run:"click",},{content:"Check message has correct recipients",trigger:".o-mail-MessageNotificationPopover:contains('Not A Demo User Jane')",},{content:"Check message contains the first attachment",trigger:'.o-mail-Message .o-mail-AttachmentCard:contains("file1.txt")',},{content:"Check message contains the second attachment",trigger:'.o-mail-Message .o-mail-AttachmentCard:contains("file2.txt")',},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Open full composer",trigger:"button[aria-label='Full composer']",run:"click",},{content:"Check that the composer contains the signature",trigger:'.o_field_html[name="body"]',run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if((bodyContent.match(/--\nErnest/g)||[]).length!==1){console.log("Full composer should contain the user's signature once.");}},},{content:"Write something in full composer",trigger:".note-editable",run:"editor keep the content",},{content:"Close full composer",trigger:".btn-close",run:"click",},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Check full composer text is kept",trigger:".o-mail-Composer-input",run(){if(this.anchor.value!=="keep the content"){console.error("Composer in chatter should contain full composer text after discarding.");}},},{content:"Open full composer",trigger:"button[aria-label='Full composer']",run:"click",},{content:"Check that the composer doesn't add the user's signature twice",trigger:".note-editable",run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if((bodyContent.match(/--\nErnest/g)||[]).length!==0){console.error("The composer should not contain the user's signature.");}},},{content:"Close full composer",trigger:".btn-close",run:"click",},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Send message from chatter",trigger:".o-mail-Composer-send:enabled",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("keep the content")',},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Write a message",trigger:".o-mail-Composer-input",run:"edit hello world",},{content:"Send message from chatter",trigger:".o-mail-Composer-send:enabled",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("hello world")',},],});return __exports;});;

/* /mail/static/tests/tours/mail_message_load_order_tour.js */
odoo.define('@mail/../tests/tours/mail_message_load_order_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,scroll}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail_message_load_order_tour",{steps:()=>[{trigger:".o-mail-DiscussSidebarChannel:contains(MyTestChannel)",run:"click",},{trigger:".o-mail-Thread .o-mail-Message",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:30});await contains(".o-mail-Thread",{scroll:"bottom"});},},{trigger:"*[title='Pinned Messages']",run:"click",},{content:"Click on invisible jump (should hover card to be visible)",trigger:".o-mail-MessageCard-jump:not(:visible)",run:"click",},{trigger:".o-mail-Thread .o-mail-Message:first .o-mail-Message-textContent:not(:contains(31))",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:31});await contains(".o-mail-Thread",{scroll:0});const messages=Array.from(document.querySelectorAll(".o-mail-Thread .o-mail-Message-content")).map((el)=>el.innerText);for(let i=0;i<31;i++){if(messages[i]!==(i+1).toString()){throw new Error("Wrong message order after loading around");}}
await scroll(".o-mail-Thread","bottom");},},{trigger:".o-mail-Thread .o-mail-Message .o-mail-Message-textContent:contains(17)",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:60});const messages=Array.from(document.querySelectorAll(".o-mail-Thread .o-mail-Message-content")).map((el)=>el.innerText);for(let i=0;i<60;i++){if(messages[i]!==(i+1).toString()){throw new Error("Wrong message order after loading after");}}},},],});return __exports;});;

/* /mail/static/tests/tours/mail_template_dynamic_placeholder_tour.js */
odoo.define('@mail/../tests/tours/mail_template_dynamic_placeholder_tour',['@web/core/registry','@web_tour/tour_service/tour_utils','@odoo/hoot-dom'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{delay}=require("@odoo/hoot-dom");registry.category("web_tour.tours").add("mail_template_dynamic_placeholder_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:'Go into the Setting "app"',trigger:'.o_app[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:"Open email templates",trigger:'button[name="open_mail_templates"]',run:"click",},{content:"Create a new email template",trigger:"button.o_list_button_add",run:"click",},{content:'Insert # inside "Subject" input',trigger:'div[name="subject"] input[type="text"]',run:"edit(no_model_id #)",},{content:'Select "Contact" model',trigger:'div[name="model_id"] input[type="text"]',run:"edit Contact",},{content:"Wait for the autocomplete RPC",trigger:'div[name="model_id"] .ui-autocomplete:contains("Contact")',run:async()=>{await delay(300);}},{content:"Click on contact",trigger:'div[name="model_id"] .ui-autocomplete',run:async function(){const contact=Array.from(document.querySelectorAll('div[name="model_id"] .ui-autocomplete .dropdown-item')).find((el)=>el.textContent==="Contact");await contact.click();},},{content:"Wait for the drop down to disappear",trigger:'div[name="model_id"] .o-autocomplete:not(:has(.ui-autocomplete))',run:async()=>{await new Promise((r)=>setTimeout(r,200));},},{content:'Retry insert # inside "Subject" input',trigger:'div[name="subject"] input[type="text"]',run:"edit (yes_model_id) && press #",},{content:"Check if the dynamic placeholder popover is opened",trigger:"div.o_model_field_selector_popover",},{content:"filter the dph result",trigger:"div.o_model_field_selector_popover_search input[type='text']",run:"edit name",},{content:"Click on the first entry of the dynamic placeholder",trigger:'div.o_model_field_selector_popover button:contains("Company Name")',run:"click",},{content:"Enter a default value",trigger:'div.o_model_field_selector_popover .o_model_field_selector_default_value_input input[type="text"]',run:"edit defValue",},{content:"Click on the insert button",trigger:"div.o_model_field_selector_popover button:first-child",run:"click",},{content:"Wait for the popover to disappear",trigger:"body:not(:has(.o_model_field_selector_popover))",run:"click",},{content:"Check if subject value was correctly updated",trigger:'div[name="subject"] input[type="text"]',run(){const subjectValue=this.anchor.value;const correctValue="yes_model_id {{object.company_name|||defValue}}";if(subjectValue!==correctValue){console.error(`Email template should have "${correctValue}" in subject input (actual: ${subjectValue})`);}},},{content:"Insert text inside editable",trigger:".note-editable.odoo-editor-editable",async run(actions){await actions.editor(`/`);document.querySelector(".note-editable").dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the the dynamic placeholder powerBox options",trigger:"div.o-we-powerbox .o-we-command:contains(Dynamic Placeholder)",run:"click",},{content:"Check if the dynamic placeholder popover is opened",trigger:"div.o_model_field_selector_popover",run:"click",},{content:"filter the dph result",trigger:"div.o_model_field_selector_popover_search input[type='text']",run:"edit name",},{content:"Click on the first entry of the dynamic placeholder",trigger:'div.o_model_field_selector_popover button:contains("Company Name")',run:"click",},{content:"Enter a default value",trigger:'div.o_model_field_selector_popover .o_model_field_selector_default_value_input input[type="text"]',run:"edit defValue",},{content:"Click on the insert button",trigger:"div.o_model_field_selector_popover button:first-child",run:"click",},{content:"Ensure the editable contain the dynamic placeholder t tag",trigger:`.note-editable.odoo-editor-editable t[t-out="object.company_name"]:contains("defValue")`,run:"click",},{content:"Discard form changes",trigger:"button.o_form_button_cancel",run:"click",},{content:"Wait for the form view to disappear",trigger:"body:not(:has(.o_form_sheet))",},],});return __exports;});;

/* /mail/static/tests/tours/user_modify_own_profile_tour.js */
odoo.define('@mail/../tests/tours/user_modify_own_profile_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,insertText}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail/static/tests/tours/user_modify_own_profile_tour.js",{steps:()=>[{content:"Open user account menu",trigger:".o_user_menu button",run:"click",},{content:"Open preferences / profile screen",trigger:"[data-menu=settings]",run:"click",},{content:"Update the email address",trigger:'div[name="email"] input',async run(){await insertText("div[name='email'] input","updatedemail@example.com",{replace:true,});await contains(".o_form_dirty",{count:1});},},{trigger:"body.modal-open",},{content:"Save the form",trigger:'button[name="preference_save"]',run:"click",},{content:"Wait until the modal is closed",trigger:"body:not(.modal-open)",async run(){await contains(".o_form_dirty",{count:0});},},],});return __exports;});;

/* /portal/static/tests/tours/portal.js */
odoo.define('@portal/../tests/tours/portal',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('portal_load_homepage',{url:'/my',steps:()=>[{content:"Check portal is loaded",trigger:'a[href*="/my/account"]:contains("Edit"):first',run:"click",expectUnloadPage:true,},{content:"Load my account details",trigger:'input[value="Joel Willis"]',run:"click",},{content:'type a different phone number',trigger:'input[name="phone"]',run:"edit +1 555 666 7788",},{content:"Submit the form",trigger:'button[type=submit]',run:"click",expectUnloadPage:true,},{content:"Check that we are back on the portal",trigger:'a[href*="/my/account"]:contains("Edit"):first',}]});return __exports;});;

/* /portal/static/tests/tours/skip_to_content.js */
odoo.define('@portal/../tests/tours/skip_to_content',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("skip_to_content",{url:"/",steps:()=>[{content:"Make sure that Skip to Content button is on top of all the links present in header",trigger:"a:first-child[class~='o_skip_to_content']",run:"click"},{content:"Check if we have been redirected to #wrap",trigger:"body",run:()=>{if(!window.location.href.endsWith("#wrap")){console.error("We should be on #wrap.");}}}]});return __exports;});;

/* /account/static/tests/tours/invoice_line_keydown.js */
odoo.define('@account/../tests/tours/invoice_line_keydown',['@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require("@web_tour/tour_service/tour_utils");registry.category('web_tour.tours').add('section_saved_on_tab_keydown_tour',{steps:()=>[{content:"Create new invoice",trigger:'.o_control_panel_main_buttons .o_list_button_add',run:'click',},{content:"Add customer",trigger:'div.o_field_widget.o_field_res_partner_many2one[name="partner_id"] div input',run:'edit Partner A',},{content:"Valid customer",trigger:'.ui-menu-item a:contains("Partner A")',run:'click',},...stepUtils.saveForm(),{content:'Add a section line',trigger:'.o_field_x2many_list_row_add a:contains("Add a section")',run:'click',},{content:'Edit the section label textarea',trigger:'.o_field_product_label_section_and_note_cell textarea',run(){const textarea=this.anchor;textarea.focus();textarea.value="Section content";textarea.dispatchEvent(new KeyboardEvent('keydown',{key:'Tab'}));},},...stepUtils.saveForm(),],});return __exports;});;

/* /account/static/tests/tours/tax_group_tests.js */
odoo.define('@account/../tests/tours/tax_group_tests',['@account/js/tours/account','@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{accountTourSteps}=require("@account/js/tours/account");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");registry.category("web_tour.tours").add('account_tax_group',{url:"/odoo",steps:()=>[...accountTourSteps.goToAccountMenu("Go to Invoicing"),{content:"Go to Vendors",trigger:'span:contains("Vendors")',run:"click",},{content:"Go to Bills",trigger:'a:contains("Bills")',run:"click",},{trigger:".o_breadcrumb .text-truncate:contains(Bills)",},{content:"Create new bill",trigger:'.o_control_panel_main_buttons .o_list_button_add',run:"click",},{content:"Add vendor",trigger:'div.o_field_widget.o_field_res_partner_many2one[name="partner_id"] div input',run:"edit Account Tax Group Partner",},{content:"Valid vendor",trigger:'.ui-menu-item a:contains("Account Tax Group Partner")',run:"click",},{content:"Add items",trigger:'div[name="invoice_line_ids"] .o_field_x2many_list_row_add a:contains("Add a line")',run:"click",},{content:"Select input",trigger:'div[name="invoice_line_ids"] .o_selected_row .o_list_many2one[name="product_id"] input',run:"edit Account Tax Group Product",},{content:"Valid item",trigger:'.ui-menu-item-wrapper:contains("Account Tax Group Product")',run:"click",},...stepUtils.saveForm(),{content:"Edit tax group amount",trigger:'.o_tax_group_edit',run:"click",},{content:"Modify the input value",trigger:'.o_tax_group_edit_input input',run(){this.anchor.value=200;this.anchor.select();this.anchor.blur();},},{content:"Valid total amount",trigger:'span[name="amount_total"]:contains("800")',run:"click",},{content:"Select item quantity",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"]',run:"click",},{content:"Change item quantity",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',run:"edit 2",},{content:"Valid the new value",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',run:"press Enter",},{content:"Check new value of tax group",trigger:'.o_tax_group_amount_value:contains("120")',run:"click",},...stepUtils.saveForm(),{content:"Check new value of tax group",trigger:'.o_tax_group_amount_value:contains("120")',run:"click",},{content:"Edit tax value",trigger:'.o_tax_group_edit_input input',run:"edit 2 && click body",},{content:"Check new value of total",trigger:'.oe_subtotal_footer_separator:contains("1,202")',run:"click",},{content:"Discard changes",trigger:'.o_form_button_cancel',run:"click",},{content:"Check tax value is reset",trigger:'.o_tax_group_amount_value:contains("120")',},]});return __exports;});;

/* /account/static/tests/tours/tour_tests_shared_js_python.js */
odoo.define('@account/../tests/tours/tour_tests_shared_js_python',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('tests_shared_js_python',{url:"/account/init_tests_shared_js_python",steps:()=>[{content:"Click",trigger:'button',run:"click",},{content:"Wait",trigger:'button.text-success',timeout:3000,},]});return __exports;});;

/* /web_enterprise/static/tests/tours/web_enterprise_tours.js */
odoo.define('@web_enterprise/../tests/tours/web_enterprise_tours',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("web_enterprise.test_studio_list_upsell",{steps:()=>[{trigger:".o_list_view",},{trigger:".o_optional_columns_dropdown > button",run:"click",},{trigger:" .o-dropdown--menu .dropdown-item-studio",},],});return __exports;});;

/* /mail_enterprise/static/tests/tours/discuss_channel_expand_test_tour.js */
odoo.define('@mail_enterprise/../tests/tours/discuss_channel_expand_test_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_enterprise/static/tests/tours/discuss_channel_expand_test_tour.js",{steps:()=>[{content:"Click on 'Open Actions Menu' in the chat window header to show expand button",trigger:'.o-mail-ChatWindow:contains("test-mail-channel-expand-tour") [title="Open Actions Menu"]',run:"click",},{content:"Click on expand button to open channel in Discuss",trigger:'.o-dropdown-item:contains("Open in Discuss")',run:"click",},{content:"Check that first message of #test-mail-channel-expand-tour is shown in Discuss app",trigger:'.o-mail-Discuss-content .o-mail-Message-body:contains("test-message-mail-channel-expand-tour")',},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_rainbowman_reset.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_rainbowman_reset',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_bank_rec_widget_rainbowman_reset",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"'line1' should be selected and form mounted",trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"Mount invoice 2 for line 1",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00002')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00002')",},{content:"Validate line1",trigger:"button:contains('Validate')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2')",},{content:"No records brings rainbows",trigger:"div.o_kanban_view .o_searchview_input",run:"fill thisShouldNotReturnAnyRecords",},{content:"Select the Journal Entry search option from the dropdown",trigger:".o_searchview_autocomplete li:contains(Journal Entry)",run:"click",},{trigger:".o_reward_rainbow_man:contains('You reconciled 1 transaction in')",},{content:"Remove the filter while rainbow man is on screen",trigger:".o_kanban_view .o_searchview_facet:nth-child(3) .o_facet_remove",run:"click",},{trigger:".o_bank_rec_st_line:contains('line2')",},{content:"Search for no results again",trigger:"div.o_kanban_view .o_searchview_input",run:"fill thisShouldNotReturnAnyRecords",},{content:"Select the Journal Entry search option from the dropdown",trigger:".o_searchview_autocomplete li:contains(Journal Entry)",run:"click",},{content:"No content helper is displayed instead of rainbowman",trigger:".o_view_nocontent_smiling_face",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_save_analytic_distribution.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_save_analytic_distribution',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add('account_accountant_bank_rec_widget_save_analytic_distribution',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{trigger:"div[name='line_ids']",},{content:"The 'line1' should be selected by default",trigger:"div[name='line_ids'] td[field='name']:contains('line1')",run:function(){},},{content:"Click on first line",trigger:"div[name='line_ids'] td[field='debit']:first",run:"click",},{content:"The 'manual_operations_tab' should be active now and the auto_balance line mounted in edit",trigger:"a.active[name='manual_operations_tab']",run:function(){},},{content:"Enter an analytic distribution",trigger:"div[name='analytic_distribution'] .o_input_dropdown",run:"click",},{content:"Select analytic distribution",trigger:"tr[name='line_0'] input",run:"edit analytic_account",},{trigger:".ui-autocomplete",},{content:"Select analytic distribution",trigger:".ui-autocomplete:visible li:contains('analytic_account')",run:"click",},{content:"Close the analytic distribution",trigger:".o_button",run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},]});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_statements.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_statements',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add('account_accountant_bank_rec_widget_statements',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{content:"Statement button",trigger:".o_bank_rec_st_line:eq(2) a.oe_kanban_action:contains('Statement'):not(:visible)",run:"click",},{trigger:".modal-dialog:contains('Create Statement')",},{content:"Save the statement with proposed values",trigger:".o_form_button_save",run:"click",},{content:"Click the Valid Statement with $ 1,000.00 that is visible in Kanban",trigger:"span[name='kanban-subline-clickable-amount']:contains('$ 1,000.00')",run:"click",},{content:"Modify the end balance",trigger:"input[id='balance_end_real_0']",run:"edit 100 && click body",},{trigger:".alert-warning:contains('The running balance')",},{content:"Dialog displays warning, save anyway",trigger:".breadcrumb-item.o_back_button:nth-of-type(2)",run:"click",},{trigger:".btn-link:contains('$ 2,100.00')",},{content:"Click the red statement, after checking the balance",trigger:"span[name='kanban-subline-clickable-amount']:contains('$ 100.00')",run:"click",},{content:"Back in the form view",trigger:".alert-warning:contains('The running balance')",},{content:"Click on Action",trigger:".o_cp_action_menus button",run:"click",},{content:"Click on Delete",trigger:".o-dropdown--menu span:contains('Delete')",run:"click",},{content:"Confirm Deletion",trigger:".btn-primary:contains('Delete')",run:"click",},{trigger:".o_kanban_renderer:not(:has(.kanban-statement))",},{content:"balance displays $3000.00 and no statement",trigger:".btn-link:contains('$ 3,000')",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',}]});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_ui.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_ui',['@web/core/registry','@web_tour/tour_service/tour_utils','@web/core/utils/patch','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");patch(accountTourSteps,{bankRecUiReportSteps(){return[{trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"balance is 2100",trigger:".btn-link:contains('$ 2,100.00')",},];},});registry.category("web_tour.tours").add("account_accountant_bank_rec_widget_ui",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"'line1' should be selected and form mounted",trigger:".o_bank_rec_selected_st_line:contains('line1')",},{trigger:".o_bank_rec_st_line:contains('line3')",},{content:"select 'line2'",trigger:".o_bank_rec_st_line:contains('line2')",run:"click",},{content:"'line2' should be selected",trigger:".o_bank_rec_selected_st_line:contains('line2')",},{content:"View an invoice",trigger:"button.btn-secondary[name='action_open_business_doc']:eq(1)",run:"click",},{trigger:".o_breadcrumb .active:contains('INV/2019/00001')",},{content:"Breadcrumb back to Bank Reconciliation from INV/2019/00001",trigger:".breadcrumb-item:contains('Bank Reconciliation')",run:"click",},{trigger:".o_bank_rec_st_line:contains('line1')",},{content:"'line2' should be selected after returning",trigger:".o_bank_rec_selected_st_line:contains('line2')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"'line2' form mounted",trigger:".o_bank_rec_selected_st_line:contains('line2')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr:nth-child(2) td[name='move_id']:contains('INV/2019/00001')",},{content:"AMLs list has both invoices",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr:nth-child(1) td[name='move_id']:contains('INV/2019/00002')",},{trigger:"a.active[name='amls_tab']",},{content:"Search for INV/2019/00001",trigger:"div.bank_rec_widget_form_amls_list_anchor .o_searchview_input",run:"edit INV/2019/00001",},{content:"Select the Journal Entry search option from the dropdown",trigger:".o_searchview_autocomplete li:contains(Journal Entry)",run:"click",},{content:"AMLs list only displays one invoice",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr:nth-child(1) td[name='move_id']:contains('INV/2019/00001')",},{content:"Liquidity line displays debit '$ 1,000.00'",trigger:"div[name='line_ids'] table.o_list_table tr.o_bank_rec_liquidity_line td[field='debit']:contains('$ 1,000.00')",},{content:"Select the liquidity line",trigger:"tr.o_bank_rec_liquidity_line td[field='debit']",run:"click",},{content:"Modify the liquidity line amount",trigger:"div[name='amount_currency'] input",run:"edit 100.00 && click body",},{content:"Liquidity line displays debit '$ 100.00'",trigger:"div[name='line_ids'] table.o_list_table tr.o_bank_rec_liquidity_line td[field='debit']:contains('$ 100.00')",},{trigger:"div[name='partner_id'] input",},{content:"Select 'amls_tab'",trigger:"a[name='amls_tab']",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor .o_searchview_facet:nth-child(1) .o_facet_value:contains('INV/2019/00001')",},{content:"AMLs list contains the search facet, and one invoice - select it",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr:nth-child(1) td[name='move_id']:contains('INV/2019/00001')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{content:"Check INV/2019/00001 is well marked as selected",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{content:"View an invoice",trigger:"button.btn-secondary[name='action_open_business_doc']:nth-child(1)",run:"click",},{trigger:".o_breadcrumb .active:contains('INV/2019/00001')",},{content:"Breadcrumb back to Bank Reconciliation from INV/2019/00001",trigger:".breadcrumb-item:contains('Bank Reconciliation')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor .o_searchview_facet:nth-child(1) .o_facet_value:contains('INV/2019/00001')",},{content:"Check INV/2019/00001 is selected and still contains the search facet",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{trigger:"a.active[name='amls_tab']",},{content:"Search for line2",trigger:"div.o_kanban_view .o_searchview_input",run:"fill line2",},{content:"Select the Transaction search option from the dropdown",trigger:".o_searchview_autocomplete li:contains(Transaction)",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"'line2' should be selected",trigger:".o_bank_rec_st_line:last():contains('line2')",},{trigger:"div.bank_rec_widget_form_amls_list_anchor .o_searchview_facet:nth-child(1) .o_facet_value:contains('INV/2019/00001')",},{content:"Nothing has changed: INV/2019/00001 is selected and still contains the search facet",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{trigger:".o_switch_view.o_kanban.active",},{content:"Switch to list view",trigger:".o_switch_view.o_list",run:"click",},{trigger:".o_switch_view.o_list.active",},{content:"Switch back to kanban",trigger:".o_switch_view.o_kanban",run:"click",},{content:"Remove the kanban filter for line2",trigger:".o_kanban_view .o_searchview_facet:nth-child(3) .o_facet_remove",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor .o_searchview_facet:nth-child(1) .o_facet_value:contains('INV/2019/00001')",},{content:"Nothing has changed: INV/2019/00001 is still selected and contains the search facet",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{trigger:".o_bank_rec_st_line:contains('line3')",},{content:"selecting 'line1' should reset the AML search filter ",trigger:".o_bank_rec_st_line:contains('line1')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"select 'line2' again",trigger:".o_bank_rec_st_line:contains('line2')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"Bank Suspense Account is back",trigger:"div[name='line_ids'] .o_bank_rec_auto_balance_line",},{content:"AML Search Filter has been reset",trigger:".o_list_view .o_searchview_input_container:not(:has(.o_searchview_facet))",},{content:"Click Pager",trigger:".o_pager_value:first()",run:"click",},{content:"Change pager to display lines 1-2",trigger:"input.o_pager_value",run:"edit 1-2 && click body",},{trigger:".o_pager_value:contains('1-2')",},{content:"Last St Line is line2",trigger:".o_bank_rec_st_line:last():contains('line2')",},{content:"Page Next",trigger:".o_pager_next:first():not(:disabled)",run:"click",},{trigger:".o_pager_value:contains('3-3')",},{content:"Statement line3 is selected",trigger:".o_bank_rec_selected_st_line:contains('line3')",},{content:"Page to beginning",trigger:".o_pager_next:first()",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"Statement line1 is selected",trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"Mount an invoice",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00003')",run:"click",},{trigger:"div[name='line_ids']:has(.text-decoration-line-through:contains('$ 2,000.00'))",},{content:"Select the mounted invoice line and check the strikethrough value",trigger:"div[name='line_ids'] tr.o_data_row:last() td[field='name']:contains('INV/2019/00003')",run:"click",},{trigger:"a.active[name='manual_operations_tab']",},{content:"Fully Paid button",trigger:"button[name='action_apply_line_suggestion']:contains('fully paid')",run:"click",},{content:"Check the remainder",trigger:"div[name='line_ids'] tr.o_data_row:contains('Suspense') td[field='debit']:contains('$ 1,000.00')",},{content:"Partial Payment",trigger:"button[name='action_apply_line_suggestion']:contains('partial payment')",run:"click",},{trigger:"button[name='action_apply_line_suggestion']:contains('fully paid')",},{content:"View Invoice 0003",trigger:"button[name='action_redirect_to_move']",run:"click",},{trigger:".o_breadcrumb .active:contains('INV/2019/00003')",},{content:"Breadcrumb back to Bank Reconciliation from INV/2019/00003",trigger:".breadcrumb-item:contains('Bank Reconciliation')",run:"click",},{content:"Select the mounted invoice line INV/2019/00003",trigger:"div[name='line_ids'] tr.o_data_row:last() td[field='name']:contains('INV/2019/00003')",run:"click",},{trigger:"a.active[name='manual_operations_tab']",},{content:"Remove the invoice",trigger:".o_list_record_remove .fa-trash-o",run:"click",},{content:"amls_tab is activated",trigger:"a.active[name='amls_tab']",},{content:"Activate Manual Operations to add manual entries",trigger:"a[name='manual_operations_tab']",run:"click",},{content:"add manual entry 1",trigger:"div[name='amount_currency'] input",run:"edit -600.0 && click body",},{content:"mount the remaining opening balance line",trigger:"div[name='line_ids'] tr.o_data_row:contains('Suspense') td[field='credit']:contains('$ 400.00')",run:"click",},{trigger:"div[name='amount_currency'] input:value('-400.00'):focus-within",},{content:"Remove the manual entry",trigger:".o_list_record_remove .fa-trash-o",run:"click",},{trigger:"div[name='line_ids'] tr.o_data_row:contains('Suspense') td[field='credit']:contains('$ 1,000.00')",},{content:"amls_tab is activated and auto balancing line is 1000",trigger:"a.active[name='amls_tab']",},{content:"Mount another invoice",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00001')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{content:"Validate line1",trigger:"button:contains('Validate')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"The 'line2' is the first kanban record and is selected",trigger:".o_bank_rec_st_line:first():contains('line2')",},{content:"Remove the kanban filter for 'Not Matched'",trigger:".o_kanban_view .o_searchview_facet:nth-child(2) .o_facet_remove",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"The 'line1' is the first kanban record with line2 selected",trigger:".o_bank_rec_st_line:first():contains('line1')",},{content:"Mount invoice 2 for line 2",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00002')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00002')",},{content:"Validate line2 with double click",trigger:"button:contains('Validate')",run:"dblclick",},{trigger:".o_bank_rec_st_line:contains('line2') .badge.text-bg-success",},{content:"Click Pager again after line2 is matched",trigger:".o_pager_value:first()",run:"click",},{content:"Change pager to display lines 1-3",trigger:"input.o_pager_value",run:"edit 1-3 && click body",},{trigger:".o_bank_rec_selected_st_line:contains('line3')",},{content:"manually select line2 again by clicking it's matched icon",trigger:".badge.text-bg-success:last()",run:"click",},{trigger:"div[name='line_ids']:not(:has(.fa-trash-o)) td[field='name']:contains('line2')",},{content:"Reset line2",trigger:"button:contains('Reset')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2'):not(:has(div.badge))",},{content:"amls_tab is activated while still on line2 which doesn't contain a badge",trigger:".o_notebook a.active[name='amls_tab']",},{trigger:".o_switch_view.o_kanban.active",},{content:"Switch to list view",trigger:".o_switch_view.o_list",run:"click",},{trigger:".btn-secondary:contains('View')",},{content:"Select the first Match Button (line2)",trigger:".btn-secondary:contains('Match')",run:"click",},{trigger:".o_bank_rec_st_line:last():contains('line2')",},{content:"Last St Line is line2",trigger:".o_bank_rec_selected_st_line:contains('line2')",run:"click",},{content:"Button To Check will reconcile since partner is saved on line2",trigger:".btn-secondary:contains('To Check')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2'):has(div.badge[title='Matched'] i):has(span.badge:contains('To check'))",},{content:"both badges are visible, trash icon is not, manual operation tab is active",trigger:"div[name='line_ids']:not(:has(.fa-trash-o))+.o_notebook a.active[name='manual_operations_tab']",},{trigger:".o_switch_view.o_kanban.active",},{content:"Switch to list view",trigger:".o_switch_view.o_list",run:"click",},{trigger:".o_switch_view.o_list.active",},{content:"Remove the line filter",trigger:".o_searchview_facet:contains('0002') .o_facet_remove",run:"click",},{trigger:".o_data_row:contains('line2'):has(.btn-secondary:contains('View'))",},{content:"Select the first Match Button (line3)",trigger:".btn-secondary:contains('Match')",run:"click",},{trigger:".o_bank_rec_stats_buttons",},{content:"Open search bar menu",trigger:".o_searchview_dropdown_toggler:eq(0)",run:"click",},{trigger:".o-dropdown--menu.o_search_bar_menu",},{content:"Choose a filter",trigger:".o_search_bar_menu .dropdown-item:first()",run:"click",},{trigger:".o-dropdown--menu",},{content:"Not Matched Filter",trigger:".dropdown-item:contains('Not Matched')",run:"click",},{trigger:".o_switch_view.o_kanban.active",},{content:"reco model dropdown",trigger:".bank_rec_reco_model_dropdown i",run:"click",},{trigger:".o-dropdown--menu",},{content:"create model",trigger:".dropdown-item:contains('Create model')",run:"click",},{content:"model name",trigger:"input#name_0",run:"edit Bank Fees",},{content:"add an account",trigger:"a:contains('Add a line')",run:"click",},{content:"search for bank fees account",trigger:"[name='account_id'] input",run:"edit Bank Fees",},{trigger:".o-autocomplete--dropdown-menu",},{content:"select the bank fees account",trigger:".o-autocomplete--dropdown-item:contains('Bank Fees')",run:"click",},{trigger:".o_breadcrumb .active > span:contains('New')",},{content:"Breadcrumb back to Bank Reconciliation from the model",trigger:".breadcrumb-item:contains('Bank Reconciliation')",run:"click",},{content:"Choose Bank Fees Model",trigger:".recon_model_button:contains('Bank Fees')",run:"click",},{content:"Validate line3",trigger:"button:contains('Validate').btn-primary",run:"dblclick",},{trigger:".o_reward_rainbow_man",},{content:"Remove the kanbans 'not matched' filter to reset all lines - use the rainbow man button",trigger:"p.btn-primary:contains('All Transactions')",run:"click",},{trigger:".o_kanban_view .o_searchview:first() .o_searchview_facet:last():contains('Bank')",},{content:"Wait for search model change and line3 to appear",trigger:".o_bank_rec_st_line:last():contains('line3')",},{trigger:".o_bank_rec_selected_st_line:contains('line2')",},{content:"'line2' should be selected, reset it",trigger:"button:contains('Reset')",run:"click",},{trigger:".o_bank_rec_st_line:contains('line2'):not(:has(div.badge))",},{content:"select matched 'line3'",trigger:".o_bank_rec_st_line:contains('line3')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line3')",},{content:"'line3' should be selected, reset it",trigger:"button:contains('Reset')",run:"click",},{trigger:".o_bank_rec_st_line:contains('line3'):not(:has(div.badge))",},{content:"select matched 'line1'",trigger:".o_bank_rec_st_line:contains('line1')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"'line1' should be selected, reset it",trigger:"button:contains('Reset')",run:"click",},{trigger:".o_bank_rec_stats_buttons",},{content:"Open search bar menu",trigger:".o_searchview_dropdown_toggler:eq(0)",run:"click",},{trigger:"button:contains('Validate')",},{content:"Filter Menu",trigger:".o_search_bar_menu .dropdown-item:first()",run:"click",},{trigger:".o-dropdown--menu",},{content:"Activate the Not Matched filter",trigger:".dropdown-item:contains('Not Matched')",run:"click",},{trigger:".o_searchview_facet:contains('Not Matched')",},{content:"Close the Filter Menu",trigger:".o_searchview_dropdown_toggler:eq(0)",run:"click",},{trigger:".o_searchview_facet:contains('Not Matched')",},{content:"select 'line2'",trigger:".o_bank_rec_st_line:contains('line2')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2')",},{content:"Validate 'line2' again",trigger:"button:contains('Validate')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line3')",},{content:"'line3' should be selected now",trigger:".o_bank_rec_selected_st_line:contains('line3')",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget for Bank2",trigger:"button.btn-secondary[name='action_open_reconcile']:last()",run:"click",},{content:"Remove the kanbans 'not matched' filter",trigger:".o_kanban_view .o_searchview_facet:nth-child(2) .o_facet_remove",run:"click",},{content:"Remove the kanban 'journal' filter",trigger:".o_kanban_view .o_searchview_facet:nth-child(1) .o_facet_remove",run:"click",},{content:"select 'line1' from another journal",trigger:".o_bank_rec_st_line:contains('line1')",run:"click",},...accountTourSteps.bankRecUiReportSteps(),{content:"select 'line4' from this journal",trigger:".o_bank_rec_st_line:contains('line4')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line4')",},{content:"balance is $222.22",trigger:".btn-link:contains('$ 222.22')",},{content:"Select the liquidity line",trigger:"tr.o_bank_rec_liquidity_line td[field='debit']",run:"click",},{trigger:"div[name='amount_currency'] input:focus-within",},{content:"Modify the liquidity line amount",trigger:"div[name='amount_currency'] input",run:"edit -333.33 && click body",},{trigger:".btn-link:contains('$ -333.33')",},{content:"balance displays $-333.33",trigger:".btn-link:contains('$ -333.33')",},{content:"Modify the label",trigger:"div[name='name'] input",run:"edit Spontaneous Combustion && click body",},{content:"statement line displays combustion and $-333.33",trigger:".o_bank_rec_selected_st_line:contains('Combustion'):contains('$ -333.33')",},{content:"select matched 'line2'",trigger:".o_bank_rec_st_line:contains('line2')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2')",},{content:"'line2' should be selected, reset it",trigger:"button:contains('Reset')",run:"click",},{trigger:".o_bank_rec_selected_st_line:contains('line2'):not(:has(div.badge))",},{content:"Liquidity line displays debit '$ 100.00'",trigger:"div[name='line_ids'] table.o_list_table tr.o_bank_rec_liquidity_line td[field='debit']:contains('$ 100.00')",},{trigger:".o_switch_view.o_kanban.active",},{content:"Switch to list view",trigger:".o_switch_view.o_list",run:"click",},{content:"Click amount field of 'line2'; Selects the row",trigger:"table.o_list_table tr.o_data_row:contains('line2') td[name='amount']",run:"click",},{content:"Set balance of 'line2' (selected row) to 500.00",trigger:"table.o_list_table tr.o_data_row.o_selected_row td[name='amount'] input",run:"edit 500.00 && click body",},{trigger:".o_switch_view.o_list.active",},{content:"Switch back to kanban",trigger:".o_switch_view.o_kanban",run:"click",},{content:"'line2' is still selected",trigger:".o_bank_rec_st_line:contains('line2')",},{content:"Liquidity line displays debit '$ 500.00'",trigger:"div[name='line_ids'] table.o_list_table tr.o_bank_rec_liquidity_line td[field='debit']:contains('$ 500.00')",},{content:"'INV/2019/00001' has been selected as matching existing entry by matching rules",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='name']:contains('INV/2019/00001')",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});registry.category("web_tour.tours").add('account_accountant_bank_rec_widget_reconciliation_button',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{content:"Remove suggested line, if present",trigger:".o_list_record_remove",run(){const button=document.querySelector('.fa-trash-o');if(button){button.click();}}},{content:"Wait for deletion",trigger:".o_data_row:contains('Open balance')",},{content:"Select reconciliation model creating a new move",trigger:".recon_model_button:contains('test reconcile')",run:"click",},{content:"Confirm move created through reconciliation model writeoff button",trigger:"button[name=action_post]",run:"click",},{trigger:".o_breadcrumb",},{content:"Breadcrumb back to Bank Reconciliation from created move",trigger:".breadcrumb-item:contains('Bank Reconciliation')",run:"click",},{content:"Validate created move added as a line in reco widget",trigger:"button:contains('Validate')",run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_widget.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_widget',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_bank_rec_widget",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{trigger:"div[name='line_ids']",},{content:"The 'line1' should be selected by default",trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table",},{content:"The 'amls_tab' should be active and the inner list view loaded",trigger:"a.active[name='amls_tab']",},{trigger:"a.active[name='amls_tab']",},{content:"Click on the 'discuss_tab'",trigger:"a[name='discuss_tab']",run:"click",},{trigger:"a.active[name='discuss_tab']",},{content:"The 'discuss_tab' should be active and the chatter loaded",trigger:"div.bank_rec_widget_form_discuss_anchor div.o-mail-Chatter",},{trigger:"tr.o_bank_rec_auto_balance_line",},{content:"Click on the 'auto_balance' to make the 'manual_operations_tab' visible",trigger:"tr.o_bank_rec_auto_balance_line td[field='name']",run:"click",},{content:"The 'manual_operations_tab' should be active",trigger:"a.active[name='manual_operations_tab']",},{content:"The 'name' field should be focus automatically",trigger:"div.o_notebook div[name='name'] input:focus",},{trigger:"tr.o_bank_rec_auto_balance_line",},{content:"Click on the 'credit' field to change the focus from 'name' to 'amount_currency'",trigger:"tr.o_bank_rec_auto_balance_line td[field='credit']",run:"click",},{content:"Wait to avoid non-deterministic errors on the next step",trigger:"tr.o_bank_rec_auto_balance_line td[field='credit']",},{content:"The 'balance' field should be focus now",trigger:"div.o_notebook div[name='amount_currency'] input:focus",},{trigger:"a.active[name='manual_operations_tab']",},{content:"Click on the 'amls_tab'",trigger:"a[name='amls_tab']",run:"click",},{trigger:"a.active[name='amls_tab']",},{content:"Mount INV/2019/00002",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00002')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00002')",},{content:"Check INV/2019/00002 is well marked as selected",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00002')",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00002')",},{content:"Remove INV/2019/00002",trigger:"tr td.o_list_record_remove button",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr:not(.o_rec_widget_list_selected_item) td[name='move_id']:contains('INV/2019/00002')",},{content:"Mount INV/2019/00001",trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table td[name='move_id']:contains('INV/2019/00001')",run:"click",},{trigger:"div.bank_rec_widget_form_amls_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item td[name='move_id']:contains('INV/2019/00001')",},{content:"Validate",trigger:"button:contains('Validate')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"The 'line2' is the next not already reconciled line",trigger:"div[name='line_ids'] td[field='name']:contains('line2')",},{content:"Click on 'credit'",trigger:"div[name='line_ids'] td[field='credit']:last",run:"click",},{content:"The 'manual_operations_tab' should be active now and the auto_balance line mounted in edit",trigger:"a.active[name='manual_operations_tab']",},{content:"The last line should be selected",trigger:"div[name='line_ids'] tr.o_bank_rec_selected_line",},{content:"Search for 'partner_a'",trigger:"div[name='partner_id'] input",run:"edit partner_a",},{trigger:".ui-autocomplete .o_m2o_dropdown_option a:contains('Create')",},{content:"Select 'partner_a'",trigger:".ui-autocomplete:visible li:contains('partner_a')",run:"click",},{trigger:"tr:not(.o_bank_rec_auto_balance_line) td[field='partner_id']:contains('partner_a')",},{content:"Select the payable account",trigger:"button:contains('Payable')",run:"click",},{trigger:"tr:not(.o_bank_rec_auto_balance_line) td[field='account_id']:contains('Payable')",},{content:"Enter a tax",trigger:"div[name='tax_ids'] input",run:"edit 15",},{trigger:".ui-autocomplete",},{content:"Select 'Tax 15% (Sales)'",trigger:".ui-autocomplete:visible li:contains('Sales')",run:"click",},{content:"Tax column appears in list of lines",trigger:"div[name='line_ids'] td[field='tax_ids']",},{content:"Wait to avoid non-deterministic errors on the next step",trigger:"div[name='line_ids'] td:contains('Tax Received')",},{trigger:"button.btn-primary:contains('Validate')",},{content:"Validate",trigger:"button:contains('Validate')",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line3')",},{content:"The 'line3' is the next not already reconciled line",trigger:"div[name='line_ids'] td[field='name']:contains('line3')",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_journal_items_export.js */
odoo.define('@account_accountant/../tests/tours/test_tour_journal_items_export',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_journal_items_export",{url:"/web",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open journal items list view",trigger:'button[data-menu-xmlid="account.menu_finance_entries"]',run:"click",},{content:"Open journal items list view",trigger:'a[data-menu-xmlid="account.menu_action_account_moves_all"]',run:"click",},{content:"Select all items",trigger:'thead tr th.o_list_record_selector',run:"click",},{content:"Open export dialog",trigger:'i.fa-cog',run:"click",},{content:"Open export dialog",trigger:'i.fa-upload',run:"click",},{content:"Click on the cancel button",trigger:'button.o_form_button_cancel',run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});return __exports;});;

/* /accountant/static/tests/tours/account_merge_wizard_tour.js */
odoo.define('@accountant/../tests/tours/account_merge_wizard_tour',['@account/js/tours/account','@web/core/registry'],function(require){'use strict';let __exports={};const{accountTourSteps}=require("@account/js/tours/account");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_merge_wizard_tour",{url:"/odoo",steps:()=>[...accountTourSteps.goToAccountMenu("Go to Accounting"),{content:"Go to Configuration",trigger:'span:contains("Configuration")',run:"click",},{content:"Go to Chart of Accounts",trigger:'a:contains("Chart of Accounts")',run:"click",},{trigger:'.o_breadcrumb .text-truncate:contains("Chart of Accounts")',},{content:"Select accounts",trigger:"thead .o_list_record_selector",run:"click",},{content:"Check that exactly 4 accounts are present and selected",trigger:".o_list_selection_box:contains(4):contains(selected)",},{content:"Open Actions menu",trigger:".o_cp_action_menus .dropdown-toggle",run:"click",},{content:"Open Merge accounts wizard",trigger:'span:contains("Merge accounts")',run:"click",},{content:"Group by name",trigger:'div[name="is_group_by_name"] input',run:"click",},{content:"Wait for content to be updated",trigger:'td:contains("Current Assets (Current Assets)")',},{content:"Merge accounts",trigger:'button:not([disabled]) span:contains("Merge")',run:"click",},{content:"Check that there are now exactly 2 accounts",trigger:".o_pager_limit:contains(2)",},],});return __exports;});;

/* /accountant/static/tests/tours/account_tours.js */
odoo.define('@accountant/../tests/tours/account_tours',['@web/core/utils/patch','@account/js/tours/account','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");const{stepUtils}=require("@web_tour/tour_service/tour_utils");patch(accountTourSteps,{goToAccountMenu(description="Open Accounting Menu"){return stepUtils.goToAppSteps('accountant.menu_accounting',description);}});return __exports;});;

/* /account_reports/static/tests/tours/account.js */
odoo.define('@account_reports/../tests/tours/account',['@web/core/l10n/translation','@web/core/utils/patch','@account/js/tours/account'],function(require){'use strict';let __exports={};const{_t}=require("@web/core/l10n/translation");const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");patch(accountTourSteps,{onboarding(){return[{trigger:".o_widget_account_onboarding .fa-circle",},{trigger:"a[data-method=action_open_step_fiscal_year]",content:_t("Set Periods"),run:"click",},{trigger:"button[name=action_save_onboarding_fiscal_year]",content:_t("Save Fiscal Year end"),run:"click",},];},newInvoice(){return[{trigger:".o_widget_account_onboarding .fa-check-circle",},{trigger:"button[name=action_create_new]",content:_t("Now, we'll create your first invoice (accountant)"),run:"click",},];},});return __exports;});;

/* /account_reports/static/tests/tours/account_reports.js */
odoo.define('@account_reports/../tests/tours/account_reports',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports",{url:"/odoo/action-account_reports.action_account_report_bs",steps:()=>[{content:"Initial foldable",trigger:".o_content",run:()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",28);Asserts.isEqual(document.querySelector("tr:nth-child(4) td:nth-child(2)").textContent,"75.00");},},{content:"Click to unfold line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Line is unfolded",trigger:"tr:nth-child(5) .name:contains('101401')",run:()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",30);Asserts.isEqual(document.querySelector("tr:nth-child(4) td:nth-child(2)").textContent,"");},},{content:"Click to fold line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Line is folded",trigger:".o_content",run:()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",28);},},{content:"Unfold first line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Unfold second line",trigger:"tr:nth-child(7) td:first()",run:"click",},{content:"Unfold third line",trigger:"tr:nth-child(10) td:first()",run:"click",},{content:"Extra Trigger step",trigger:"tr:nth-child(12):not(.d-none) .name:contains('101404')",},{content:"Initial sortable",trigger:".o_content",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{trigger:"tr:nth-child(11) td:nth-child(2):contains('50.00')",},{content:"Unfold not previously unfolded line",trigger:"tr:nth-child(22):contains('Current Liabilities') td:first()",run:"click",},{content:"Line is unfolded",trigger:"tr:nth-child(23) .name:contains('251000')",run:"click",},{content:"Sortable (asc)",trigger:"tr:nth-child(11) td:nth-child(2):contains('50.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{content:"Sortable (desc)",trigger:"tr:nth-child(11) td:nth-child(2):contains('100.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{content:"Sortable (reset)",trigger:"tr:nth-child(5) td:nth-child(2):contains('75.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_amount_rounding.js */
odoo.define('@account_reports/../tests/tours/account_reports_amount_rounding',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_rounding_unit',{url:'/odoo/action-account_reports.action_account_report_bs',steps:()=>[{content:'Test the value of `Receivables` line in decimals',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the units filter",trigger:".dropdown-item:contains('In $')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000.00"))',},{content:'test the value of `Receivables` line in units',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the thousands filter",trigger:".dropdown-item:contains('In K$')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000"))',},{content:'test the value of `Receivables` line in thousands',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the millions filter",trigger:".dropdown-item:contains('In M$')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150"))',},{content:'test the value of `Receivables` line in millions',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the decimals filter",trigger:".dropdown-item:contains('In .$')",run:'click',},{content:'test the value of `Receivables` line in millions',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',run:()=>null,},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_analytic_filters.js */
odoo.define('@account_reports/../tests/tours/account_reports_analytic_filters',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_analytic_filters",{url:"/odoo/action-account_reports.action_account_report_general_ledger",steps:()=>[{content:"click analytic filters",trigger:".filter_analytic button",run:"click",},{content:"insert text in the searchbar",trigger:".o_multi_record_selector input",run:"edit Time",},{content:"click on the item",trigger:'.o-autocomplete--dropdown-item:contains("Time Off")',run:"click",},{content:"Check the label of the badge",trigger:'.dropdown-menu .o_tag_badge_text:contains("Time Off")',},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_annotations.js */
odoo.define('@account_reports/../tests/tours/account_reports_annotations',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_annotations",{url:"/odoo/action-account_reports.action_account_report_bs",steps:()=>[{content:"Initial annotations",trigger:".o_content",run:()=>{Asserts.DOMContainsNone(".annotations");},},{content:"Unfold first line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Unfold second line",trigger:"tr:nth-child(7) td:first()",run:"click",},{content:"Unfold third line",trigger:"tr:nth-child(10) td:first()",run:"click",},{content:"Extra Trigger step",trigger:"tr:nth-child(12):not(.d-none) .name:contains('101404')",},{content:"Check there are two lines annotated initially",trigger:".o_content",run:()=>{const annotations=document.querySelectorAll(".btn_annotation .fa-commenting");Asserts.isEqual(annotations.length,2);Asserts.isTrue(annotations[0]===document.querySelector("tr:nth-child(5)").querySelector(".fa-commenting"));Asserts.isTrue(annotations[1]===document.querySelector("tr:nth-child(12)").querySelector(".fa-commenting"));},},{content:"Click to show caret option",trigger:"tr:nth-child(8) .dropdown-toggle",run:"click",},{content:"Caret option is displayed",trigger:"tr:nth-child(8)",run:()=>{Asserts.hasClass("tr:nth-child(8) .o-dropdown","show");},},{content:"Click on annotate",trigger:".o-dropdown--menu .dropdown-item:last-of-type:contains('Annotate')",run:"click",},{content:"Add text to annotate",trigger:"textarea",run:"edit Annotation 121000",},{content:"Submit annotation by blurring",trigger:"textarea",run:function(){const annotation=this.anchor;annotation.dispatchEvent(new InputEvent("input"));annotation.dispatchEvent(new Event("change"));},},{content:"Wait for annotation created",trigger:"tr:nth-child(8) .btn_annotation .fa-commenting",},{content:"Close annotation",trigger:".o_content",run:"click",},{content:"Check there are now three lines annotated",trigger:".o_content",run:()=>{const annotations=document.querySelectorAll(".btn_annotation .fa-commenting");Asserts.isEqual(annotations.length,3);Asserts.isTrue(annotations[0]===document.querySelector("tr:nth-child(5)").querySelector(".fa-commenting"));Asserts.isTrue(annotations[1]===document.querySelector("tr:nth-child(8)").querySelector(".fa-commenting"));Asserts.isTrue(annotations[2]===document.querySelector("tr:nth-child(12)").querySelector(".fa-commenting"));},},{content:"Open second annotated line annotation popover",trigger:"tr:nth-child(8) .btn_annotation",run:"click",},{content:"Annotate contains previous text value",trigger:"textarea",run:()=>{Asserts.isEqual(document.querySelector("textarea").value,"Annotation 121000");},},{content:"Add text to annotate",trigger:"textarea",run:"edit Annotation 121000 edited",},{content:"Annotation is edited",trigger:"tr:nth-child(8) .btn_annotation",run:()=>{Asserts.isEqual(document.querySelector(".annotation_popover_autoresize_textarea").value,"Annotation 121000 edited");},},{content:"Click on trash can",trigger:".btn_annotation_delete",run:"click",},{content:"Check there are now only two lines annotated",trigger:"tr:nth-child(8):not(:has(.fa-commenting))",run:()=>{const annotations=document.querySelectorAll(".btn_annotation .fa-commenting");Asserts.isEqual(annotations.length,2);Asserts.isTrue(annotations[0]===document.querySelector("tr:nth-child(5)").querySelector(".fa-commenting"));Asserts.isTrue(annotations[1]===document.querySelector("tr:nth-child(12)").querySelector(".fa-commenting"));},},{content:"Open an annotated line annotation popover",trigger:"tr:nth-child(12) .btn_annotation",run:"click",},{content:"Click on the 'New' button",trigger:".annotation_popover_line .oe_link",run:"click",},{content:"Add text to annotate",trigger:"textarea:last()",run:"edit Annotation 101404 bis",},{content:"Submit annotation by blurring",trigger:"textarea:last()",run:function(){const annotation=this.anchor;annotation.dispatchEvent(new InputEvent("input"));annotation.dispatchEvent(new Event("change"));},},{content:"Check there are two annotated lines to end the test",trigger:".o_content",run:()=>{const annotations=document.querySelectorAll(".btn_annotation .fa-commenting");Asserts.isEqual(annotations.length,2);Asserts.isTrue(annotations[0]===document.querySelector("tr:nth-child(5)").querySelector(".fa-commenting"));Asserts.isTrue(annotations[1]===document.querySelector("tr:nth-child(12)").querySelector(".fa-commenting"));},},{content:"Remove first annotation to only have one annotation on line 12 (required setup step)",trigger:".annotation_popover tr:nth-child(2) .btn_annotation_delete",run:"click",},{content:"Verify that we still have one element",trigger:".annotation_popover tr:nth-child(3):contains('Add a line')",},{content:"Modify the date of an annotation to a further period",trigger:".annotation_popover tr:nth-child(2) input",run:"edit 01/01/2100",},{content:"Modify the date of an annotation to a further period",trigger:".annotation_popover tr:nth-child(2) input",run:function(){const input=this.anchor;input.dispatchEvent(new InputEvent("input"));input.dispatchEvent(new Event("change",{bubbles:true}));},},{content:"Check that there is no annotation anymore on line 12",trigger:"tr:nth-child(12):not(:has(.fa-commenting))",},{content:"change date filter",trigger:"#filter_date button",run:"click",},{content:"Open specific date button",trigger:".dropdown-menu div.dropdown-item",run:"click",},{content:"Go to 15 January 2100",trigger:".o_datetime_input",run:"edit 01/15/2100",},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"wait refresh",trigger:`#filter_date button:not(:contains(${new Date().getFullYear()}))`,},{content:"Check there is one annotation on line 12",trigger:"tr:nth-child(12):has(.fa-commenting)",run:()=>{const annotations=document.querySelectorAll(".btn_annotation .fa-commenting");Asserts.isEqual(annotations.length,1);Asserts.isTrue(annotations[0]===document.querySelector("tr:nth-child(12)").querySelector(".fa-commenting"));}},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_hide_0_lines.js */
odoo.define('@account_reports/../tests/tours/account_reports_hide_0_lines',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_hide_0_lines',{url:'/odoo/action-account_reports.action_account_report_bs',steps:()=>[{content:'test if the Bank and Cash line is present (but the value is 0)',trigger:'.line_name:contains("Bank and Cash Accounts")',run:"click",},{content:'test if the Current Year Unallocated Earnings line is present (but the value is 0)',trigger:'.line_name:contains("Current Year Unallocated Earnings")',run:"click",},{content:'test if the Unallocated Earnings line is present (but value is different from 0 and so should be there after the hide_0_lines',trigger:'.line_name:contains("Unallocated Earnings")',run:"click",},{content:"Open options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide line at 0 option",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:'test if the Unallocated Earnings line is still present',trigger:'.line_name:contains("Unallocated Earnings")',run:"click",},{content:'test if the Bank and Cash line is not present',trigger:'.line_name:not(:contains("Bank and Cash Accounts"))',run:"click",},{content:'test if the Current Year Unallocated Earnings line is not present',trigger:'.line_name:not(:contains("Current Year Unallocated Earnings"))',run:"click",},{content:"Click again to open the options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide lines at 0 option again",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:'test again if the Bank and Cash line is present (but the value is 0)',trigger:'.line_name:contains("Bank and Cash Accounts")',run:()=>null,},]});registry.category("web_tour.tours").add('account_reports_hide_0_lines_with_string_columns',{url:'/odoo/action-account_reports.action_account_report_general_ledger',steps:()=>[{content:"Check if the 211000 Account Payable line is present (but the value is 0)",trigger:".name:contains('211000 Account Payable')",run:"click",},{content:"Check if the MISC item line is present with string values set up, but all amounts are at 0",trigger:".name:contains('Coucou les biloutes')",},{content:"Open options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide line at 0 option",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check if the MISC item line is hidden",trigger:":not(:visible):contains('Coucou les biloutes')",},{content:"Click again to open the options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide lines at 0 option again",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check again if the MISC item line is present (but the value is 0)",trigger:".name:contains('Coucou les biloutes')",},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_search.js */
odoo.define('@account_reports/../tests/tours/account_reports_search',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_search',{url:'/odoo/action-account_reports.action_account_report_general_ledger',steps:()=>[{content:"click search",trigger:'.o_searchview_input',run:'click',},{content:'insert text in the searchbar',trigger:'.o_searchview_input',run:"edit 40",},{content:'test if the product sale line is present',trigger:'.line_name:contains("400000 Product Sales")',run:"click",},{content:"click search",trigger:'.o_searchview_input',run:'click',},{content:'insert text in the search bar',trigger:'.o_searchview_input',run:"edit Account",},{content:'test if the receivable line is present',trigger:'.line_name:contains("121000 Account Receivable")',run:'click',},{content:'check that the product sale line is not present',trigger:'.line_name:not(:contains("400000 Product Sales"))',},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_sections.js */
odoo.define('@account_reports/../tests/tours/account_reports_sections',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{DateTime}=luxon;const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_sections',{url:"/odoo/action-account_reports.action_account_report_gt",steps:()=>[{content:"Open variant selector",trigger:"#filter_variant button",run:'click',},{content:"Select the test variant using sections",trigger:".dropdown-item:contains('Test Sections')",run:'click',},{content:"Check the lines of section 1 are displayed",trigger:".line_name:contains('Section 1 line')",},{content:"Check the columns of section 1 are displayed",trigger:"#table_header th:last():contains('Column 1')",},{content:"Check the export buttons belong to the composite report",trigger:".btn:contains('composite_report_custom_button')",},{content:"Check the filters displayed belong to section 1 (journals filter is not enabled on section 2, nor the composite report)",trigger:"#filter_journal",},{content:"Check the date chosen by default",trigger:"#filter_date",run:(actionHelper)=>{const previousMonth=DateTime.now().minus({months:1});Asserts.isTrue(actionHelper.anchor.getElementsByTagName('button')[0].innerText.includes(previousMonth.year));},},{content:"Switch to section 2",trigger:"#section_selector .btn:contains('Section 2')",run:'click',},{content:"Check the lines of section 2 are displayed",trigger:".line_name:contains('Section 2 line')",},{content:"Check the columns of section 2 are displayed",trigger:"#table_header th:last():contains('Column 2')",},{content:"Check the export buttons belong to the composite report",trigger:".btn:contains('composite_report_custom_button')",},{content:"Check the filters displayed belong to section 2 (comparison filter is not enabled on section 1, nor the composite report)",trigger:"#filter_comparison",},{content:"Open date switcher",trigger:"#filter_date button",run:'click',},{content:"Select another date in the future",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_next_date",run:'click'},{content:"Apply filter by closing the dropdown for the future date",trigger:"#filter_date .btn:first()",run:"click",},{content:"Check that the date has changed",trigger:`#filter_date button:not(:contains(${ DateTime.now().minus({months: 1}).year }))`,run:(actionHelper)=>{const nextYear=DateTime.now().plus({years:1}).year;Asserts.isTrue(actionHelper.anchor.innerText.includes(nextYear));},},{content:"Open date switcher",trigger:"#filter_date button",run:'click',},{content:"Select another date first time",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu span.dropdown-item:nth-child(3) time:contains(${ DateTime.now().year})`,},{content:"Select another date second time",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu span.dropdown-item:nth-child(3) time:contains(${ DateTime.now().minus({years: 1}).year })`,},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"Check that the date has changed",trigger:`#filter_date button:contains(${ DateTime.now().minus({years: 1}).year })`,},{content:"Switch back to section 1",trigger:"#section_selector .btn:contains('Section 1')",run:'click',},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_widgets.js */
odoo.define('@account_reports/../tests/tours/account_reports_widgets',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_widgets",{url:"/odoo/action-account_reports.action_account_report_pl",steps:()=>[{content:"change date filter",trigger:"#filter_date button",run:"click",},{content:"Select another date in the future",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_next_date",run:'click'},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"wait refresh",trigger:`#filter_date button:not(:contains(${ new Date().getFullYear() }))`,},{content:"change date filter for the second time",trigger:"#filter_date button",run:"click",},{content:"Select another date in the past first time",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu span.dropdown-item:nth-child(3) time:contains(${new Date().getFullYear()})`,},{content:"Select another date in the past second time",trigger:".dropdown-menu span.dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu span.dropdown-item:nth-child(3) time:contains(${
                new Date().getFullYear() - 1
            })`,},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"wait refresh",trigger:`#filter_date button:contains(${ new Date().getFullYear() - 1 })`,},{content:"change comparison filter",trigger:"#filter_comparison .btn:first()",run:"click",},{content:"change comparison filter",trigger:".dropdown-item.period:first()",run:"click",},{content:"Apply filter by closing the dropdown",trigger:"#filter_comparison .btn:first()",run:"click",},{content:"wait refresh, report should have 4 columns",trigger:"th + th + th + th",},{content:"export xlsx",trigger:"button:contains('XLSX')",run:"click",},],});return __exports;});;

/* /account_reports/static/tests/tours/asserts.js */
odoo.define('@account_reports/../tests/tours/asserts',[],function(require){'use strict';let __exports={};const Asserts=__exports.Asserts=class Asserts{static getCount(target,selector){return document.querySelector(target).querySelectorAll(selector).length;}
static getDOMCount(selector){return document.querySelectorAll(selector).length;}
static check(condition,success,error){condition?Asserts.success(success):Asserts.error(error);}
static success(message){return console.info(`SUCCESS: ${message}`);}
static error(message){throw new Error(`FAIL: ${message}`);}
static isTrue(actual){Asserts.check(actual,`${actual} is true`,`${actual} is not true`);}
static isFalse(actual){Asserts.check(!actual,`${actual} is false`,`${actual} is not false`);}
static isEqual(actual,expected){Asserts.check((actual==expected),`${actual} is equal to expected ${expected}`,`${actual} is not equal to expected ${expected}`);}
static isStrictEqual(actual,expected){Asserts.check((actual===expected),`${actual} is strictly equal to expected ${expected}`,`${actual} is not strictly equal to expected ${expected}`);}
static contains(target,selector){const count=Asserts.getCount(target,selector);Asserts.check((count>0),`There is at least one ${selector} in ${target}`,`There should be at least one ${selector} in ${target} but there is ${count}`);}
static containsNone(target,selector){const count=Asserts.getCount(target,selector);Asserts.check((count===0),`There is no ${selector} in ${target}`,`There should be no ${selector} in ${target} but there is ${count}`);}
static containsNumber(target,selector,number){const count=Asserts.getCount(target,selector);Asserts.check((count===number),`There is the correct number (${number}) of ${selector} in ${target}`,`There should be at ${number} ${selector} in ${target} but there is ${count}`);}
static DOMContains(selector){const count=Asserts.getDOMCount(selector);Asserts.check((count>0),`There is at least one ${selector} in the DOM`,`There should be at least one ${selector} in the DOM but there is ${count}`);}
static DOMContainsNone(selector){const count=Asserts.getDOMCount(selector);Asserts.check((count===0),`There is no ${selector} in the DOM`,`There should be 0 ${selector} in the DOM but there is ${count}`);}
static DOMContainsNumber(selector,number){const count=Asserts.getDOMCount(selector);Asserts.check((Asserts.getDOMCount(selector)===number),`There is the correct number (${number}) of ${selector} in the DOM`,`There should be ${number} ${selector} in the DOM but there is ${count}`);}
static hasClass(selector,classname){Asserts.check(document.querySelector(selector).classList.contains(classname),`${selector} has class ${classname}`,`${selector} should have class ${classname} but hasn't`);}}
return __exports;});;

/* /account_reports/static/tests/tours/test_tour_bank_rec_ui.js */
odoo.define('@account_reports/../tests/tours/test_tour_bank_rec_ui',['@web/core/utils/patch','@account/js/tours/account'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");patch(accountTourSteps,{bankRecUiReportSteps(){return[{trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"balance is 2100",trigger:".btn-link:contains('$ 2,100.00')",run:"click",},{trigger:"span:contains('General Ledger')",},{content:"Breadcrumb back to Bank Reconciliation from the report",trigger:".breadcrumb-item a:contains('Bank Reconciliation')",run:"click",},];},});return __exports;});;

/* /sale/static/tests/tours/mail_attachment_removal_test_tour.js */
odoo.define('@sale/../tests/tours/mail_attachment_removal_test_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_attachment_removal_tour",{steps:()=>[{content:"click on send by email",trigger:".o_statusbar_buttons > button[name='action_quotation_send']",run:"click"},{content:"save a new layout",trigger:".o_technical_modal button[name='document_layout_save']",run:"click"},{content:"delete attachment",trigger:".o_field_widget[name='attachment_ids'] li > button .fa-times",run:"click"},{content:"send the email",trigger:".o_mail_send",run:"click"},{content:"confirm quotation",trigger:"button[name='action_confirm']",run:"click"}]})
return __exports;});;

/* /sale/static/tests/tours/product_attribute_value_tour.js */
odoo.define('@sale/../tests/tours/product_attribute_value_tour',['@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const openProductAttribute=(product_attribute)=>[...stepUtils.goToAppSteps("sale.sale_menu_root","Go to the Sales App"),{content:'Open configuration menu',trigger:'.o-dropdown[data-menu-xmlid="sale.menu_sale_config"]',run:"click",},{content:'Navigate to product attribute list view',trigger:'.o-dropdown-item[data-menu-xmlid="sale.menu_product_attribute_action"]',run:"click",},{content:`Navigate to ${product_attribute}`,trigger:`.o_data_cell[data-tooltip=${product_attribute}]`,run:"click",},];const deletePAV=(product_attribute_value,message)=>[{content:'Click delete button',trigger:`.o_data_cell[data-tooltip=${product_attribute_value}] ~ .o_list_record_remove`,run:"click",},{content:'Check correct message in modal',trigger:message||'.modal-title:contains("Bye-bye, record!")',run:"click",},{content:'Close modal',trigger:'.btn-close',run:"click",}]
registry.category("web_tour.tours").add('delete_product_attribute_value_tour',{url:'/odoo',steps:()=>[...openProductAttribute("PA"),...deletePAV("pa_value_1",".text-prewrap:contains('pa_value_1')"),...deletePAV("pa_value_2"),...deletePAV("pa_value_3"),{content:'Check test finished',trigger:'a:contains("Attributes")',}]});return __exports;});;

/* /sale/static/tests/tours/sale_catalog.js */
odoo.define('@sale/../tests/tours/sale_catalog',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('sale_catalog',{steps:()=>[{content:"Create a new SO",trigger:'.o_list_button_add',run:'click',},{content:"Select the customer field",trigger:".o_field_res_partner_many2one input.o_input",run:'click',},{content:"Wait for the field to be active",trigger:".o_field_res_partner_many2one input[aria-expanded=true]",},{content:"Select a customer from the dropdown",trigger:".o_field_res_partner_many2one .dropdown-item:not([id$='_loading']):first",run:'click',},{content:"Open product catalog",trigger:'button[name="action_add_from_catalog"]',run:'click',},{content:"Type 'Restricted' into the search bar",trigger:'input.o_searchview_input',run:"edit Restricted",},{content:"Search for the product",trigger:'input.o_searchview_input',run:"press Enter",},{content:"Wait for catalog rendering",trigger:'.o_kanban_record:contains("Restricted Product")',},{content:"Wait for filtering",trigger:'.o_kanban_renderer:not(:has(.o_kanban_record:contains("AAA Product")))',},{content:"Add the product to the SO",trigger:'.o_kanban_record:contains("Restricted Product") .fa-shopping-cart',run:'click',},{content:"Wait for product to be added",trigger:'.o_kanban_record:contains("Restricted Product"):not(:has(.fa-shopping-cart))',},{content:"Input a custom quantity",trigger:'.o_kanban_record:contains("Restricted Product") .o_input',run:"edit 6",},{content:"Increase the quantity",trigger:'.o_kanban_record:contains("Restricted Product") .fa-plus',run:'click',},{content:"Close the catalog",trigger:'.o-kanban-button-back',run:'click',},]});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator',['@web/core/registry','@web_tour/tour_service/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_service/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),comboConfiguratorTourUtils.assertComboCount(2),comboConfiguratorTourUtils.assertComboItemCount("Combo A",2),comboConfiguratorTourUtils.assertComboItemCount("Combo B",2),comboConfiguratorTourUtils.assertQuantity(1),comboConfiguratorTourUtils.assertPrice('25.00'),comboConfiguratorTourUtils.increaseQuantity(),comboConfiguratorTourUtils.assertQuantity(2),comboConfiguratorTourUtils.assertPrice('50.00'),comboConfiguratorTourUtils.decreaseQuantity(),comboConfiguratorTourUtils.assertQuantity(1),comboConfiguratorTourUtils.assertPrice('25.00'),comboConfiguratorTourUtils.setQuantity(3),comboConfiguratorTourUtils.assertQuantity(3),comboConfiguratorTourUtils.assertPrice('75.00'),comboConfiguratorTourUtils.assertConfirmButtonDisabled(),comboConfiguratorTourUtils.selectComboItem("Product A2"),comboConfiguratorTourUtils.selectComboItem("Product B2"),comboConfiguratorTourUtils.assertConfirmButtonEnabled(),comboConfiguratorTourUtils.selectComboItem("Product A1"),productConfiguratorTourUtils.selectAttribute("Product A1","No variant attribute","A"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.assertPrice('90.00'),comboConfiguratorTourUtils.selectComboItem("Product A1"),...productConfiguratorTourUtils.selectAndSetCustomAttribute("Product A1","No variant attribute","B","Some custom value"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.assertPrice('93.00'),...comboConfiguratorTourUtils.saveConfigurator(),tourUtils.checkSOLDescriptionContains("Combo product x 3"),tourUtils.checkSOLDescriptionContains("Product A1","No variant attribute: B: Some custom value",{isReadonly:true}),tourUtils.checkSOLDescriptionContains("Product B2"),{content:"Verify the combo item quantities",trigger:'td[name="product_uom_qty"]:contains(3.00)',},{content:"Verify the first combo item's unit price",trigger:'td[name="price_unit"]:contains(18.50)',},{content:"Verify the second combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the order's total price",trigger:'div.oe_subtotal_footer:contains(93.00)',},tourUtils.editLineMatching("Combo product x 3"),tourUtils.editConfiguration(),comboConfiguratorTourUtils.setQuantity(2),comboConfiguratorTourUtils.assertComboItemSelected("Product A1"),comboConfiguratorTourUtils.assertComboItemSelected("Product B2"),comboConfiguratorTourUtils.selectComboItem("Product A2"),...comboConfiguratorTourUtils.saveConfigurator(),tourUtils.checkSOLDescriptionContains("Combo product x 2"),tourUtils.checkSOLDescriptionContains("Product A2"),tourUtils.checkSOLDescriptionContains("Product B2"),{content:"Verify the combo item quantities",trigger:'td[name="product_uom_qty"]:contains(2.00)',},{content:"Verify the first combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the second combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the order's total price",trigger:'div.oe_subtotal_footer:contains(50.00)',},...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator_preconfigure_unconfigurable_ptals.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator_preconfigure_unconfigurable_ptals',['@web/core/registry','@web_tour/tour_service/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_service/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator_preconfigure_unconfigurable_ptals',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),{content:"Verify that unconfigurable ptals are preconfigured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute A: A")`,},{content:"Verify that configurable ptals aren't preconfigured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:not(:contains("Attribute B: B"))`,},comboConfiguratorTourUtils.selectComboItem("Test product"),productConfiguratorTourUtils.selectAttribute("Test product","Attribute B","B",'multi'),...productConfiguratorTourUtils.saveConfigurator(),{content:"Verify that configurable ptals are now configured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute B: B")`,},...comboConfiguratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator_preselect_single_unconfigurable_items.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator_preselect_single_unconfigurable_items',['@web/core/registry','@web_tour/tour_service/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_service/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator_preselect_single_unconfigurable_items',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),comboConfiguratorTourUtils.assertSelectedComboItemCount(2),comboConfiguratorTourUtils.assertComboItemSelected("Product A"),comboConfiguratorTourUtils.assertComboItemSelected("Product C"),comboConfiguratorTourUtils.assertConfirmButtonDisabled(),comboConfiguratorTourUtils.selectComboItem("Product B"),productConfiguratorTourUtils.selectAttribute("Product B","Attribute B","B",'multi'),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.selectComboItem("Product D"),productConfiguratorTourUtils.setCustomAttribute("Product D","Attribute D","Test D"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.selectComboItem("Product E1"),comboConfiguratorTourUtils.assertConfirmButtonEnabled(),...comboConfiguratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_signature.js */
odoo.define('@sale/../tests/tours/sale_signature',['@odoo/hoot-dom','@web/core/registry','@web/core/utils/urls'],function(require){'use strict';let __exports={};const{waitUntil}=require("@odoo/hoot-dom");const{registry}=require("@web/core/registry");const{redirect}=require("@web/core/utils/urls");registry.category("web_tour.tours").add('sale_signature',{url:'/my/quotes',steps:()=>[{content:"open the test SO",trigger:'a:text(test SO)',run:"click",expectUnloadPage:true,},{content:"click sign",trigger:'a:contains("Sign")',run:"click",},{content:"check submit is enabled",trigger:'.o_portal_sign_submit:enabled',},{trigger:".modal .o_web_sign_name_and_signature input:value(Joel Willis)"},{trigger:".modal canvas.o_web_sign_signature",async run(helpers){await waitUntil(()=>{const canvas=helpers.anchor;const context=canvas.getContext("2d");const imageData=context.getImageData(0,0,canvas.width,canvas.height);const pixels=new Uint32Array(imageData.data.buffer);return pixels.some((pixel)=>pixel!==0);});},},{content:"click select style",trigger:'.modal .o_web_sign_auto_select_style button',run:"click",},{content:"click style 4",trigger:".o-dropdown-item:eq(3)",run:"click",},{content:"click submit",trigger:'.modal .o_portal_sign_submit:enabled',run:"click",expectUnloadPage:true,},{content:"check it's confirmed",trigger:'#quote_content:contains("Thank You")',run:"click",},{trigger:'#quote_content',run:function(){redirect("/odoo");},expectUnloadPage:true,},{trigger:'nav',}]});registry.category("web_tour.tours").add("sale_signature_without_name",{steps:()=>[{content:"Sign & Pay",trigger:".o_portal_sale_sidebar .btn-primary, :iframe .o_portal_sale_sidebar .btn-primary",run:"click",},{content:"click submit",trigger:".o_portal_sign_submit:enabled, :iframe .o_portal_sign_submit:enabled",run:"click",},{content:"check error because no name",trigger:'.o_portal_sign_error_msg:contains("Signature is missing."), :iframe .o_portal_sign_error_msg:contains("Signature is missing.")',},],});return __exports;});;

/* /sale/static/src/js/tours/combo_configurator_tour_utils.js */
odoo.define('@sale/js/tours/combo_configurator_tour_utils',['@odoo/hoot-dom'],function(require){'use strict';let __exports={};const{queryAll,queryValue,waitUntil}=require('@odoo/hoot-dom');function comboSelector(comboName){return`
        .sale-combo-configurator-dialog
        [name="sale_combo_configurator_title"]:contains("${comboName}")
    `;}
function comboItemSelector(comboItemName,extraClasses=[]){const extraClassesSelector=extraClasses.map(extraClass=>`.${extraClass}`).join('');return`
        .sale-combo-configurator-dialog
        .combo-item-grid
        .product-card${extraClassesSelector}:has(.card-title:contains("${comboItemName}"))
    `;}
function assertComboCount(count){return{content:`Assert that there are ${count} combos`,trigger:'.sale-combo-configurator-dialog',run:()=>queryAll('.sale-combo-configurator-dialog [name="sale_combo_configurator_title"]').length===count,};}
function assertComboItemCount(comboName,count){return{content:`Assert that there are ${count} combo items in combo ${comboName}`,trigger:comboSelector(comboName),run:()=>queryAll(`${comboSelector(comboName)} + .combo-item-grid .product-card`).length===count,};}
function assertSelectedComboItemCount(count){return{content:`Assert that there are ${count} selected combo items`,trigger:'.sale-combo-configurator-dialog',run:()=>queryAll(`.sale-combo-configurator-dialog .combo-item-grid .product-card.selected`).length===count,};}
function selectComboItem(comboItemName){return{content:`Select combo item ${comboItemName}`,trigger:comboItemSelector(comboItemName),run:'click',};}
function assertComboItemSelected(comboItemName){return{content:`Assert that combo item ${comboItemName} is selected`,trigger:comboItemSelector(comboItemName,['selected']),};}
function increaseQuantity(){return{content:"Increase the combo quantity",trigger:'.sale-combo-configurator-dialog button[name="sale_quantity_button_plus"]',run:'click',};}
function decreaseQuantity(){return{content:"Decrease the combo quantity",trigger:'.sale-combo-configurator-dialog button[name="sale_quantity_button_minus"]',run:'click',};}
function setQuantity(quantity){return{content:`Set the combo quantity to ${quantity}`,trigger:'.sale-combo-configurator-dialog input[name="sale_quantity"]',run:`edit ${quantity} && click .modal-body`,};}
function assertQuantity(quantity){const quantitySelector='.sale-combo-configurator-dialog input[name="sale_quantity"]';return{content:`Assert that the combo quantity is ${quantity}`,trigger:quantitySelector,run:async()=>await waitUntil(()=>queryValue(quantitySelector)===quantity,{timeout:1000}),};}
function assertPrice(price){return{content:`Assert that the price is ${price}`,trigger:`
            .sale-combo-configurator-dialog
            [name="sale_combo_configurator_total"]:contains("${price}")
        `,};}
function assertPriceInfo(priceInfo){return{content:`Assert that the price info is ${priceInfo}`,trigger:`.sale-combo-configurator-dialog footer.modal-footer:contains("${priceInfo}")`,};}
function assertFooterButtonsDisabled(){return{content:"Assert that the footer buttons are disabled",trigger:'.sale-combo-configurator-dialog footer.modal-footer button:disabled',};}
function assertFooterButtonsEnabled(){return{content:"Assert that the footer buttons are enabled",trigger:'.sale-combo-configurator-dialog footer.modal-footer button:enabled',};}
function assertConfirmButtonDisabled(){return{content:"Assert that the confirm button is disabled",trigger:`
            .sale-combo-configurator-dialog
            button[name="sale_combo_configurator_confirm_button"]:disabled
        `,};}
function assertConfirmButtonEnabled(){return{content:"Assert that the confirm button is enabled",trigger:`
            .sale-combo-configurator-dialog
            button[name="sale_combo_configurator_confirm_button"]:enabled
        `,};}
function saveConfigurator(){return[{content:"Confirm the combo configurator",trigger:`
                .sale-combo-configurator-dialog
                button[name="sale_combo_configurator_confirm_button"]
            `,run:'click',},{content:"Wait until the modal is closed",trigger:'body:not(:has(.sale-combo-configurator-dialog))',},];}
__exports[Symbol.for("default")]={comboSelector,comboItemSelector,assertComboCount,assertComboItemCount,assertSelectedComboItemCount,selectComboItem,assertComboItemSelected,increaseQuantity,decreaseQuantity,setQuantity,assertQuantity,assertPrice,assertPriceInfo,assertFooterButtonsDisabled,assertFooterButtonsEnabled,assertConfirmButtonDisabled,assertConfirmButtonEnabled,saveConfigurator,};return __exports;});;

/* /sale/static/src/js/tours/product_configurator_tour_utils.js */
odoo.define('@sale/js/tours/product_configurator_tour_utils',['@odoo/hoot-dom'],function(require){'use strict';let __exports={};const{queryAttribute,queryValue,waitUntil}=require('@odoo/hoot-dom');function productSelector(productName){return`
        table.o_sale_product_configurator_table
        tr:has(td>div[name="o_sale_product_configurator_name"]
        span:contains("${productName}"))
    `;}
function optionalProductSelector(productName){return`
        table.o_sale_product_configurator_table_optional
        tr:has(td>div[name="o_sale_product_configurator_name"]
        span:contains("${productName}"))
    `;}
function optionalProductImageSrc(productName){return queryAttribute(`${optionalProductSelector(productName)} td.o_sale_product_configurator_img>img`,'src');}
function addOptionalProduct(productName){return{content:`Add ${productName}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_price
            button:contains("Add")
        `,run:'click',};}
function removeOptionalProduct(productName){return{content:`Remove ${productName}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            a:contains("Remove")
        `,run:'click',};}
function increaseProductQuantity(productName){return{content:`Increase the quantity of ${productName}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            button:has(i.fa-plus)
        `,run:'click',};}
function setProductQuantity(productName,quantity){return{content:`Set the quantity of ${productName} to ${quantity}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            input[name="sale_quantity"]
        `,run:`edit ${quantity} && click .modal-body`,};}
function assertProductQuantity(productName,quantity){const quantitySelector=`
        ${productSelector(productName)}
        td.o_sale_product_configurator_qty
        input[name="sale_quantity"]
    `;return{content:`Assert that the quantity of ${productName} is ${quantity}`,trigger:quantitySelector,run:async()=>await waitUntil(()=>queryValue(quantitySelector)===quantity,{timeout:1000}),};}
function selectAttribute(productName,attributeName,attributeValue,attributeType='radio'){const ptalSelector=`
        ${productSelector(productName)}
        td>div[name="ptal"]:has(label:contains("${attributeName}"))
    `;const content=`Select ${attributeValue} for ${productName} ${attributeName}`;switch(attributeType){case'color':return{content:content,trigger:`${ptalSelector} label[title="${attributeValue}"]`,run:'click',};case'multi':return{content:content,trigger:`${ptalSelector}:has(label:text(${attributeValue})) input[type="checkbox"]`,run:"click",};case'pills':case'radio':return{content:content,trigger:`${ptalSelector} span:contains("${attributeValue}")`,run:'click',};case'select':return{content:content,trigger:`${ptalSelector} select`,run:`selectByLabel ${attributeValue}`,};default:console.error("Unsupported attribute type");}}
function setCustomAttribute(productName,attributeName,customValue){return{content:`Set ${customValue} as a custom attribute for ${productName} ${attributeName}`,trigger:`
            ${productSelector(productName)}
            td>div[name="ptal"]:has(label:contains("${attributeName}"))
            input[type="text"]
        `,run:`edit ${customValue} && click .modal-body`,};}
function selectAndSetCustomAttribute(productName,attributeName,attributeValue,customValue,attributeType='radio'){return[selectAttribute(productName,attributeName,attributeValue,attributeType),setCustomAttribute(productName,attributeName,customValue),];}
function assertPriceTotal(total){return{content:`Assert that the total is ${total}`,trigger:`table.o_sale_product_configurator_table tr>td[colspan="4"] span:contains("${total}")`,};}
function assertProductPrice(productName,price){return{content:`Assert that ${productName} costs ${price}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_price
            span:contains("${price}")
        `,};}
function assertOptionalProductPrice(productName,price){return{content:`Assert that ${productName} costs ${price}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_qty
            span:contains("${price}")
        `,};}
function assertProductPriceInfo(productName,priceInfo){return{content:`Assert that the price info of ${productName} is ${priceInfo}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_price
            div:contains("${priceInfo}")
        `,};}
function assertOptionalProductPriceInfo(productName,priceInfo){return{content:`Assert that the price info of ${productName} is ${priceInfo}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_qty
            div:contains("${priceInfo}")
        `,};}
function assertProductNameContains(productName){return{content:`Assert that the product name contains ${productName}`,trigger:productSelector(productName),};}
function assertFooterButtonsDisabled(){return{content:"Assert that the footer buttons are disabled",trigger:'.o_sale_product_configurator_dialog footer.modal-footer button:disabled',};}
function saveConfigurator(){return[{trigger:'.o_sale_product_configurator_dialog button:contains(Confirm)',run:'click',},{content:"Wait until the modal is closed",trigger:'body:not(:has(.o_sale_product_configurator_dialog))',}];}
__exports[Symbol.for("default")]={productSelector,optionalProductSelector,optionalProductImageSrc,addOptionalProduct,removeOptionalProduct,increaseProductQuantity,setProductQuantity,assertProductQuantity,selectAttribute,setCustomAttribute,selectAndSetCustomAttribute,assertPriceTotal,assertProductPrice,assertOptionalProductPrice,assertProductPriceInfo,assertOptionalProductPriceInfo,assertProductNameContains,assertFooterButtonsDisabled,saveConfigurator,};return __exports;});;

/* /sale/static/src/js/tours/tour_utils.js */
odoo.define('@sale/js/tours/tour_utils',[],function(require){'use strict';let __exports={};function createNewSalesOrder(){return[{trigger:'.o_sale_order',},{content:"Create new order",trigger:'.o_list_button_add',run:'click',},]}
function selectCustomer(customerName){return[{content:`Select customer ${customerName}`,trigger:'.o_field_widget[name=partner_id] input',run:`edit ${customerName}`,},{trigger:`ul.ui-autocomplete > li > a:contains("${customerName}")`,run:'click',},];}
function addProduct(productName,rowNumber=1){return[{content:`Add product ${productName}`,trigger:'a:contains("Add a product")',run:'click',},{content:'wait for new row to be created',trigger:`.o_data_row:nth-child(${rowNumber})`,},{trigger:'div[name="product_template_id"] input',run:`edit ${productName}`,},{trigger:`ul.ui-autocomplete a:contains("${productName}")`,run:'click',},];}
function clickSomewhereElse(){return[{content:'click somewhere else to exit cell focus',trigger:'a[name=order_lines]',run:'click',},{content:'check that the soline is not focused anymore',trigger:'table.o_section_and_note_list_view:not(:has(.o_selected_row))',}]}
function checkSOLDescriptionContains(productName,text,{isReadonly=false}={}){const productSelector=isReadonly?`a:contains("${productName}")`:`span:contains("${productName}")`;if(!text){return{trigger:productSelector,}}
return{trigger:`${productSelector} ~ textarea`,}}
function editLineMatching(productName,text){let base_step=checkSOLDescriptionContains(productName,text);base_step['run']='click';return base_step;}
function editConfiguration(){return{trigger:'[name=product_template_id] button.fa-pencil',run:'click',}}
__exports[Symbol.for("default")]={createNewSalesOrder,selectCustomer,addProduct,checkSOLDescriptionContains,editLineMatching,editConfiguration,clickSomewhereElse,};return __exports;});;

/* /account_accountant_batch_payment/static/tests/tours/test_tour_bank_rec_widget.js */
odoo.define('@account_accountant_batch_payment/../tests/tours/test_tour_bank_rec_widget',['@web/core/registry','@web_tour/tour_service/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_batch_payment_bank_rec_widget",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{content:"The 'line1' should be selected by default",trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"Click on the 'batch_payments_tab'",trigger:"a[name='batch_payments_tab']",run:"click",},{content:"Mount BATCH0001",trigger:"div.bank_rec_widget_form_batch_payments_list_anchor table.o_list_table td[name='name']:contains('BATCH0001')",run:"click",},{content:"The batch should be selected",trigger:"div.bank_rec_widget_form_batch_payments_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item",},{content:"Open the batch",trigger:"div[name='line_ids'] .o_bank_rec_second_line .o_form_uri",run:"click",},{content:"Open the payment of 100.0",trigger:"div[name='payment_ids'] tbody tr.o_data_row:last .o_list_record_open_form_view button",run:"click",},{content:"Reject it",trigger:"button[name='action_reject']",run:"click",},{content:"Go back to the reconciliation widget",trigger:"a[href$='/reconciliation']",run:"click",},{trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{trigger:"button.btn-primary:contains('Validate')",},{content:"Validate",trigger:"button:contains('Validate')",run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Customer Invoices")',},],});registry.category("web_tour.tours").add("account_accountant_batch_payment_bank_rec_widget_batch_line_clickable",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{content:"Click on the 'batch_payments_tab'",trigger:"a[name='batch_payments_tab']",run:"click",},{content:"Mount BATCH0001",trigger:"div.bank_rec_widget_form_batch_payments_list_anchor table.o_list_table td[name='name']:contains('BATCH0001')",run:"click",},{content:"The batch should be selected",trigger:"div.bank_rec_widget_form_batch_payments_list_anchor table.o_list_table tr.o_rec_widget_list_selected_item",},{content:"Click batch row for BATCH0001",trigger:".o_data_row.o_selected_row.o_list_no_open.o_bank_rec_second_line:contains('BATCH0001')",run:"click",},{content:"Wait for Manual Operations tab to open",trigger:"div[name='analytic_distribution']:not(:visible)",},],});return __exports;});;

/* /sale_external_tax/static/tests/tours/sale_external_optional_products.js */
odoo.define('@sale_external_tax/../tests/tours/sale_external_optional_products',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("sale_external_optional_products",{url:"/my/quotes",steps:()=>[{content:"open the test SO",trigger:'a:contains("test")',run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(10.00)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"add the optional product",trigger:".js_add_optional_products:contains(add to order)",run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(11.15)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"Check the quantity",trigger:"tr:contains(optional product) input.js_quantity:value(1.0)",},{content:"increase the quantity of the optional product by 1",trigger:"tr:contains(optional product) .js_quantity_container .js_update_line_json[title='Add one']",run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(12.30)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"wait for the quantity to be updated",trigger:"tr:contains(optional product) input.js_quantity:value(2.0)",},{content:"delete the optional line",trigger:"table#sales_order_table tbody tr:eq(1) a[title=Remove]",run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(10.00)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"wait for line to be deleted and show up again in optional products",trigger:".js_add_optional_products",},],});return __exports;});;

/* /auth_totp/static/tests/totp_flow.js */
odoo.define('@auth_totp/../tests/totp_flow',['@odoo/hoot-dom','@web/core/network/rpc','@web/core/registry','@web_tour/tour_service/tour_utils'],function(require){'use strict';let __exports={};const{waitFor}=require("@odoo/hoot-dom");const{rpc}=require("@web/core/network/rpc");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");function openRoot(){return[{content:"return to client root to avoid race condition",trigger:'body',run(){document.querySelector("body").classList.add("wait");window.location='/odoo';},expectUnloadPage:true,},{content:"wait for client reload",trigger:'body:not(.wait)',}];}
function openUserProfileAtSecurityTab(){return[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=settings]',run:'click',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Account Security")',run:'click',}];}
function closeProfileDialog({content,totp_state}){let trigger;switch(totp_state){case true:trigger='button[name=action_totp_disable]';break;case false:trigger='button[name=action_totp_enable_wizard]';break;case undefined:trigger='button.o_auth_2fa_btn';break;default:throw new Error(`Invalid totp state ${totp_state}`)}
return[{content,trigger:'a[role=tab]:contains("Account Security").active',async run(helpers){await waitFor(trigger,{timeout:5000});const modal=document.querySelector(".o_dialog");if(modal){modal.querySelector("button[name=preference_cancel]").click();}}},{trigger:'body:not(:has(.o_dialog))',}];}
registry.category("web_tour.tours").add('totp_tour_setup',{url:'/odoo',steps:()=>[...openUserProfileAtSecurityTab(),{content:"Open totp wizard",trigger:'button[name=action_totp_enable_wizard]',run:"click",},{trigger:".modal div:contains(entering your password)",},{content:"Check that we have to enter enhanced security mode and input password",trigger:'[name=password] input',run:'edit test_user',},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",},{content:"Check the wizard has opened",trigger:'.modal li:contains("When requested to do so")',},{content:"Get secret from collapsed div",trigger:`.modal a:contains("Cannot scan it?")`,async run(helpers){const secret=this.anchor.closest("div").querySelector("[name=secret] span:first-child");const copyBtn=secret.querySelector("button");if(copyBtn){copyBtn.remove();}
const token=await rpc('/totphook',{secret:secret.textContent});await helpers.edit(token,'[name=code] input');}},{trigger:".modal button.btn-primary:contains(Activate)",run:"click",},{trigger:".o_notification_content:contains(2-Factor authentication is now enabled)",},...openRoot(),...openUserProfileAtSecurityTab(),...closeProfileDialog({content:"Check that the button has changed",totp_state:true,}),]});registry.category("web_tour.tours").add('totp_login_enabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"input code",trigger:'input[name=totp_token]',async run(helpers){const token=await rpc('/totphook');helpers.edit(token);}},{trigger:`button:contains("Log in")`,run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",}]});registry.category("web_tour.tours").add('totp_login_device',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"check remember device box",trigger:'label[for=switch-remember]',run:"click",},{content:"input code",trigger:'input[name=totp_token]',async run(helpers){const token=await rpc('/totphook')
helpers.edit(token);}},{trigger:"button:contains(Log in)",run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",run:'click',},{content:"click the Log out button",trigger:'.dropdown-item[data-menu=logout]',run:"click",expectUnloadPage:true,},{content:"check that we're back on the login page or go to it",trigger:'input#login, a:contains(Log in)',run:"edit Test",},{content:"input login again",trigger:'input#login',run:"edit test_user",},{content:'input password again',trigger:'input#password',run:"edit test_user",},{content:"click da button again",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"check we're logged in without 2FA",trigger:".o_user_menu .dropdown-toggle",},...openUserProfileAtSecurityTab(),{content:"Open totp wizard",trigger:'a[role=tab]:contains("Account Security").active',},{trigger:"button[name=action_totp_disable]",run:"click",},{trigger:".modal div:contains(entering your password)",},{content:"Check that we have to enter enhanced security mode and input password",trigger:'.modal [name=password] input',run:"edit test_user",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{trigger:".o_notification_content:contains(Two-factor authentication disabled)",},...openRoot(),...openUserProfileAtSecurityTab(),...closeProfileDialog({content:"Check that the button has changed",totp_state:false}),]});registry.category("web_tour.tours").add('totp_login_disabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},...openUserProfileAtSecurityTab(),...closeProfileDialog({})]});registry.category("web_tour.tours").add('totp_admin_disables',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{content:'Go to settings',trigger:'[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:'Wait for page',trigger:'.o_menu_brand:contains("Settings")',},{content:"Open Users menu",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users view",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:"click",},{content:"Find test_user User",trigger:'tr:has(td.o_data_cell:contains("test_user")) '+'.o_list_record_selector input[type=checkbox]',run:"click",},{content:"Open Actions menu",trigger:'button.dropdown-toggle:contains("Action")',run:"click",},{content:"Select totp remover",trigger:'span.dropdown-item:contains(Disable two-factor authentication)',run:"click",},{trigger:".modal div:contains(entering your password)",},{content:"Check that we have to enter enhanced security mode & input password",trigger:'.modal [name=password] input',run:"edit admin",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{content:"Wait for user to be unchecked (~ action done)",trigger:'tr:has(td.o_data_cell:contains(test_user)) '+'.o_list_record_selector input[type=checkbox]:not(:checked)',},{content:"open the user's form",trigger:"td.o_data_cell:contains(test_user)",run:"click",},{content:"go to Account security Tab",trigger:"a.nav-link:contains(Account Security)",run:"click",},{content:"check 2FA button: should be disabled",trigger:'button[name=action_totp_enable_wizard]:disabled',}]})
return __exports;});;

/* /auth_totp_mail/static/tests/totp_flow.js */
odoo.define('@auth_totp_mail/../tests/totp_flow',['@web/core/registry','@web_tour/tour_service/tour_utils','@odoo/hoot-dom'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_service/tour_utils");const{queryFirst}=require("@odoo/hoot-dom");function openAccountSettingsTab(){return[{content:'Go to settings',trigger:'[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:'Wait for page',trigger:'.o_menu_brand:contains("Settings")',},{content:"Open Users menu",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users view",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:function(helpers){const breadcrumb=document.querySelector('.breadcrumb');if(!breadcrumb||!breadcrumb.textContent.includes("Users")){helpers.click();}else{helpers.click('[data-menu-xmlid="base.menu_users"]');}}}];}
registry.category("web_tour.tours").add('totp_admin_self_invite',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...openAccountSettingsTab(),{content:"open the user's form",trigger:"td.o_data_cell:contains(admin)",run:"click",},{content:"go to Account security Tab",trigger:"a.nav-link:contains(Account Security)",run:"click",},{content:"check that user cannot invite themselves to use 2FA.",trigger:"body",run:function(){const inviteBtn=queryFirst('button:contains(Invite to use 2FA)');if(!inviteBtn){document.body.classList.add('CannotInviteYourself');}}},{content:"check that user cannot invite themself.",trigger:"body.CannotInviteYourself",}]});registry.category("web_tour.tours").add('totp_admin_invite',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...openAccountSettingsTab(),{content:"open the user's form",trigger:"td.o_data_cell:contains(test_user)",run:"click",},{content:"go to Account security Tab",trigger:"a.nav-link:contains(Account Security)",run:"click",},{content:"check that test_user user can be invited to use 2FA.",trigger:"button:contains(Invite to use 2FA)",}]});return __exports;});;

/* /auth_totp_portal/static/tests/totp_portal.js */
odoo.define('@auth_totp_portal/../tests/totp_portal',['@web/core/registry','@web/core/network/rpc'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{rpc}=require("@web/core/network/rpc");registry.category("web_tour.tours").add('totportal_tour_setup',{url:'/my/security',steps:()=>[{content:"Open totp wizard",trigger:'button#auth_totp_portal_enable',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(enter your password)",},{content:"Input password",trigger:'[name=password]',run:"edit portal",},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",},{content:"Check the wizard has opened",trigger:'li:contains("scan the barcode below")',},{content:"Get secret from collapsed div",trigger:'a:contains("Cannot scan it?")',},{trigger:`span[name="secret"]:hidden`,async run(helpers){const secret=this.anchor.textContent;const token=await rpc('/totphook',{secret});await helpers.edit(token,'input[name="code"]');}},{trigger:"button.btn-primary:contains(Activate)",run:"click",expectUnloadPage:true,},{content:"Check that the button has changed",trigger:'button:contains(Disable two-factor authentication)',}]});registry.category("web_tour.tours").add('totportal_login_enabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit portal",},{content:'input password',trigger:'input#password',run:"edit portal",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"input code",trigger:'input[name=totp_token]',run:async function(helpers){const token=await rpc('/totphook');await helpers.edit(token);}},{trigger:"button:contains(Log in)",run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:"h3:contains(My account)",},{content:"go back to security",trigger:"a:contains(Security)",run:"click",expectUnloadPage:true,},{content:"Open totp wizard",trigger:'button#auth_totp_portal_disable',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(enter your password)",},{content:"Input password",trigger:'[name=password]',run:"edit portal",},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",expectUnloadPage:true,},{content:"Check that the button has changed",trigger:'button:contains(Enable two-factor authentication)',}]});registry.category("web_tour.tours").add('totportal_login_disabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit portal",},{content:'input password',trigger:'input#password',run:"edit portal",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:"h3:contains(My account)",}]});return __exports;});;

/* /web/static/tests/legacy/ignore_missing_deps_stop.js */
window.__odooIgnoreMissingDependencies=false;