Advertisement
Guest User

Untitled

a guest
May 17th, 2019
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /* /test_new_api/static/tests/tours/x2many.js defined in bundle 'web.assets_tests' */
  3. odoo.define('web.test.x2many',function(require){'use strict';var tour=require("web_tour.tour");var inc;tour.register('widget_x2many',{url:'/web#action=test_new_api.action_discussions',test:true,},[{content:"wait web client",trigger:'.breadcrumb:contains(Discussions)',},{content:"create new discussion",trigger:'button.o_list_button_add',},{content:"insert content",trigger:'input.o_required_modifier',run:'text test',},{content:"click on moderator one2many drop down",trigger:'tr:contains(Moderator) .o_input_dropdown > input',run:'click',},{content:"click on 'Create and Edit...'",trigger:'.ui-autocomplete .o_m2o_dropdown_option:last',},{content:"insert a name into the modal form",trigger:'input.o_field_widget.o_required_modifier:first',extra_trigger:'.modal:visible',run:function(action_helper){action_helper.text('user_test_'+(inc=new Date().getTime()));}},{content:"insert an email into the modal form",extra_trigger:'input.o_field_widget.o_required_modifier:propValueContains(user_test)',trigger:'input.o_field_widget.o_required_modifier:eq(1)',run:function(action_helper){action_helper.text('user_test_'+inc+'@test');}},{content:"save the modal content and create the new moderator",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'input.o_field_widget.o_required_modifier:propValueContains(@test)',},{content:"check if the modal is saved",trigger:'tr:contains(Moderator) .o_field_many2one input:propValueContains(user_test)',run:function(){},},{content:"check the onchange from the o2m to the m2m",trigger:'.o_content:has(.tab-pane:eq(2) .o_field_widget tbody tr td:contains(user_test))',run:function(){},},{content:"change tab to Participants",trigger:'[data-toggle="tab"]:contains(Participants)'},{content:"click to add participants",trigger:'.o_form_sheet .tab-pane:eq(2).active .o_field_x2many_list_row_add a'},{content:"select Admin",trigger:'tr:has(td:containsExact(Mitchell Admin)) .o_list_record_selector input[type="checkbox"]'},{content:"save selected participants",trigger:'.o_select_button',extra_trigger:'tr:has(td:containsExact(Mitchell Admin)) .o_list_record_selector input[type="checkbox"]:propChecked',},{content:"save discussion",trigger:'button.o_form_button_save',extra_trigger:'.o_form_sheet .tab-pane:eq(2) .o_field_widget tbody tr:has(td:containsExact(Mitchell Admin))',},{content:"edit discussion",trigger:'button.o_form_button_edit',},{content:"Select First Tab",trigger:'a[role=tab]:first',},{content:"create new message a",trigger:'.o_form_sheet .tab-pane:eq(0) .o_field_x2many_list_row_add a'},{content:"insert body a",trigger:'.modal-body textarea:first',run:'text a',},{content:"save new message a",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'.modal-body textarea:first:propValue(a)',},{content:"create new message b",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'.o_web_client:has(textarea[name="message_concat"]:propValue([test] Mitchell Admin:a))',},{content:"insert body b",trigger:'textarea[name="body"]:first',run:'text b',},{content:"save new message b",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(b)',},{content:"insert content",trigger:'input.o_required_modifier',extra_trigger:'textarea[name="message_concat"]:first:propValue([test] Mitchell Admin:a\n[test] Mitchell Admin:b)',run:'text test_trigger',},{content:"blur the content field",trigger:'input.o_required_modifier',run:'text test_trigger',},{content:"check onchange",trigger:'textarea[name="message_concat"]:first:propValue([test_trigger] Mitchell Admin:a\n[test_trigger] Mitchell Admin:b)',run:function(){},},{content:"edit message b",trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(b)',extra_trigger:'body:not(:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2))) .tab-pane:eq(0) .o_field_widget tbody tr td:contains([test_trigger] )',},{content:"change the body",trigger:'textarea[name="body"]:first',run:'text bbb',},{content:"save changes",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(bbb)',},{content:"create new message c",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'textarea[name="message_concat"]:propValue([test_trigger] Mitchell Admin:a\n[test_trigger] Mitchell Admin:bbb)',},{content:"insert body",trigger:'textarea[name="body"]:first',run:'text c',},{content:"save new message c",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(c)',},{content:"change tab to Participants",trigger:'[data-toggle="tab"]:contains(Participants)',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',},{content:"click to add participants",trigger:'.tab-pane:eq(2).active .o_field_x2many_list_row_add a',},{content:"select Demo User",trigger:'tr:has(td:containsExact(Marc Demo)) .o_list_record_selector input[type="checkbox"]',},{content:"save selected participants",trigger:'.o_select_button',extra_trigger:'tr:has(td:containsExact(Marc Demo)) .o_list_record_selector input[type="checkbox"]:propChecked',},{content:"save discussion",trigger:'button.o_form_button_save',extra_trigger:'body:not(:has(.tab-pane:eq(2) .o_field_widget tbody .o_data_row:eq(3))) .tab-pane:eq(2) .o_field_widget tbody .o_data_row:eq(2)',},{content:"check data 1",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2))',extra_trigger:'body:not(:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(3)))',run:function(){},},{content:"check data 2",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tr:has(td:containsExact(bbb)):has(td:containsExact([test_trigger] Mitchell Admin)))',run:function(){},},{content:"check data 3",trigger:'.o_content:has(.tab-pane:eq(2) .o_field_widget tbody .o_data_row:eq(2))',extra_trigger:'body:not(:has(.tab-pane:eq(2) .o_field_widget tbody .o_data_row:eq(3)))',run:function(){},},{content:"edit discussion",trigger:'button.o_form_button_edit',},{content:"change tab to Messages",trigger:'[data-toggle="tab"]:contains(Messages)',extra_trigger:'.o_form_editable',},{content:"create new message d",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'a[data-toggle="tab"].active:contains(Messages)',},{content:"insert body",trigger:'textarea[name="body"]:first',run:'text d',},{content:"save new message d",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(d)',},{content:"create new message e",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(d)',},{content:"insert body",trigger:'textarea[name="body"]:first',run:'text e',},{content:"save new message e",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(e)',},{content:"edit message a",trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(a)',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(e)',},{content:"change the body",trigger:'textarea[name="body"]:first',run:'text aaa',},{content:"save changes",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(aaa)',},{content:"edit message e",trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(e)',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:contains(aaa)',},{content:"open the many2one to select another user",trigger:'.o_input_dropdown > input',run:'text Marc',},{content:"select another user",trigger:'.ui-autocomplete li:contains(Marc Demo)',in_modal:false,},{content:"test one2many's line onchange after many2one",trigger:'.o_field_widget:contains([test_trigger] Marc Demo)',run:function(){},},{content:"test one2many field not triggered onchange",trigger:'textarea[name="message_concat"]:first:propValueContains([test_trigger] Mitchell Admin:e)',in_modal:false,run:function(){},},{content:"save changes",trigger:'.modal-footer button:contains(Save):contains(Close)'},{content:"test one2many triggered the onchange on save for the line",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tbody tr td.o_readonly_modifier:contains([test_trigger] Marc Demo))',run:function(){},},{content:"test one2many triggered the onchange on save",trigger:'textarea[name="message_concat"]:first:propValueContains([test_trigger] Marc Demo:e)',run:function(){},},{content:"remove b",trigger:'.tab-pane:eq(0) .o_field_widget tbody tr:has(td:containsExact(bbb)) .o_list_record_remove',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody tr td:containsExact(aaa)',},{content:"remove e",trigger:'tr:has(td:containsExact(e)) .o_list_record_remove',extra_trigger:'body:not(:has(tr:has(td:containsExact(bbb))))',},{content:"save discussion",trigger:'button.o_form_button_save',extra_trigger:'body:not(:has(tr:has(td:containsExact(e))))',},{content:"check data 4",trigger:'.o_content:not(:has(.tab-pane:eq(0) .o_field_widget tbody tr:has(.o_list_record_remove):eq(4)))',run:function(){},},{content:"check data 5",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tbody:has(tr td:containsExact(aaa)):has(tr td:containsExact(c)):has(tr td:containsExact(d)))',run:function(){},},{content:"check data 6",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tbody tr:has(td:containsExact([test_trigger] Mitchell Admin)):has(td:containsExact(aaa)))',run:function(){},},{content:"check data 7",trigger:'.o_content:has(.tab-pane:eq(2) .o_field_widget tbody .o_data_row:eq(2))',extra_trigger:'.o_content:not(:has(.tab-pane:eq(2) .o_field_widget tbody tr[date-id]:eq(3)))',run:function(){},},{content:"edit discussion",trigger:'button.o_form_button_edit',},{content:"create new message ddd",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody tr:has(td:containsExact(d))',},{content:"select another user",trigger:'.o_field_many2one .o_input_dropdown > input',extra_trigger:'body:has(.modal) .tab-pane:eq(0) .o_field_widget tbody tr:has(td:containsExact(d))',run:'text Marc',},{content:"select demo user",trigger:'.ui-autocomplete li a:contains(Marc Demo)',in_modal:false,},{content:"test one2many's line onchange after many2one",trigger:'.o_field_widget:contains([test_trigger] Marc Demo)',run:function(){},},{content:"insert body",trigger:'textarea[name="body"]:first',run:'text ddd',},{content:"save new message ddd",trigger:'.modal-footer button:contains(Save):first',extra_trigger:'textarea[name="body"]:first:propValue(ddd)',},{content:"blur the one2many",trigger:'input.o_required_modifier',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody:has(tr td:containsExact(ddd))',},{content:"check data 8",trigger:'textarea[name="message_concat"]:propValueContains([test_trigger] Mitchell Admin:aaa\n[test_trigger] Mitchell Admin:c\n[test_trigger] Mitchell Admin:d\n[test_trigger] Marc Demo:ddd)',run:function(){},},{content:"check data 9",trigger:'.o_content:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(3))',extra_trigger:'body:not(:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(4)))',run:function(){},},{content:"cancel change",trigger:'.o_cp_buttons .o_form_button_cancel',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody:has(tr td:containsExact(ddd))',run:'click',},{content:"confirm cancel change",trigger:'.modal-footer button:contains(Ok)',},{content:"switch to the second form view to test one2many with editable list (toggle menu dropdown)",trigger:'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions), li.o_extra_menu_items a i.fa-plus',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',},{content:"switch to the second form view to test one2many with editable list (open submenu)",trigger:'nav .o_menu_sections .dropdown-item:contains(Discussions 2)',},{content:"select previous created record",trigger:'td:contains(test_trigger):last',extra_trigger:'.breadcrumb-item:containsExact(Discussions 2)',},{content:"click on edit",trigger:'.o_cp_buttons .o_form_button_edit',},{content:"edit content",trigger:'input.o_required_modifier',extra_trigger:".o_form_editable",run:'text test_trigger2'},{content:"click outside to trigger onchange",trigger:'.o_form_sheet',},{content:"click on a field of the editable list to edit content",trigger:'.o_list_view .o_data_row:eq(1) td',extra_trigger:'.o_list_view:contains(test_trigger2)',},{content:"change text value",trigger:'textarea[name="body"]:first',run:'text ccc'},{content:"click on other field (trigger the line onchange)",trigger:'.o_list_view .o_field_many2one[name="author"] input',run:'click'},{content:"test one2many's line onchange",trigger:'.o_list_view .o_selected_row td:nth(3):contains(3)',run:function(){},},{content:"open the many2one to select an other user",trigger:'.o_list_view .o_field_many2one[name="author"] .o_input_dropdown > input',run:'text Marc',},{content:"select an other user",trigger:'.ui-autocomplete li a:contains(Marc Demo)',},{content:"test one2many's line onchange after many2one",trigger:'.o_list_view td:contains([test_trigger2] Marc Demo)',run:function(){},},{content:"change text value",trigger:'textarea[name="body"]:first',run:'text ccccc',},{content:"click outside to trigger one2many onchange",trigger:'input.o_required_modifier',run:'click'},{content:"test one2many onchange",trigger:'textarea[name="message_concat"]:first:propValueContains([test_trigger2] Marc Demo:ccccc)',run:function(){},},{content:"click outside to trigger one2many onchange",trigger:'.o_field_many2manytags .o_input_dropdown > input',},{content:"add a tag",trigger:'.ui-autocomplete a:first',},{content:"delete the last item in the editable list",trigger:'.o_list_view .o_data_row td.o_list_record_remove button:visible:last',},{content:"test one2many onchange after delete",trigger:'.o_content:not(:has(textarea[name="message_concat"]:propValueContains(Mitchell Admin:d)))',run:function(){},},{content:"save discussion",trigger:'button.o_form_button_save',extra_trigger:'body:not(:has(tr:has(td:containsExact(d))))',},{content:"check data 10",trigger:'.o_field_text:containsExact([test_trigger2] Mitchell Admin:aaa\n[test_trigger2] Marc Demo:ccccc)',run:function(){},},{content:"check data 11",trigger:'.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(1)',extra_trigger:'body:not(:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)))',run:function(){},},{content:"edit discussion",trigger:'button.o_form_button_edit'},{content:"create new message eee",trigger:'.tab-pane:eq(0) .o_field_x2many_list_row_add a',extra_trigger:'a[data-toggle="tab"].active:contains(Messages)',},{content:"change text value",trigger:'textarea[name="body"]:first',run:'text eee'},{content:"save discussion",trigger:'button.o_form_button_save',extra_trigger:'textarea[name="body"]:first:propValueContains(eee)',},{content:"check data 12",trigger:'.o_field_text[name="message_concat"]:containsExact([test_trigger2] Mitchell Admin:aaa\n[test_trigger2] Marc Demo:ccccc\n[test_trigger2] Mitchell Admin:eee)',run:function(){},},{content:"check data 13",trigger:'.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',extra_trigger:'body:not(:has(.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(3)))',run:function(){},},{content:"switch to the third form view to test onchange changing one2many (toggle menu dropdown)",trigger:'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions), li.o_extra_menu_items a i.fa-plus',extra_trigger:'.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',},{content:"switch to the thied form view to test onchange changing one2many (open submenu)",trigger:'nav .o_menu_sections .dropdown-item:contains(Discussions 3)',},{content:"wait web client",trigger:'.breadcrumb:contains(Discussions 3)',},{content:"create new discussion",trigger:'button.o_list_button_add',},{content:"set discussion title to generate dummy message",trigger:'input.o_required_modifier',run:'text {generate_dummy_message}',},{content:"check new dummy message happened",trigger:'.o_field_widget[name=messages] .o_data_row .o_list_number:containsExact(13)',extra_trigger:'.o_field_widget[name=important_messages] .o_data_row .o_list_number:containsExact(13)',run:function(){},},{content:"check field not in embedded view received correctly",trigger:'.o_field_widget[name=messages] .o_data_row input[type="checkbox"]:propChecked',run:function(){},},{content:"empty discussion title",trigger:'input.o_required_modifier',run:'text removed_title',},{content:"onchange happened",trigger:'.o_field_widget[name=messages] .o_data_row td:contains([removed_title])',run:function(){},},{content:"set discussion title to generate dummy message",trigger:'input.o_required_modifier',run:'text {generate_dummy_message}',},{content:"chuck update and new dummy message happened",trigger:'.o_field_widget[name=messages] .o_data_row .o_list_number:containsExact(22)',extra_trigger:'.o_field_widget[name=important_messages] .o_data_row .o_list_number:containsExact(22)',run:function(){},},{content:"cancel change",trigger:'.o_cp_buttons .o_form_button_cancel',run:'click',},{content:"confirm cancel change",trigger:'.modal-footer button:contains(Ok)',}]);});;
  4.  
  5. /* /portal/static/tests/tours/portal.js defined in bundle 'web.assets_tests' */
  6. odoo.define('portal.tour',function(require){'use strict';var tour=require("web_tour.tour");tour.register('portal_load_homepage',{test:true,url:'/my',},[{content:"Check portal is loaded",trigger:'a[href*="/my/account"]:contains("Edit"):first',},{content:"Load my account details",trigger:'input[value="Joel Willis"]'}]);});;
  7.  
  8. /* /approvals/static/tests/tours/approvals.js defined in bundle 'web.assets_tests' */
  9. odoo.define('approvals_tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('approvals_tour',{test:true,url:"/web",},[{trigger:'.o_app[data-menu-xmlid="approvals.approvals_menu_root"]',content:'open approvals app',run:'click',},{trigger:'.oe_kanban_action_button:first',content:'create new request',run:'click',},{trigger:'input[name="name"]',content:'give name',run:'text Business Trip To Berlin',},{trigger:'input[name="date_start"]',content:'give start date',run:'text 12/13/2018 13:00:00',},{trigger:'input[name="date_end"]',content:'give end date',run:'text 12/20/2018 13:00:00',},{trigger:'input[name="location"]',content:'give location',run:'text Berlin, Schulz Hotel',},{trigger:'textarea[name="reason"]',content:'give description',run:'text We need to go, because reason (and also for beer))',},{trigger:".o_field_x2many_list_row_add > a",content:'add an approver',run:'click',},{content:"select an approver",trigger:'.o_selected_row .o_input_dropdown',run:function(actions){actions.text("Marc",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains(Marc)",auto:true,},{trigger:'.o_form_button_save',content:'save the request',run:'click',},{trigger:'.o_form_button_edit',content:'wait the save',run:function(){},},{trigger:'button[name="action_confirm"]',content:'confirm the request',run:'click',},{trigger:'.o_activity_action_approve',content:'approve the request via activity',run:'click',},{trigger:'button[name="action_withdraw"]',content:'withdraw approver',run:'click',},{trigger:'button[name="action_refuse"]',content:'refuse request',run:'click',},{trigger:'button[title="Current state"][data-value="refused"]',content:'wait the request status compute',run:function(){},},{trigger:'button[name="action_cancel"]',content:'cancel request',run:'click',},{trigger:'button[name="action_draft"]',content:'back the request to draft',run:'click',},{trigger:'button[name="action_confirm"]',content:'confirm the request again',run:'click',},{trigger:'button[name="action_approve"]',content:'approve request',run:'click',},]);});;
  10.  
  11. /* /sign/static/tests/tours/sign_widgets_tour.js defined in bundle 'web.assets_tests' */
  12. odoo.define('sign_widgets_tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('sign_widgets_tour',{test:true,url:"/web",},[tour.STEPS.SHOW_APPS_MENU_ITEM,{content:"Settings",trigger:'a[data-menu-xmlid="base.menu_administration"]',run:'click',},{content:"Users",trigger:'div.o_web_settings_dashboard_invitations i.o_web_settings_dashboard_access_rights',run:'click',},{content:"Mitchel",trigger:'table.o_list_view td.o_data_cell:contains(Admin)',run:'click',},{content:"Preference tab",trigger:'a.nav-link:contains("'+_t("Preferences")+'")',run:'click',},{content:"Check widget sign is present",trigger:'.o_signature',},{content:"Edit Mitchell",trigger:'div.o_cp_buttons .o_form_button_edit',run:'click',},{content:"Click on widget sign",trigger:'.o_signature:first',run:'click',},{content:"Click on auto button",trigger:'.o_web_sign_auto_button',run:'click',},{content:"Click on style button",trigger:'div.o_web_sign_auto_select_style > a',run:'click',},{content:"Select a style",trigger:'div.o_web_sign_auto_font_list > a:nth-child(3)',run:'click',},{content:"Click on style button",trigger:'div.o_web_sign_auto_select_style > a',run:'click',},{content:"Select a style",trigger:'div.o_web_sign_auto_font_list > a:nth-child(2)',run:'click',},{content:"Sign",trigger:'button.btn-primary',run:'click',},{content:"Save Mitchell",trigger:'button.o_form_button_save',run:'click',},]);});;
  13.  
  14. /* /stock/static/tests/tours/route.js defined in bundle 'web.assets_tests' */
  15. odoo.define('stock.tour',function(require){'use strict';var tour=require('web_tour.tour');tour.register('stock',{test:true,url:'/web?debug=assets#action=stock.action_stock_config_settings',},[{content:"wait web client",trigger:".o_base_settings",run:function(){}},{content:"active 'Multi-Step Routes'",trigger:'.o_field_boolean[name="group_stock_adv_location"]',run:function(){if(!this.$anchor.find('input').prop('checked')){this.$anchor.find('label').click();$('.o_statusbar_buttons button[name="execute"]').click();}}},{content:"list of product variants",trigger:'.o_menu_sections [data-menu-xmlid="stock.menu_product_variant_config_stock"]',extra_trigger:'.o_menu_sections:has(a[data-menu-xmlid="stock.menu_routes_config"])',timeout:5000,},{content:"select a product variant",trigger:'.oe_kanban_global_click:first',},{content:"click on routes",trigger:'button.oe_stat_button i.fa-cogs',},{content:"print the report",trigger:'button[name="print_report"]',},{content:"print inside the report and check the breadcrum",trigger:'.o_content iframe .o_report_stock_rule_rule_name',extra_trigger:'ol.breadcrumb li:eq(2).active',},{content:"print the report",trigger:'ol.breadcrumb li:eq(3).active',},]);});;
  16.  
  17. /* /survey/static/tests/tours/certification_failure.js defined in bundle 'web.assets_tests' */
  18. odoo.define('survey.tour_test_certification_failure',function(require){'use strict';var tour=require('web_tour.tour');var failSteps=[{content:"Clicking on Start Certification",trigger:'a.btn.btn-primary.btn-lg:contains("Start Certification")',},{content:"Selecting answer 'No'",trigger:'div.js_question-wrapper:contains("Do we sell Acoustic Bloc Screens") select',run:'text No',},{content:"Ticking answer 'Fanta'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Fanta") input'},{content:"Ticking answer 'Drawer'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Drawer") input'},{content:"Ticking answer 'Conference chair'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Conference chair") input'},{content:"Ticking answer 'Color'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Color") input'},{content:"Ticking answer 'Height'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Height") input'},{content:"Selecting answer '2'",trigger:'div.js_question-wrapper:contains("How many versions of the Corner Desk do we have") select',run:'text 2',},{content:"Missing products",trigger:'div.js_question-wrapper:contains("Do you think we have missing products in our catalog") textarea',run:"text I don't know products enough to be able to answer that",},{content:"Selecting answer '80$'",trigger:'div.js_question-wrapper:contains("How much do we sell our Cable Management Box") select',run:function(){var $select=$('div.js_question-wrapper:contains("How much do we sell our Cable Management Box") select');$select.val($('option:contains("80$")').val());}},{content:"Ticking answer 'Corner Desk Right Sit'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Corner Desk Right Sit") input'},{content:"Ticking answer 'Desk Combination'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Desk Combination") input'},{content:"Ticking answer 'Office Chair Black'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Office Chair Black") input'},{trigger:'div.js_question-wrapper:contains("What do you think about our prices") select',run:function(){var $select=$('div.js_question-wrapper:contains("What do you think about our prices") select');$select.val($('option:contains("Correctly priced")').val());}},{content:"Finish Survey",trigger:'button[value="finish"]',}];var retrySteps=[{trigger:'a:contains("Retry")'}];var lastSteps=[{trigger:'h1:contains("Thank you!")',run:function(){if($('a:contains("Retry")').length===0){$('h1:contains("Thank you!")').addClass('tour_success');}}},{trigger:'h1.tour_success',}];tour.register('test_certification_failure',{test:true,url:'/survey/start/4ead4bc8-b8f2-4760-a682-1fde8ddb95ac'},[].concat(failSteps,retrySteps,failSteps,lastSteps));});;
  19.  
  20. /* /survey/static/tests/tours/certification_success.js defined in bundle 'web.assets_tests' */
  21. odoo.define('survey.tour_test_certification_success',function(require){'use strict';var tour=require('web_tour.tour');tour.register('test_certification_success',{test:true,url:'/survey/start/4ead4bc8-b8f2-4760-a682-1fde8ddb95ac'},[{content:"Clicking on Start Certification",trigger:'a.btn.btn-primary.btn-lg:contains("Start Certification")',},{content:"Selecting answer 'Yes'",trigger:'div.js_question-wrapper:contains("Do we sell Acoustic Bloc Screens") select',run:'text Yes',},{content:"Ticking answer 'Chair floor protection'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Chair floor protection") input'},{content:"Ticking answer 'Drawer'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Drawer") input'},{content:"Ticking answer 'Conference chair'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Conference chair") input'},{content:"Ticking answer 'Color'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Color") input'},{content:"Ticking answer 'Legs'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Legs") input'},{content:"Selecting answer '2'",trigger:'div.js_question-wrapper:contains("How many versions of the Corner Desk do we have") select',run:'text 2',},{content:"Missing products",trigger:'div.js_question-wrapper:contains("Do you think we have missing products in our catalog") textarea',run:"text I think we should make more versions of the customizable desk, it's such an amazing product!",},{content:"Selecting answer '80$' (wrong one)",trigger:'div.js_question-wrapper:contains("How much do we sell our Cable Management Box") select',run:function(){var $select=$('div.js_question-wrapper:contains("How much do we sell our Cable Management Box") select');$select.val($('option:contains("80$")').val());}},{content:"Ticking answer 'Corner Desk Right Sit'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Corner Desk Right Sit") input'},{content:"Ticking answer 'Desk Combination'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Desk Combination") input'},{content:"Ticking answer 'Large Desk'",trigger:'div.js_question-wrapper:contains("Select all the the products that sell for 100$ or more") label:contains("Large Desk") input'},{content:"Selecting answer 'Underpriced'",trigger:'div.js_question-wrapper:contains("What do you think about our prices") select',run:function(){var $select=$('div.js_question-wrapper:contains("What do you think about our prices") select');$select.val($('option:contains("Underpriced")').val());}},{content:"Finish Survey",trigger:'button[value="finish"]',},{content:"Thank you",trigger:'h1:contains("Thank you!")',},{content:"test passed",trigger:'div:contains("Congratulations, you have passed the test!")',}]);});;
  22.  
  23. /* /survey/static/tests/tours/survey.js defined in bundle 'web.assets_tests' */
  24. odoo.define('survey.tour_test_survey',function(require){'use strict';var tour=require('web_tour.tour');tour.register('test_survey',{test:true,url:'/survey/start/b137640d-14d4-4748-9ef6-344ca256531e',},[{content:'Click on Start',trigger:'a.btn:contains("Start")',},{content:'Answer Where do you live',trigger:'div.js_question-wrapper:contains("Where do you live") input',run:'text Mordor-les-bains',},{content:'Answer Where do you live',trigger:'div.js_question-wrapper:contains("When is your date of birth") input',run:'text 05/05/1980',},{content:'Answer How frequently do you buy products online',trigger:'div.js_question-wrapper:contains("How frequently do you buy products online") select',run:function(){var $select=$('div.js_question-wrapper:contains("How frequently do you buy products online") select');$select.val($('option:contains("Once a month")').val());}},{content:'Answer How many times did you order products on our website',trigger:'div.js_question-wrapper:contains("How many times did you order products on our website") input',run:'text 12',},{content:'Click on Next Page',trigger:'button[value="next"]',},{content:'Answer Which of the following words would you use to describe our products (High Quality)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality") input',},{content:'Answer Which of the following words would you use to describe our products (Good value for money)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money") input',},{content:'Answer What do your think about our new eCommerce (The new layout and design is fresh and up-to-date)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") input:first',},{content:'Answer What do your think about our new eCommerce (It is easy to find the product that I want)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") input:eq(2)',},{content:'Answer What do your think about our new eCommerce (The tool to compare the products is useful to make a choice)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") input:eq(3)',},{content:'Answer What do your think about our new eCommerce (The checkout process is clear and secure)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") input:eq(2)',},{content:'Answer What do your think about our new eCommerce (I have added products to my wishlist)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") input:last',},{content:'Answer Do you have any other comments, questions, or concerns',trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea',run:'text This is great. Really.',},{content:'Click Submit',trigger:'button[value="finish"]',},{content:'Thank you',trigger:'h1:contains("Thank you!")',}]);});;
  25.  
  26. /* /survey/static/tests/tours/survey_prefill.js defined in bundle 'web.assets_tests' */
  27. odoo.define('survey.tour_test_survey_prefill',function(require){'use strict';var tour=require('web_tour.tour');tour.register('test_survey_prefill',{test:true,url:'/survey/start/b137640d-14d4-4748-9ef6-344ca256531e'},[{trigger:'a.btn.btn-primary.btn-lg:contains("Start Survey")',},{trigger:'div.js_question-wrapper:contains("Where do you live ?") input',run:'text Grand-Rosiere',},{trigger:'div.js_question-wrapper:contains("When is your date of birth ?") input',run:'text 05/05/1980',},{trigger:'div.js_question-wrapper:contains("How frequently do you buy products online ?") select',run:'text 2',},{trigger:'div.js_question-wrapper:contains("How many times did you order products on our website ?") input',run:'text 42',},{content:'Click on Next Page',trigger:'button[value="next"]',},{content:'Answer Which of the following words would you use to describe our products (High Quality)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality") input',},{content:'Answer Which of the following words would you use to describe our products (Good value for money)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money") input',},{content:'Answer What do your think about our new eCommerce (The new layout and design is fresh and up-to-date)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") input:first',},{content:'Answer What do your think about our new eCommerce (It is easy to find the product that I want)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") input:eq(2)',},{content:'Answer What do your think about our new eCommerce (The tool to compare the products is useful to make a choice)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") input:eq(3)',},{content:'Answer What do your think about our new eCommerce (The checkout process is clear and secure)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") input:eq(2)',},{content:'Answer What do your think about our new eCommerce (I have added products to my wishlist)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") input:last',},{content:'Answer Do you have any other comments, questions, or concerns',trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea',run:'text Is the prefill working?',},{content:'Click on Previous Page',trigger:'button[value="previous"]',},{trigger:'div.js_question-wrapper:contains("How many times did you order products on our website ?") input',run:function(){var maxAttempts=0;var checkPrefillLoaded=setInterval(function(){if($('div.js_question-wrapper:contains("How many times did you order products on our website ?") input').val()==='42.0'){$('.o_survey_title').addClass('prefilled');clearInterval(checkPrefillLoaded);}else if(maxAttempts>=50){clearInterval(checkPrefillLoaded);}
  28. maxAttempts++;},100);}},{trigger:'.o_survey_title.prefilled',run:function(){var $inputQ1=$('div.js_question-wrapper:contains("Where do you live ?") input');if($inputQ1.val()!=='Grand-Rosiere'){return;}
  29. var $inputQ2=$('div.js_question-wrapper:contains("When is your date of birth ?") input');if($inputQ2.val()!=='05/05/1980'){return;}
  30. var $selectQ3=$('div.js_question-wrapper:contains("How frequently do you buy products online ?") select');if($selectQ3.val()!==$('option:contains("Once a week")').val()){return;}
  31. var $inputQ4=$('div.js_question-wrapper:contains("How many times did you order products on our website ?") input');if($inputQ4.val()!=='42.0'){return;}
  32. $('.o_survey_title').addClass('tour_success');}},{trigger:'.o_survey_title.tour_success'},{content:'Click on Next Page',trigger:'button[value="next"]',},{trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea',run:function(){var maxAttempts=0;var checkPrefillLoaded=setInterval(function(){if($('div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea').val()==="Is the prefill working?"){$('.o_survey_title').addClass('prefilled2');clearInterval(checkPrefillLoaded);}else if(maxAttempts>=50){clearInterval(checkPrefillLoaded);}
  33. maxAttempts++;},100);}},{trigger:'.o_survey_title.prefilled2',run:function(){var $input1Q1=$('div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality") input');if(!$input1Q1.is(':checked')){return;}
  34. var $input2Q1=$('div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money") input');if(!$input2Q1.is(':checked')){return;}
  35. var $input1Q2=$('div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") input:first');if(!$input1Q2.is(':checked')){return;}
  36. var $input2Q2=$('div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") input:eq(2)');if(!$input2Q2.is(':checked')){return;}
  37. var $input3Q2=$('div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") input:eq(3)');if(!$input3Q2.is(':checked')){return;}
  38. var $input4Q2=$('div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") input:eq(2)');if(!$input4Q2.is(':checked')){return;}
  39. var $input5Q2=$('div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") input:last');if(!$input5Q2.is(':checked')){return;}
  40. var $inputQ3=$('div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea');if($inputQ3.val()!=="Is the prefill working?"){return;}
  41. $('.o_survey_title').addClass('tour_success_2');}},{trigger:'.o_survey_title.tour_success_2'}]);});;
  42.  
  43. /* /web_studio/static/tests/tours/web_studio.js defined in bundle 'web.assets_tests' */
  44. odoo.define('web_studio.tests.tour',function(require){"use strict";var tour=require('web_tour.tour');var utils=require('web_studio.utils');tour.register('web_studio_tests_tour',{test:true,url:"/web?studio=app_creator&debug=tests",},[{trigger:'.o_web_studio_new_app',},{trigger:'.o_web_studio_app_creator_next',},{trigger:'.o_web_studio_app_creator_name > input',run:'text '+utils.randomString(6),},{trigger:'.o_web_studio_selectors .o_web_studio_selector:eq(2)',},{trigger:'.o_web_studio_app_creator_next.is_ready',},{trigger:'.o_web_studio_app_creator_menu > input',run:'text '+utils.randomString(6),},{trigger:'.o_web_studio_app_creator_next.is_ready',},{trigger:'.o_menu_toggle.fa-th',},{trigger:'.o_app[data-menu-xmlid*="studio"]:last',run:function(){this.$anchor.find('.o_web_studio_edit_icon').css('visibility','visible');},},{trigger:'.o_app[data-menu-xmlid*="studio"]:last .o_web_studio_edit_icon',},{trigger:'.o_web_studio_selector[data-type="background_color"]',},{trigger:'.o_web_studio_palette > .o_web_studio_selector:first',},{trigger:'.modal-footer .btn.btn-primary',},{trigger:'.o_app[data-menu-xmlid*="studio"]:last',},{trigger:'.o_main_navbar .o_web_edit_menu',},{trigger:'.o_web_studio_edit_menu_modal .js_add_menu',},{trigger:'input[name="name"]',run:'text '+utils.randomString(6),},{trigger:'.o_field_many2one[name="model"] input',run:'text a',},{trigger:'.ui-autocomplete > .ui-menu-item:first > a',in_modal:false,},{trigger:'button:contains(Confirm):not(".disabled")',},{trigger:'button:contains(Confirm):not(".disabled")',},{extra_trigger:'.o_web_studio_menu',trigger:'.o_web_studio_views_icons > a[data-name="form"]',},{extra_trigger:'.o_web_studio_form_view_editor',trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_char',run:'drag_and_drop .o_web_studio_form_view_editor .o_inner_group',},{trigger:'.o_web_studio_form_view_editor td.o_td_label:first',},{trigger:'.o_web_studio_sidebar_content.o_display_field input[name="string"]',run:'text My Coucou Field',},{trigger:'input[data-type="field_name"][value="my_coucou_field"]',run:'text coucou',},{trigger:'.o_web_studio_sidebar .o_web_studio_new',},{trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_char',run:'drag_and_drop .o_web_studio_form_view_editor .o_inner_group',},{trigger:'.o_web_studio_form_view_editor td.o_td_label:eq(1)',},{trigger:'input[data-type="field_name"]',run:'text coucou',},{trigger:'.modal-footer > button:first',},{trigger:'.o_web_studio_sidebar_content.o_display_field input[name="string"]',run:'text COUCOU',},{extra_trigger:'input[data-type="field_name"][value="coucou_1"]',trigger:'.o_web_studio_sidebar .o_web_studio_new',},{trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_monetary',run:'drag_and_drop .o_web_studio_form_view_editor .o_inner_group',},{trigger:'.modal-footer .btn.btn-primary',},{extra_trigger:'.o_web_studio_form_view_editor td.o_td_label:contains("Currency")',trigger:'.o_web_studio_sidebar .o_web_studio_new',},{trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_monetary',run:'drag_and_drop .o_web_studio_form_view_editor .o_inner_group',},{extra_trigger:'.o_web_studio_form_view_editor td.o_td_label:eq(1):contains("New Monetary")',trigger:'.o_web_studio_form_view_editor .o_inner_group:first .ui-draggable:eq(1)',run:'drag_and_drop .o_inner_group:first .o_web_studio_hook:first',},{extra_trigger:'.o_web_studio_form_view_editor td.o_td_label:eq(0):contains("New Monetary")',trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_many2many',run:'drag_and_drop .o_inner_group:first .o_web_studio_hook:first',},{trigger:'.o_field_many2one[name="model"] input',run:'text a',},{trigger:'.ui-autocomplete > .ui-menu-item:first > a',in_modal:false,},{trigger:'button:contains(Confirm)',},{trigger:'tr:has(.o_field_many2many)',},{trigger:'.o_web_studio_sidebar select[name="widget"]',run:function(){this.$anchor.val('many2many_tags').trigger('change');},},{trigger:'.o_web_studio_sidebar label[for="option_color_field"]',},{trigger:'.o_web_studio_statusbar_hook',},{trigger:'.modal-footer .btn.btn-primary',},{trigger:'.o_statusbar_status',},{trigger:'.o_web_studio_sidebar select[name="default_value"]:contains(First Status)',},{trigger:'.o_web_studio_views_icons a[data-name=form]',},{extra_trigger:'.o_web_studio_add_chatter',trigger:'.o_web_studio_menu .o_menu_sections a[data-name="views"]',},{trigger:'.o_web_studio_view_category .o_web_studio_view_type[data-type="form"] .o_web_studio_thumbnail',},{extra_trigger:'.o_web_studio_add_chatter',trigger:'.o_web_studio_menu .o_web_studio_views_icons a[data-name="list"]',},{extra_trigger:'.o_web_studio_list_view_editor',trigger:'.o_web_studio_sidebar .o_web_studio_field_type_container:eq(1) .o_web_studio_field_char',run:'drag_and_drop .o_web_studio_list_view_editor th.o_web_studio_hook:first',},{extra_trigger:'.o_web_studio_list_view_editor th:contains("COUCOU")',trigger:'.o_web_studio_leave',},{trigger:'.o_web_studio_navbar_item',},{trigger:'.o_web_studio_menu .o_menu_sections a[data-name="views"]',},{trigger:'.o_web_studio_view_category .o_web_studio_view_type.o_web_studio_inactive[data-type="kanban"] .o_web_studio_thumbnail',},{trigger:'.o_dropdown_kanban.o_web_studio_add_dropdown',},{trigger:'.modal-footer .btn.btn-primary',},{trigger:'.o_dropdown_kanban:not(.o_web_studio_add_dropdown)',},{trigger:'.o_web_studio_sidebar input[name=set_cover]',},{trigger:'.modal-footer .btn.btn-primary',},{trigger:'.o_web_studio_menu .o_menu_sections a[data-name="views"]',},{extra_trigger:'.o_web_studio_view_category .o_web_studio_view_type:not(.o_web_studio_inactive)[data-type="kanban"]',trigger:'.o_web_studio_view_category .o_web_studio_view_type.o_web_studio_inactive[data-type="activity"] .o_web_studio_thumbnail',},{extra_trigger:'.o_activity_view',trigger:'.o_web_studio_menu .o_menu_sections a[data-name="views"]',},{trigger:'.o_web_studio_view_category .o_web_studio_view_type.o_web_studio_inactive[data-type="graph"] .o_web_studio_thumbnail',},{extra_trigger:'.o_graph_renderer',trigger:'.o_web_studio_menu .o_menu_sections a[data-name="views"]',},{extra_trigger:'.o_web_studio_views',trigger:'.o_web_studio_view_category .o_web_studio_view_type[data-type="search"] .o_web_studio_thumbnail',},{extra_trigger:'.o_web_studio_search_view_editor',trigger:'.o_menu_toggle.fa-th',},{trigger:'.o_web_studio_home_studio_menu .dropdown-toggle',},{trigger:'.o_web_studio_export',}]);tour.register('web_studio_new_report_tour',{url:"/web",test:true,},[{trigger:'.o_main_navbar .o_web_studio_navbar_item',},{trigger:'.o_app[data-menu-xmlid*="studio"]:first',extra_trigger:'body.o_in_studio',},{trigger:'.o_web_studio_menu a[data-name="reports"]',},{trigger:'.o_control_panel .o-kanban-button-new',},{trigger:'.o_web_studio_report_layout_dialog div[data-layout="web.external_layout"]',},{extra_trigger:'.o_web_studio_report_editor_manager .o_web_studio_sidebar_header div.active[name="new"]',trigger:'.o_web_studio_report_editor_manager .o_web_studio_sidebar_header div[name="report"]',},{trigger:'.o_web_studio_sidebar input[name="name"]',run:'text My Awesome Report',},{extra_trigger:'.o_web_studio_sidebar input[name="name"][value="My Awesome Report"]',trigger:'.o_web_studio_sidebar div[name="new"]',},{extra_trigger:'.o_web_studio_report_editor iframe #wrapwrap',trigger:'.o_web_studio_sidebar .o_web_studio_component:contains(Title Block)',run:'drag_and_drop .o_web_studio_report_editor iframe .article > .page',auto:true,},{trigger:'.o_web_studio_report_editor iframe .h2 > span:contains(New Title)',},{trigger:'.o_web_studio_sidebar .o_web_studio_text .note-editable',run:function(){this.$anchor.mousedown();this.$anchor[0].firstChild.textContent='Test';this.$anchor.trigger($.Event("keydown",{keyCode:116,key:'t'}));}},{trigger:'.o_web_studio_report_editor',extra_trigger:'.o_web_studio_sidebar .o_web_studio_text .note-editable:contains(Test)',},{extra_trigger:'.o_web_studio_report_editor iframe .h2:contains(Test)',trigger:'.o_web_studio_sidebar .o_field_many2manytags[name="groups"] input',run:function(){this.$anchor.click();},},{trigger:'.ui-autocomplete:visible li:contains(Access Rights)',},{extra_trigger:'.o_web_studio_sidebar .o_field_many2manytags[name="groups"] .o_badge_text:contains(Access Rights)',trigger:'.o_web_studio_sidebar div[name="new"]',},{trigger:'.o_web_studio_sidebar .o_web_studio_component:contains(Data table)',run:'drag_and_drop .o_web_studio_report_editor iframe .article > .page',},{trigger:'div.o_field_selector_value',run:function(){$('div.o_field_selector_value').focusin();}},{trigger:'.o_field_selector_popover:not(.hidden) .o_field_selector_popover_body > ul > li:first()'},{trigger:'.o_field_selector_popover_body > ul > li:contains(Followers)'},{trigger:'.modal-content button>span:contains(Confirm)',extra_trigger:'.o_field_selector_chain_part:contains(Followers)',},{trigger:'.o_web_studio_report_editor iframe span[t-field="table_line.display_name"]'},{trigger:'.o_web_studio_sidebar .card:last() div.o_field_selector_value',run:function(){$('.o_web_studio_sidebar .card:last() div.o_field_selector_value').focusin();}},{trigger:'ul.o_field_selector_page li:contains(ID)'},{trigger:'.o_web_studio_report_editor iframe table thead span:contains(Name) ',},{trigger:'.o_web_studio_sidebar .o_web_studio_text .note-editable',run:function(){this.$anchor.mousedown();this.$anchor[0].firstChild.textContent='new column title';this.$anchor.trigger($.Event("keydown",{keyCode:101,key:'e'}));}},{trigger:'.o_web_studio_report_editor',extra_trigger:'.o_web_studio_sidebar .o_web_studio_text .note-editable:contains(new column title)',},{extra_trigger:'.o_web_studio_report_editor iframe table thead span:contains(new column title) ',trigger:'.o_web_studio_breadcrumb .o_back_button:contains(Reports)',},{run:function(){$('.o_kanban_record:contains(My Awesome Report) .o_dropdown_kanban').css('visibility','visible');},trigger:'.o_kanban_view',},{trigger:'.o_kanban_record:contains(My Awesome Report) .dropdown-toggle',},{trigger:'.o_kanban_record:contains(My Awesome Report) .dropdown-menu a:contains(Duplicate)',},{trigger:'.o_kanban_record:contains(My Awesome Report copy(1))',},{trigger:'.o_web_studio_report_editor_manager .o_web_studio_sidebar_header div[name="report"]',},{extra_trigger:'.o_web_studio_sidebar input[name="name"][value="My Awesome Report copy(1)"]',trigger:'.o_web_studio_leave',}]);});;
  45.  
  46. /* /website/static/tests/tours/reset_password.js defined in bundle 'web.assets_tests' */
  47. odoo.define('website.tour_reset_password',function(require){'use strict';var localStorage=require('web.local_storage');var rpc=require('web.rpc');var tour=require('web_tour.tour');require('web.dom_ready');var currentDomain=window.location.protocol+'//'+window.location.hostname;var emailsUrl='/web#action=mail.action_view_mail_mail&view_type=list';var usersUrl='/web#action=base.action_res_users&view_type=list';var resetLinkKey='website.tour_reset_password.resetLink';tour.register('website_reset_password',{test:true,url:'/web',},[{content:"Change the domain of the websites and go to users page",trigger:'.oe_topbar_name:contains("Admin")',run:function(){var def1=rpc.query({'model':'website','method':'write','args':[[1],{'domain':"my-test-domain.com",}],});var def2=rpc.query({'model':'website','method':'write','args':[[2],{'domain':"https://domain-not-used.fr",}],});var def3=rpc.query({model:'res.partner',method:'name_search',kwargs:{'name':'Mitchell Admin'},}).then(function(res){return rpc.query({'model':'res.partner','method':'write','args':[[res[0][0]],{'website_id':1,}],});});return Promise.all([def1,def2,def3]).then(function(){window.location.href=usersUrl;});},},{content:"click on Admin",trigger:'.o_data_cell:contains("Admin")',},{content:"click on reset password",trigger:'.btn[name="action_reset_password"]',},{content:"wait mail to be sent, and go see it",trigger:'a[name="signup_url"][href^="http://my-test-domain.com"]',run:function(){window.location.href=emailsUrl;},},{content:"click on the first email",trigger:'.o_data_cell:contains("Password reset"):eq(0)',},{content:"check email has the button",trigger:'div.oe_form_field_html[name="body_html"] a:contains("Change password")',run:function(){},},{content:"check the URL is correct too",trigger:'div.oe_form_field_html[name="body_html"] a:contains("Change password")[href^="http://my-test-domain.com"]',run:function(){return rpc.query({'model':'website','method':'write','args':[[1,2],{'domain':"",}],}).then(function(){window.location.href=usersUrl;});},},{content:"click on Admin",trigger:'.o_data_cell:contains("Admin")',},{content:"click on reset password",trigger:'.btn[name="action_reset_password"]',},{content:"wait mail to be sent, and go see it",trigger:'a[name="signup_url"][href^="'+currentDomain+'"]',run:function(){window.location.href=emailsUrl;},},{content:"click on the first email",trigger:'.o_data_cell:contains("Password reset"):eq(0)',},{content:"check the link has the current host, save the link, logout",trigger:'div.oe_form_field_html[name="body_html"] a:contains("Change password")[href^="'+currentDomain+'"]',run:function(){var link=$('div.oe_form_field_html[name="body_html"] a:contains("Change password")').attr('href');localStorage.setItem(resetLinkKey,link);window.location.href="/web/session/logout?redirect=/";},},{content:"go to the reset link",trigger:'a[href="/web/login"]',run:function(){window.location.href=localStorage.getItem(resetLinkKey);},},{content:"fill new password and submit",trigger:'.oe_reset_password_form',run:function(){var $form=$('.oe_reset_password_form');$form.find('input[name="password"]').val('adminadmin');$form.find('input[name="confirm_password"]').val('adminadmin');$form.find('button[type="submit"]').click();},},{content:"check logged in, and reset admin website",trigger:'.oe_topbar_name:contains("Admin")',run:function(){return rpc.query({model:'res.partner',method:'name_search',kwargs:{'name':'Admin'},}).then(function(res){return rpc.query({'model':'res.partner','method':'write','args':[[res[0][0]],{'website_id':false,}],});});},},]);});;
  48.  
  49. /* /website/static/tests/tours/rte.js defined in bundle 'web.assets_tests' */
  50. odoo.define('website.tour.rte',function(require){'use strict';var ajax=require('web.ajax');var session=require('web.session');var tour=require('web_tour.tour');var Wysiwyg=require('web_editor.wysiwyg.root');var domReady=new Promise(function(resolve){$(resolve);});var ready=Promise.all([domReady,session.is_bound,ajax.loadXML()]);tour.register('rte_translator',{test:true,wait_for:ready,url:'/',},[{content:"click on Add a language",trigger:'.js_language_selector a:has(i.fa)',},{content:"select french",trigger:'select[name="lang"]',run:'text "fr_BE"',},{content:"load french",trigger:'.modal-footer button:first',extra_trigger:'.modal select[name="lang"]:propValueContains(fr_BE)',},{content:"click language dropdown",trigger:'.js_language_selector .dropdown-toggle',timeout:60000,},{content:"go to english version",trigger:'.js_language_selector a[data-lang="en_US"]',extra_trigger:'html[lang*="fr"]',},{content:"Open new page menu",trigger:'#new-content-menu > a',extra_trigger:'a[data-action="edit"]',},{content:"click on new page",trigger:'a[data-action="new_page"]',},{content:"insert page name",trigger:'#editor_new_page input[type="text"]',run:'text rte_translator',},{content:"create page",trigger:'button.btn-continue',extra_trigger:'input[type="text"]:propValue(rte_translator)',},{content:"drop a snippet",trigger:"#snippet_structure .oe_snippet:eq(1) .oe_snippet_thumbnail",run:'drag_and_drop #wrap',},{content:"change content",trigger:'.oe_overlay_options .oe_options:visible',run:function(){$("#wrap p:first").replaceWith('<p>Write one or <font style="background-color: yellow;">two paragraphs <b>describing</b></font> your product or\
  51.                <font style="color: rgb(255, 0, 0);">services</font>. To be successful your content needs to be\
  52.                useful to your <a href="/999">readers</a>.</p> <input placeholder="test translate placeholder"/>\
  53.                <p>&lt;b&gt;&lt;/b&gt; is an HTML&nbsp;tag &amp; is empty</p>');$("#wrap img").attr("title","test translate image title");}},{content:"save",trigger:'button[data-action=save]',extra_trigger:'#wrap p:first b',},{content:"click language dropdown",trigger:'.js_language_selector .dropdown-toggle',extra_trigger:'body:not(.o_wait_reload):not(:has(.note-editor))',},{content:"click on french version",trigger:'.js_language_selector a[data-lang="fr_BE"]',extra_trigger:'html[lang*="en"]:not(:has(button[data-action=save]))',},{content:"translate",trigger:'html:not(:has(#wrap p span)) .o_menu_systray a[data-action="translate"]',},{content:"close modal",trigger:'.modal-footer .btn-secondary',},{content:"check if translation is activate",trigger:'[data-oe-translation-id]',},{content:"translate text",trigger:'#wrap p font:first',run:function(action_helper){action_helper.text('translated french text');Wysiwyg.setRange(this.$anchor.contents()[0],22);this.$anchor.trigger($.Event("keyup",{key:'_',keyCode:95}));},},{content:"translate text with special char",trigger:'#wrap input + p span:first',run:function(action_helper){action_helper.click();this.$anchor.prepend('&lt;{translated}&gt;');Wysiwyg.setRange(this.$anchor.contents()[0],0);this.$anchor.trigger($.Event("keyup",{key:'_',keyCode:95}));},},{content:"click on input",trigger:'#wrap input:first',extra_trigger:'#wrap .o_dirty font:first:contains(translated french text)',run:'click',},{content:"translate placeholder",trigger:'input:first',run:'text test french placeholder',},{content:"close modal",trigger:'.modal-footer .btn-primary',extra_trigger:'.modal input:propValue(test french placeholder)',},{content:"save translation",trigger:'button[data-action=save]',},{content:"check: content is translated",trigger:'#wrap p font:first:contains(translated french text)',run:function(){},},{content:"check: content with special char is translated",trigger:"#wrap input + p:contains(<{translated}><b></b> is an HTML\xa0tag & )",run:function(){},},{content:"check: placeholder translation",trigger:'input[placeholder="test french placeholder"]',run:function(){},},{content:"click language dropdown",trigger:'.js_language_selector .dropdown-toggle',},{content:"open language selector",trigger:'.js_language_selector button:first',extra_trigger:'html[lang*="fr"]:not(:has(#wrap p span))',},{content:"return to english version",trigger:'.js_language_selector a[data-lang="en_US"]',},{content:"edit english version",trigger:'a[data-action=edit]',extra_trigger:'body:not(:has(#wrap p font:first:containsExact(paragraphs <b>describing</b>)))',},{content:"select text",extra_trigger:'button[data-action=save]',trigger:'#wrap p',run:function(action_helper){action_helper.click();var el=this.$anchor[0];this.$anchor.trigger('mousedown');Wysiwyg.setRange(el.childNodes[2],6,el.childNodes[2],13);this.$anchor.trigger('mouseup');},},{content:"underline",trigger:'button.note-btn-underline',},{content:"save new change",trigger:'button[data-action=save]',extra_trigger:'#wrap.o_dirty p u',},{content:"click language dropdown",trigger:'.js_language_selector .dropdown-toggle',extra_trigger:'#wrap p u',},{content:"return in french",trigger:'html[lang="en-US"] .js_language_selector .js_change_lang[data-lang="fr_BE"]',},{content:"check bis: content is translated",trigger:'#wrap p font:first:contains(translated french text)',extra_trigger:'body:not(:has(button[data-action=save]))',},{content:"check bis: placeholder translation",trigger:'input[placeholder="test french placeholder"]',},{content:"Open customize menu",trigger:"#customize-menu > .dropdown-toggle",},{content:"Open HTML editor",trigger:"[data-action='ace']",},{content:"Check that the editor is not showing translated content (1)",trigger:'.ace_text-layer .ace_line:contains("an HTML")',run:function(actions){var lineEscapedText=$(this.$anchor.text()).text();if(lineEscapedText!=="&lt;b&gt;&lt;/b&gt; is an HTML&nbsp;tag &amp; is empty"){console.error('The HTML editor should display the correct untranslated content');$('body').addClass('rte_translator_error');}},},{content:"Check that the editor is not showing translated content (2)",trigger:'body:not(.rte_translator_error)',run:function(){},}]);});;
  54.  
  55. /* /website/static/tests/tours/html_editor.js defined in bundle 'web.assets_tests' */
  56. odoo.define('website.test.html_editor',function(require){'use strict';var tour=require('web_tour.tour');tour.register('html_editor_multiple_templates',{test:true,url:'/aboutus',},[{content:"enter edit mode",trigger:'a[data-action=edit]',},{content:"drop a snippet",trigger:'#oe_snippets .oe_snippet:has(.s_cover) .oe_snippet_thumbnail',run:"drag_and_drop #oe_structure_test_ui",},{content:"save the page",extra_trigger:'#oe_structure_test_ui.o_dirty',trigger:"#web_editor-top-edit button[data-action=save]",},{content:"open customize menu",extra_trigger:"body:not(.editor_enable)",trigger:'#customize-menu > a',},{content:"open html editor",trigger:'#html_editor',},{content:"add something in the aboutus view",trigger:'div.ace_line .ace_xml:contains("aboutus")',run:function(){ace.edit('ace-view-editor').getSession().insert({row:3,column:1},'<p>somenewcontent</p>\n');},},{content:"select oe_structure specific view",trigger:'div.ace_line .ace_xml:contains("somenewcontent")',run:function(){var viewId=$('#ace-view-list option:contains("oe_structure")').val();$('#ace-view-list').val(viewId).trigger('change');},},{content:"add something in the oe_structure specific view",extra_trigger:'#ace-view-id:contains("website.aboutus_oe_structure_test_ui")',trigger:'div.ace_line .ace_xml:contains("s_cover")',run:function(){ace.edit('ace-view-editor').getSession().insert({row:2,column:1},'<p>anothernewcontent</p>\n');},},{content:"save the html editor",extra_trigger:'div.ace_line .ace_xml:contains("anothernewcontent")',trigger:".o_ace_view_editor button[data-action=save]",},{content:"check that the page has both modification",extra_trigger:'#wrapwrap:contains("anothernewcontent")',trigger:'#wrapwrap:contains("somenewcontent")',run:function(){},},]);tour.register('test_html_editor_scss',{test:true,url:'/aboutus',},[{content:"open customize menu",extra_trigger:'#wrap:visible',trigger:'#customize-menu > a',},{content:"open html editor",trigger:'#html_editor',},{content:"open type switcher",trigger:'.o_ace_type_switcher button',},{content:"select scss files",trigger:'.o_ace_type_switcher_choice[data-type="scss"]',},{content:"select 'user_custom_rules'",trigger:'body:has(#ace-scss-list option:contains("user_custom_rules"))',run:function(){var scssId=$('#ace-scss-list option:contains("user_custom_rules")').val();$('#ace-scss-list').val(scssId).trigger('change');},},{content:"add some scss content in the file",trigger:'div.ace_line .ace_comment:contains("footer {")',run:function(){ace.edit('ace-view-editor').getSession().insert({row:2,column:0},'#wrap {display: none;}\n');},},{content:"save the html editor",extra_trigger:'div.ace_line:contains("#wrap {display: none;}")',trigger:".o_ace_view_editor button[data-action=save]",},{content:"check that the scss modification got applied",trigger:'body:has(#wrap:hidden)',run:function(){},},{content:"reset view (after reload, html editor should have been reopened where it was)",trigger:'#ace-view-id button[data-action="reset"]',},{content:"confirm reset warning",trigger:'.modal-footer .btn-primary',},{content:"check that the scss file was reset correctly, wrap content should now be visible again",trigger:'#wrap:visible',run:function(){},},]);});;
  57.  
  58. /* /website/static/tests/tours/restricted_editor.js defined in bundle 'web.assets_tests' */
  59. odoo.define("website.tour.restricted_editor",function(require){"use strict";var tour=require("web_tour.tour");tour.register("restricted_editor",{test:true,url:"/",},[{trigger:'a[data-action=edit]',content:"Click \"EDIT\" button of website as Restricted Editor",extra_trigger:".homepage",},{trigger:'#oe_snippets.o_loaded',content:"Check that the snippets loaded properly",}]);});;
  60.  
  61. /* /account/static/tests/tours/reconciliation.js defined in bundle 'web.assets_tests' */
  62. odoo.define('account.tour_bank_statement_reconciliation',function(require){'use strict';var core=require('web.core');var rpc=require('web.rpc');var Tour=require('web_tour.tour');Tour.register('bank_statement_reconciliation',{test:true,},[{content:"reconcile the line",trigger:'.o_reconciliation_line:nth-child(1) .o_reconcile:visible',},{content:"open the last line in match mode to test the partial reconciliation",extra_trigger:'.o_reconciliation_line:first[data-mode="match"]',trigger:'.o_reconciliation_line:last .cell_label:contains("First")'},{content:"click on partial reconcile",trigger:'.o_reconciliation_line:last .accounting_view .edit_amount',},{content:"Edit amount",trigger:'.o_reconciliation_line:last .accounting_view .edit_amount_input:not(.d-none)',run:'text 2000'},{content:"Press enter to validate amount",trigger:'.o_reconciliation_line:last .accounting_view .edit_amount_input:not(.d-none)',run:'keydown 13'},{content:"Check that amount has changed",trigger:'.o_reconciliation_line:last .accounting_view .line_amount:contains("2,000.00")'},{content:"reconcile the line",trigger:'.o_reconciliation_line:last .o_reconcile:visible',},{content:"change the partner of the second line",trigger:'.o_reconciliation_line:nth-child(2) .o_field_many2one input',run:'text Deco'},{content:"select Deco Addict ",extra_trigger:'.ui-autocomplete:visible li:eq(1):contains(Create "Deco")',trigger:'.ui-autocomplete:visible li:contains(Deco Addict)',},{content:"use filter",trigger:'.o_reconciliation_line:nth-child(2) .match .match_controls .filter',run:'text 4610'},{content:"select a line linked to Deco Addict ",trigger:".o_reconciliation_line:nth-child(2) .match .line_info_button[data-content*='Deco Addict']"},{content:"deselect the line",trigger:'.o_reconciliation_line:nth-child(2) .accounting_view tbody .cell_label:first',run:function(){$('.o_reconciliation_line:nth-child(2) .accounting_view tbody .cell_label:first').trigger('click');}},{content:"create a write-off",extra_trigger:'.o_reconciliation_line:nth-child(2) .accounting_view tbody:not(:has(.cell_label))',trigger:'.o_reconciliation_line:nth-child(2) .accounting_view tfoot .cell_label'},{content:"enter an account",trigger:'.o_reconciliation_line:nth-child(2) .o_field_many2one[name="account_id"] input',run:'text 100000'},{content:"select the first account",extra_trigger:'.ui-autocomplete:visible li:eq(1):contains(Create "100000")',trigger:'.ui-autocomplete:visible li:contains(100000)',},{content:"reconcile the line with the write-off",trigger:'.o_reconciliation_line:nth-child(2) .o_reconcile:visible',},{content:"check the number off validate lines",trigger:'.o_reconciliation .progress-text:contains(3 / 5)'},]);});;
  63.  
  64. /* /crm/static/src/js/tours/crm.js defined in bundle 'web.assets_tests' */
  65. odoo.define('crm.tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('crm_tour',{url:"/web",},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t("Ready to boost your sales? Your <b>Pipeline</b> can be found here, under the <b>CRM</b> app."),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t("Ready to boost your sales? Your <b>Pipeline</b> can be found here, under the <b>CRM</b> app."),position:'bottom',edition:'enterprise',},{trigger:".o-kanban-button-new",extra_trigger:'.o_opportunity_kanban',content:_t("Click here to <b>create your first opportunity</b> and add it to your pipeline."),position:"bottom",},{trigger:".o_kanban_quick_create input:first",content:_t("<b>Choose a name</b> for your opportunity, example: <i>'Need a new website'</i>"),position:"right",},{trigger:".o_kanban_quick_create .o_kanban_add",content:_t("Click here to <b>add your opportunity</b>."),position:"bottom",},{trigger:".o_opportunity_kanban .o_kanban_group:first-child .o_kanban_record:last-child",content:_t("<b>Drag &amp; drop opportunities</b> between columns as you progress in your sales cycle."),position:"right",run:"drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(2) ",},{trigger:".o_kanban_record:not(.o_updating) .o_activity_color_default",extra_trigger:".o_opportunity_kanban",content:_t("This opportunity has <b>no activity planned</b>."),position:"bottom"},{trigger:".o_schedule_activity",extra_trigger:".o_opportunity_kanban",content:_t("Let's schedule an activity."),position:"bottom"},{trigger:'.modal-body .o_field_many2one',extra_trigger:".o_opportunity_kanban",content:_t("Choose an activity type.<br/>You can customize them in the general settings."),position:"bottom",run:function(actions){actions.auto('.modal-footer button[special=cancel]');},},{trigger:".o_kanban_record",extra_trigger:".o_opportunity_kanban",content:_t("Click on the opportunity to zoom in."),position:"bottom",run:function(actions){actions.auto(".o_kanban_record .oe_kanban_action[data-type=edit]");},},{trigger:".o_opportunity_form .o_chatter_button_new_message",content:_t('<p><b>Send messages</b> to your prospect and get replies automatically attached to this opportunity.</p><p class="mb0">Type <i>\'@\'</i> to mention people - it\'s like cc-ing on emails.</p>'),position:"bottom"},{trigger:".breadcrumb-item:not(.active):last",extra_trigger:'.o_opportunity_form',content:_t("Use the breadcrumbs to <b>go back to your sales pipeline</b>."),position:"bottom"},tour.STEPS.TOGGLE_HOME_MENU,tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="base.menu_administration"]',content:_t("Configuration options are available in the Settings app."),position:"bottom",edition:'community'},{trigger:'.o_app[data-menu-xmlid="base.menu_administration"]',content:_t("Configuration options are available in the Settings app."),position:"bottom",edition:'enterprise'},{trigger:".o_web_settings_dashboard .o_user_emails",content:_t("<b>Invite coworkers</b> via email.<br/><i>Enter one email per line.</i>"),position:"right"},tour.STEPS.TOGGLE_HOME_MENU,tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t("Good job! You completed the tour of the CRM app."),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t("Good job! You completed the tour of the CRM app."),position:'bottom',edition:'enterprise'}]);});;
  66.  
  67. /* /hr_recruitment/static/src/js/tours/hr_recruitment.js defined in bundle 'web.assets_tests' */
  68. odoo.define('hr_recruitment.tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('hr_recruitment_tour',[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]',content:_t('Want to <b>start recruiting</b> like a pro? <i>Start here.</i>'),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]',content:_t('Want to <b>start recruiting</b> like a pro? <i>Start here.</i>'),position:'bottom',edition:'enterprise'},{trigger:".o-kanban-button-new",extra_trigger:'.o_hr_recruitment_kanban',content:_t("Click here to create a new job position."),position:"bottom"},{trigger:".oe_kanban_action_button",extra_trigger:'.o_hr_recruitment_kanban',content:_t("Let\'s have a look at the <b>applications pipeline</b> for this job position."),position:"bottom"},{trigger:".breadcrumb-item:not(.active):last",extra_trigger:'.o_kanban_applicant',content:_t("Use the breadcrumbs to <b>go back to the dashboard</b>."),position:"bottom"},{trigger:".o_job_alias",extra_trigger:'.o_hr_recruitment_kanban',content:_t("Try to send an email to this address, it will create an application automatically."),position:"bottom"}]);});;
  69.  
  70. /* /test_website/static/tests/tours/reset_views.js defined in bundle 'web.assets_tests' */
  71. odoo.define('test_website.reset_views',function(require){'use strict';var tour=require("web_tour.tour");tour.register('test_reset_page_view_complete_flow_part1',{test:true,url:'/test_page_view',},[{content:"enter edit mode",trigger:"a[data-action=edit]"},{content:"drop a snippet",trigger:"#oe_snippets .oe_snippet:has(.s_cover) .oe_snippet_thumbnail",run:"drag_and_drop #oe_structure_test_website_page",},{content:"save the page",extra_trigger:'#oe_structure_test_website_page.o_dirty',trigger:"#web_editor-top-edit button[data-action=save]",},{content:"open customize menu",extra_trigger:"body:not(.editor_enable)",trigger:'#customize-menu > a',},{content:"open html editor",trigger:'#html_editor',},{content:"add a broken t-field in page DOM",trigger:'div.ace_line .ace_xml:contains("placeholder")',run:function(){ace.edit('ace-view-editor').getSession().insert({row:4,column:1},'<t t-field="not.exist"/>\n');},},{content:"save the html editor",extra_trigger:'.ace_content:contains("not.exist")',trigger:".o_ace_view_editor button[data-action=save]",}]);tour.register('test_reset_page_view_complete_flow_part2',{test:true,url:'/test_page_view',},[{content:"check that the view got fixed",trigger:'p:containsExact("Test Page View")',run:function(){},},{content:"check that the inherited COW view is still there (created during edit mode)",trigger:'#oe_structure_test_website_page .s_cover',run:function(){},},{content:"open customize menu",trigger:'#customize-menu > a',},{content:"open html editor",trigger:'#html_editor',},{content:"select oe_structure view",trigger:'#s2id_ace-view-list',run:function(){var viewId=$('#ace-view-list option:contains("oe_structure")').val();$('#ace-view-list').val(viewId).trigger('change');},},{content:"add a broken t-field in page DOM",trigger:'div.ace_line .ace_xml:contains("oe_structure_test_website_page")',run:function(){ace.edit('ace-view-editor').getSession().insert({row:4,column:1},'<t t-field="not.exist"/>\n');},},{content:"save the html editor",trigger:".o_ace_view_editor button[data-action=save]",}]);});;
  72.  
  73. /* /website_form/static/tests/tours/website_form_editor.js defined in bundle 'web.assets_tests' */
  74. odoo.define('website_form_editor.tour',function(require){'use strict';var rpc=require('web.rpc');var tour=require("web_tour.tour");tour.register("website_form_editor_tour",{test:true,},[{content:"Enter edit mode",trigger:"a[data-action=edit]"},{content:"Drop the form snippet",trigger:"#oe_snippets .oe_snippet:has(.s_website_form) .oe_snippet_thumbnail",run:"drag_and_drop #wrap",},{content:"Check dropped snippet",trigger:"body:has(form[action*='/website_form/'])",},{content:"Check if the snippet is dropped and if the modal is opened",trigger:"body:has(form[action*='/website_form/'])"+":has(.modal-body:has(select[name='model_selection'])"+":has(input[name='success_page']))",run:function(){},in_modal:false,},{content:"Change the action to create issues",trigger:".modal-body select",run:"text project.issue"},{content:"Change the action to Send an E-mail",trigger:".modal-body select",run:function(actions){actions.text($('select[name="model_selection"] option:contains("Send an E-mail")').val());}},{content:"Complete Recipient E-mail",extra_trigger:".modal-body input[name='email_to']",trigger:".modal-body input[name='email_to']",run:"text test@test.test"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Add a model field",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_modal]"},{content:"Select the date field",trigger:"select[name='field_selection']",run:"text date"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Change the label",trigger:".col-form-label[for='date']",run:"text Test Date"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]"},{content:"Check the resulting field",trigger:".form-field.o_website_form_required_custom"+":has(input[type=text][name=date][required])"+":has(label:contains('Test Date'))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Add a model field",trigger:".oe_overlay_options:visible .dropdown-item[data-website_form_field_modal]"},{content:"Select the record_name field",trigger:"select[name='field_selection']",run:"text record_name"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Change the label",trigger:".col-form-label[for='record_name']",run:"text Awesome Label"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Hidden",trigger:".oe_overlay_options .dropdown-item[data-toggle-class='o_website_form_field_hidden']"},{content:"Check the resulting field",trigger:".form-field.o_website_form_field_hidden"+":has(input:not([required])[type=text][name=record_name])"+":has(label:contains('Awesome Label'))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Add a model field",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_modal]"},{content:"Select the body_html field",trigger:"select[name='field_selection']",run:"text body_html"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Change the label",trigger:".col-form-label[for='body_html']",run:"text Your Message"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]"},{content:"Check the resulting field",trigger:".form-field.o_website_form_required_custom"+":has(textarea[name=body_html][required])"+":has(label:contains('Your Message'))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Add a model field",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_modal]"},{content:"Select the recipient_ids field",trigger:"select[name='field_selection']",run:"text recipient_ids"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Check the resulting field",trigger:".form-field:has(.col-form-label:contains('To (Partners)'))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]",},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']",run:function(actions){actions.auto();$(".oe_options .dropdown-submenu .dropdown-menu").css("display","block");}},{content:"Click on Multiple Checkboxes in menu Add a custom field",trigger:".oe_options .dropdown-item:contains('Multiple Checkboxes')"},{content:"Change the label",trigger:".col-form-label[for='Custom Multiple Checkboxes']",extra_trigger:".s_website_form:not(:has(.col-form-label[for='Custom Multiple Checkboxes']:eq(1)))",run:"text Products"},{content:"Change Option 1 label",trigger:"label:contains('Option 1') span",run:"text Iphone"},{content:"Change Option 2 label",trigger:"label:contains('Option 2') span",run:"text Galaxy S"},{content:"Click on Option 3",trigger:"label:contains('Option 3') span",},{content:"Duplicate Option 3",trigger:".oe_overlay_options:visible .oe_snippet_clone",},{content:"Change first Option 3 label",trigger:"label:contains('Option 3'):first span",run:"text Xperia"},{content:"Change last Option label",trigger:"label:contains('Option 3') span",run:"text Wiko Stairway"},{content:"Click on field",trigger:".col-form-label:contains('Products')"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]"},{content:"Check the resulting field",trigger:".form-field.o_website_form_custom.o_website_form_required_custom"+":has(.col-form-label:contains('Products'))"+":has(.checkbox label:contains('Iphone'):has(input[type='checkbox'][required]))"+":has(.checkbox label:contains('Galaxy S'):has(input[type='checkbox'][required]))"+":has(.checkbox label:contains('Xperia'):has(input[type='checkbox'][required]))"+":has(.checkbox label:contains('Wiko Stairway'):has(input[type='checkbox'][required]))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]",},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Radio Buttons in menu Add a custom field",trigger:".oe_options .dropdown-item:contains('Radio Buttons')"},{content:"Change the label",trigger:".col-form-label[for='Custom Radio Buttons']",run:"text Service"},{content:"Change Option 1 label",trigger:"label:contains('Option 1') span",run:"text After-sales Service"},{content:"Change Option 2 label",trigger:"label:contains('Option 2') span",run:"text Invoicing Service"},{content:"Click on Option 3",trigger:"label:contains('Option 3') span",},{content:"Duplicate Option 3",trigger:".oe_overlay_options:visible .oe_snippet_clone",},{content:"Change first Option 3 label",trigger:"label:contains('Option 3'):first span",run:"text Development Service"},{content:"Change last Option label",trigger:"label:contains('Option 3') span",run:"text Management Service"},{content:"Click on field",trigger:".col-form-label:contains('Service')"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]",extra_trigger:".form-field.o_website_form_custom.o_website_form_required_custom"+":has(.col-form-label:contains('Service'))",},{content:"Check the resulting field",trigger:".form-field.o_website_form_custom:not(.o_website_form_required_custom)"+":has(.col-form-label:contains('Service'))"+":has(.radio label:contains('After-sales Service'):has(input[type='radio']:not([required])))"+":has(.radio label:contains('Invoicing Service'):has(input[type='radio']:not([required])))"+":has(.radio label:contains('Development Service'):has(input[type='radio']:not([required])))"+":has(.radio label:contains('Management Service'):has(input[type='radio']:not([required])))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]",onend:function(){$(".oe_options > ul > li:has(ul) > ul").css("display","block");}},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Selection in menu Add a custom field",trigger:".oe_options .dropdown-item:contains('Selection')"},{content:"Change the label",trigger:".col-form-label[for='Custom Selection']",run:"text State"},{content:"Change Option 1 Label",trigger:".o_website_form_select_item:contains('Option 1')",run:"text Germany"},{content:"Change Option 2 Label",trigger:".o_website_form_select_item:contains('Option 2')",run:"text Belgium"},{content:"Click on Option 3",trigger:".o_website_form_select_item:contains('Option 3')",},{content:"Duplicate Option 3",trigger:".oe_overlay_options:visible .oe_snippet_clone",},{content:"Change first Option 3 label",trigger:".o_website_form_select_item:contains('Option 3'):first",run:"text France"},{content:"Change last Option label",trigger:".o_website_form_select_item:contains('Option 3')",run:"text Canada"},{content:"Click on Germany Option",trigger:".o_website_form_select_item:contains('Germany')",},{content:"Remove Germany Option",trigger:".oe_overlay_options:visible .oe_snippet_remove",},{content:"Click on field",trigger:".col-form-label:contains('State')"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Required",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_require]"},{content:"Check the resulting snippet",trigger:".form-field.o_website_form_custom.o_website_form_required_custom"+":has(label:contains('State'))"+":has(select[required]:hidden)"+":has(.o_website_form_select_item:contains('Belgium'))"+":has(.o_website_form_select_item:contains('France'))"+":has(.o_website_form_select_item:contains('Canada'))"+":not(:has(.o_website_form_select_item:contains('Germany')))",run:function(){},},{content:"Click on Form snippet",trigger:".s_website_form[data-model_name]"},{content:"Click on Customize",trigger:".oe_overlay_options [title='Customize']"},{content:"Click on Add a model field",trigger:".oe_overlay_options .dropdown-item[data-website_form_field_modal]"},{content:"Select the attachment_ids field",trigger:"select[name='field_selection']",run:"text attachment_ids"},{content:"Click on Save",trigger:".modal-footer #modal-save"},{content:"Change the label",trigger:".col-form-label[for='attachment_ids']",run:"text Invoice Scan"},{content:"Check the resulting field",trigger:".form-field"+":has(input[type=file][name=attachment_ids])"+":has(label:contains('Invoice Scan'))",run:function(){$('body').append('<div id="completlyloaded"></div>');},},{content:"Save the page",trigger:"button[data-action=save]",},{content:"Wait reloading...",trigger:"html:not(:has(#completlyloaded)) div",}]);tour.register("website_form_editor_tour_submit",{test:true,},[{content:"Try to send empty form",extra_trigger:"form[data-model_name='mail.mail']"+"[data-success_page='/contactus-thank-you']"+":has(.form-field:has(label:contains('Your Name')):has(input[type='text'][name='Your Name'][required]))"+":has(.form-field:has(label:contains('Email')):has(input[type='email'][name='email_from'][required]))"+":has(.form-field:has(label:contains('Your Question')):has(textarea[name='Your Question'][required]))"+":has(.form-field:has(label:contains('Subject')):has(input[type='text'][name='subject'][required]))"+":has(.form-field:has(label:contains('Test Date')):has(input[type='text'][name='date'][required]))"+":has(.form-field:has(label:contains('Awesome Label')):hidden)"+":has(.form-field:has(label:contains('Your Message')):has(textarea[name='body_html'][required]))"+":has(.form-field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Iphone'][required]))"+":has(.form-field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Galaxy S'][required]))"+":has(.form-field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Xperia'][required]))"+":has(.form-field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Wiko Stairway'][required]))"+":has(.form-field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='After-sales Service']:not([required])))"+":has(.form-field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Invoicing Service']:not([required])))"+":has(.form-field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Development Service']:not([required])))"+":has(.form-field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Management Service']:not([required])))"+":has(.form-field:has(label:contains('State')):has(select[name='State'][required]:has(option[value='Belgium'])))"+":has(.form-field.o_website_form_required_custom:has(label:contains('State')):has(select[name='State'][required]:has(option[value='France'])))"+":has(.form-field:has(label:contains('State')):has(select[name='State'][required]:has(option[value='Canada'])))"+":has(.form-field:has(label:contains('Invoice Scan')))"+":has(.form-field:has(input[name='email_to'][value='test@test.test']))",trigger:".o_website_form_send"},{content:"Check if required fields were detected and complete the Subject field",extra_trigger:"form:has(#o_website_form_result.text-danger)"+":has(.form-field:has(label:contains('Your Name')).o_has_error)"+":has(.form-field:has(label:contains('Email')).o_has_error)"+":has(.form-field:has(label:contains('Your Question')).o_has_error)"+":has(.form-field:has(label:contains('Subject')).o_has_error)"+":has(.form-field:has(label:contains('Test Date')).o_has_error)"+":has(.form-field:has(label:contains('Your Message')).o_has_error)"+":has(.form-field:has(label:contains('Products')).o_has_error)"+":has(.form-field:has(label:contains('Service')):not(.o_has_error))"+":has(.form-field:has(label:contains('State')):not(.o_has_error))"+":has(.form-field:has(label:contains('Invoice Scan')):not(.o_has_error))",trigger:"input[name=subject]",run:"text Jane Smith"},{content:"Update required field status by trying to Send again",trigger:".o_website_form_send"},{content:"Check if required fields were detected and complete the Message field",extra_trigger:"form:has(#o_website_form_result.text-danger)"+":has(.form-field:has(label:contains('Your Name')).o_has_error)"+":has(.form-field:has(label:contains('Email')).o_has_error)"+":has(.form-field:has(label:contains('Your Question')).o_has_error)"+":has(.form-field:has(label:contains('Subject')):not(.o_has_error))"+":has(.form-field:has(label:contains('Test Date')).o_has_error)"+":has(.form-field:has(label:contains('Your Message')).o_has_error)"+":has(.form-field:has(label:contains('Products')).o_has_error)"+":has(.form-field:has(label:contains('Service')):not(.o_has_error))"+":has(.form-field:has(label:contains('State')):not(.o_has_error))"+":has(.form-field:has(label:contains('Invoice Scan')):not(.o_has_error))",trigger:"textarea[name=body_html]",run:"text A useless message"},{content:"Update required field status by trying to Send again",trigger:".o_website_form_send"},{content:"Check if required fields was detected and check a product. If this fails, you probably broke the cleanForSave.",extra_trigger:"form:has(#o_website_form_result.text-danger)"+":has(.form-field:has(label:contains('Your Name')).o_has_error)"+":has(.form-field:has(label:contains('Email')).o_has_error)"+":has(.form-field:has(label:contains('Your Question')).o_has_error)"+":has(.form-field:has(label:contains('Subject')):not(.o_has_error))"+":has(.form-field:has(label:contains('Test Date')).o_has_error)"+":has(.form-field:has(label:contains('Your Message')):not(.o_has_error))"+":has(.form-field:has(label:contains('Products')).o_has_error)"+":has(.form-field:has(label:contains('Service')):not(.o_has_error))"+":has(.form-field:has(label:contains('State')):not(.o_has_error))"+":has(.form-field:has(label:contains('Invoice Scan')):not(.o_has_error))",trigger:"input[name=Products][value='Wiko Stairway']"},{content:"Complete Date field",trigger:".o_website_form_datetime [data-toggle='datetimepicker']",},{content:"Check another product",trigger:"input[name='Products'][value='Xperia']"},{content:"Check a service",trigger:"input[name='Service'][value='Development Service']"},{content:"Complete Your Name field",trigger:"input[name='Your Name']",run:"text chhagan"},{content:"Complete Email field",trigger:"input[name=email_from]",run:"text test@mail.com"},{content:"Complete Your Question field",trigger:"textarea[name='Your Question']",run:"text magan"},{content:"Send the form",trigger:".o_website_form_send"},{content:"Check form is submitted without errors",trigger:".alert-success:contains('Your message has been sent successfully.')"}]);tour.register("website_form_editor_tour_results",{test:true,},[{content:"Check mail.mail records have been created",trigger:"body",run:function(){var mailDef=rpc.query({model:'mail.mail',method:'search_count',args:[[['email_to','=','test@test.test'],['body_html','like','A useless message'],['body_html','like','Service : Development Service'],['body_html','like','State : Belgium'],['body_html','like','Products : Xperia,Wiko Stairway']]],});var success=function(model,count){if(count>0){$('body').append('<div id="website_form_editor_success_test_tour_'+model+'"></div>');}};mailDef.then(_.bind(success,this,'mail_mail'));}},{content:"Check mail.mail records have been created",trigger:"#website_form_editor_success_test_tour_mail_mail"}]);return{};});;
  75.  
  76. /* /website_links/static/tests/tours/website_links.js defined in bundle 'web.assets_tests' */
  77. odoo.define('website_links.website_links_tour',function(require){'use strict';var tour=require("web_tour.tour");tour.register('website_links_tour',{test:true,url:'/r',},[{content:"check that existing links are shown",trigger:'#o_website_links_recent_links .btn_shorten_url_clipboard',run:function(){},},{content:"fill the form and submit it",trigger:'#o_website_links_link_tracker_form input#url',run:function(){var url=window.location.host+'/aboutus';$('#o_website_links_link_tracker_form input#url').val(url);$('.o_website_links_utm_forms input#campaign-select').val(1).change();$('.o_website_links_utm_forms input#channel-select').val(1).change();$('.o_website_links_utm_forms input#source-select').val(1).change();$('#btn_shorten_url').click();},},{content:"check that link was created and visit it",extra_trigger:'#o_website_links_recent_links .truncate_text:first():contains("About us"), #o_website_links_recent_links .truncate_text:first():contains("aboutus")',trigger:'#o_website_links_link_tracker_form #generated_tracked_link:contains("/r/")',run:function(){window.location.href=$('#generated_tracked_link').text();},},{content:"check that we landed on correct page with correct query strings",trigger:'.s_title h1:containsExact("About us")',run:function(){var expectedUrl="/aboutus?utm_campaign=Sale&utm_source=Search+engine&utm_medium=Website";if(window.location.pathname+window.location.search!==expectedUrl){console.error("The link was not correctly created.");}
  78. window.location.href='/r';},},{content:"filter recently used links",trigger:'#filter-recently-used-links',},{content:"visit link stats page",trigger:'#o_website_links_recent_links a:containsExact("Stats"):first',},{content:"check click number and ensure graphs are initialized",extra_trigger:'.website_links_click_chart .title:contains("1 clicks")',trigger:'canvas',run:function(){},},{content:"click on Last Month tab",trigger:'.o_website_links_chart .graph-tabs a:contains("Last Month")',},{content:"ensure tab is correctly resized",trigger:'#last_month_charts #last_month_clicks_chart',run:function(){var width=$('#last_month_charts #last_month_clicks_chart').width();if(width<50){console.error("The graphs are probably not resized on tab change.");}},},]);});;
  79.  
  80. /* /account_accountant/static/tests/tours/account_reports_widgets.js defined in bundle 'web.assets_tests' */
  81. odoo.define('account_accountant_reports_widgets.tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('account_reports_widgets',{test:true,url:'/web?#action=account_reports.action_account_report_pnl',},[{content:"wait web client",trigger:".o_account_reports_body",extra_trigger:".breadcrumb",run:function(){}},{content:"unfold line",trigger:'.js_account_report_foldable:first',run:'click',},{content:"check that line has been unfolded",trigger:'[data-parent-id]',},{content:'Open dropdown menu of one of the unfolded line',trigger:'[data-parent-id] .o_account_report_line a:first',run:'click',},{content:'click on the annotate action',trigger:'[data-parent-id] .o_account_report_line .o_account_reports_domain_dropdown:first .js_account_reports_add_footnote',run:'click',},{content:'insert footnote text',trigger:'.js_account_reports_footnote_note',run:'text My awesome footnote!'},{content:'save footnote',trigger:'.modal-footer .btn-primary',run:'click'},{content:'wait for footnote to be saved',trigger:'.footnote#footnote1 .text:contains(1. My awesome footnote!)',extra_trigger:'.o_account_reports_footnote_sup a[href="#footnote1"]',},{content:"change date filter",trigger:".o_account_reports_filter_date > a",},{content:"change date filter",trigger:".dropdown-item.js_account_report_date_filter[data-filter='last_year']",run:'click'},{content:"wait refresh",trigger:".o_account_reports_level2:last() .o_account_report_column_value:contains(0.00)"},{content:"change comparison filter",trigger:".o_account_reports_filter_date_cmp > a"},{content:"change comparison filter",trigger:".dropdown-item.js_foldable_trigger[data-filter='previous_period_filter']"},{content:"change comparison filter",trigger:".js_account_report_date_cmp_filter[data-filter='previous_period']",run:'click',},{content:"wait refresh, report should have 4 columns",trigger:"th + th + th + th"},{content:"change boolean filter",trigger:".o_account_reports_filter_bool > a",},{content:"change cash basis filter",trigger:".dropdown-item.js_account_report_bool_filter[data-filter='cash_basis']",run:'click'},{title:"export xlsx",trigger:'button[action="print_xlsx"]',run:'click'},]);});;
  82.  
  83. /* /hr_expense/static/src/js/tours/hr_expense.js defined in bundle 'web.assets_tests' */
  84. odoo.define('hr_expense.tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('hr_expense_tour',{url:"/web"},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"]',content:_t("Want to manage your expenses? It starts here."),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"]',content:_t("Want to manage your expenses? It starts here."),position:'bottom',edition:'enterprise'},{trigger:'.o_form_button_save',content:_t("<p>Once your <b> Expense </b> is ready, you can save it.</p>"),position:'bottom',},{trigger:'.o_attach_document',content:_t("Attach your receipt here."),position:'bottom',},{trigger:'.o_expense_submit',extra_triggger:".o_expense_form",content:_t('<p>Click on <b> Create Report </b> to create the report.</p>'),position:'right',},{trigger:'.o_expense_tree input[type=checkbox]',content:_t('<p>Select expenses to submit them to your manager</p>'),position:'bottom'},{trigger:'.o_dropdown_toggler_btn',extra_trigger:".o_expense_tree",content:_t('<p>Click on <b> Action Create Report </b> to submit selected expenses to your manager</p>'),position:'right',},{trigger:'.o_expense_sheet_submit',content:_t('Once your <b>Expense report</b> is ready, you can submit it to your manager and wait for the approval from your manager.'),position:'bottom',},{trigger:'.o_expense_sheet_approve',content:_t("<p>Approve the report here.</p><p>Tip: if you refuse, don’t forget to give the reason thanks to the hereunder message tool</p>"),position:'bottom',},{trigger:'.o_expense_sheet_post',content:_t("<p>The accountant receive approved expense reports.</p><p>He can post journal entries in one click if taxes and accounts are right.</p>"),position:'bottom',},{trigger:'.o_expense_sheet_pay',content:_t("The accountant can register a payment to reimburse the employee directly."),position:'bottom',},{trigger:'li a[data-menu-xmlid="hr_expense.menu_hr_expense_sheet_my_all"], div[data-menu-xmlid="hr_expense.menu_hr_expense_sheet_my_all"]',content:_t("Managers can get all reports to approve from this menu."),position:'bottom',}]);});;
  85.  
  86. /* /website_crm/static/tests/tours/website_crm.js defined in bundle 'web.assets_tests' */
  87. odoo.define('website_crm.tour',function(require){'use strict';var tour=require('web_tour.tour');tour.register('website_crm_tour',{test:true,url:'/contactus',},[{content:"Complete name",trigger:"input[name=contact_name]",run:"text John Smith",},{content:"Complete phone number",trigger:"input[name=phone]",run:"text +32 485 118.218"},{content:"Complete Email",trigger:"input[name=email_from]",run:"text john@smith.com"},{content:"Complete Company",trigger:"input[name=partner_name]",run:"text Odoo S.A."},{content:"Complete Subject",trigger:"input[name=name]",run:"text Useless message"},{content:"Complete Subject",trigger:"textarea[name=description]",run:"text ### TOUR DATA ###"},{content:"Send the form",trigger:".o_website_form_send"},{content:"Check we were redirected to the success page",trigger:"#wrap:has(h1:contains('Thanks')):has(div.alert-success)"}]);return{};});;
  88.  
  89. /* /website_hr_recruitment/static/tests/tours/website_hr_recruitment.js defined in bundle 'web.assets_tests' */
  90. odoo.define('website_hr_recruitment.tour',function(require){'use strict';var tour=require("web_tour.tour");tour.register('website_hr_recruitment_tour',{test:true,url:'/jobs/apply/3',},[{content:"Complete name",trigger:"input[name=partner_name]",run:"text John Smith"},{content:"Complete Email",trigger:"input[name=email_from]",run:"text john@smith.com"},{content:"Complete phone number",trigger:"input[name=partner_phone]",run:"text 118.218"},{content:"Complete Residence Country",trigger:"input[name=residence_country]",run:"text Belgium"},{content:"Complete Subject",trigger:"textarea[name=description]",run:"text ### HR RECRUITMENT TEST DATA ###"},{content:"Send the form",trigger:".o_website_form_send"},{content:"Check the form is submited without errors",trigger:".oe_structure:has(h1:contains('Congratulations'))"}]);return{};});;
  91.  
  92. /* /account_reports/static/tests/tours/account_reports.js defined in bundle 'web.assets_tests' */
  93. odoo.define('account_reports.tour',function(require){'use strict';var Tour=require('web_tour.tour');Tour.register('account_followup_reports_widgets',{test:true,url:'/web#action=account_reports.action_view_list_customer_statements',},[{content:'wait for web client',trigger:".o_list_view",extra_trigger:".breadcrumb",run:function(){}},{content:'click first item',trigger:".o_list_view .o_data_row",run:'click'},{content:'click trust ball',trigger:'#trustDropdown',run:'click'},{content:'change trust',trigger:'.o_change_trust[data-new-trust="good"]',run:'click'},{content:'send by mail',trigger:'.o_account_reports_followup_send_mail_button',run:'click'},{content:'check that message telling that mail has been sent is shown',trigger:'.alert:contains(The follow-up report was successfully emailed!)',run:function(){}},{content:'dismiss alert',trigger:'.alert .close',run:'click'},{content:'Click the Do it later button',trigger:'.o_account_reports_followup_do_it_later_button',run:'click'},]);});;
  94.  
  95. /* /point_of_sale/static/tests/tours/point_of_sale.js defined in bundle 'web.assets_tests' */
  96. odoo.define('point_of_sale.tour.pricelist',function(require){"use strict";var Tour=require('web_tour.tour');var rpc=require('web.rpc');var utils=require('web.utils');var round_di=utils.round_decimals;function assert(condition,message){if(!condition){throw message||"Assertion failed";}}
  97. function _build_pricelist_context(pricelist,quantity,date){return{pricelist:pricelist.id,quantity:quantity,};}
  98. function compare_backend_frontend(product,pricelist_name,quantity){return function(){var pricelist=_.findWhere(posmodel.pricelists,{name:pricelist_name});var frontend_price=product.get_price(pricelist,quantity);frontend_price=round_di(frontend_price,posmodel.dp['Product Price']);var context=_build_pricelist_context(pricelist,quantity);return rpc.query({model:'product.product',method:'read',args:[[product.id],['price']],context:context}).then(function(backend_result){var debug_info=_.extend(context,{product:product.id,product_display_name:product.display_name,pricelist_name:pricelist.name,});var backend_price=backend_result[0].price;assert(frontend_price===backend_price,JSON.stringify(debug_info)+' DOESN\'T MATCH -> '+backend_price+' (backend) != '+frontend_price+' (frontend)');return Promise.resolve();});};}
  99. var steps=[{content:"click category switch",trigger:".js-category-switch",run:'click',},{content:'waiting for loading to finish',trigger:'body:has(.loader:hidden)',run:function(){var product_wall_shelf=posmodel.db.search_product_in_category(0,'Wall Shelf Unit')[0];var product_small_shelf=posmodel.db.search_product_in_category(0,'Small Shelf')[0];var product_magnetic_board=posmodel.db.search_product_in_category(0,'Magnetic Board')[0];var product_monitor_stand=posmodel.db.search_product_in_category(0,'Monitor Stand')[0];var product_desk_pad=posmodel.db.search_product_in_category(0,'Desk Pad')[0];var product_letter_tray=posmodel.db.search_product_in_category(0,'Letter Tray')[0];var product_whiteboard=posmodel.db.search_product_in_category(0,'Whiteboard')[0];var product_miscellaneous=posmodel.db.search_product_in_category(0,'Miscellaneous')[0];compare_backend_frontend(product_letter_tray,'Public Pricelist',0,undefined)().then(compare_backend_frontend(product_letter_tray,'Public Pricelist',1,undefined)).then(compare_backend_frontend(product_letter_tray,'Fixed',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'Fixed',1,undefined)).then(compare_backend_frontend(product_small_shelf,'Fixed',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'Percentage',1,undefined)).then(compare_backend_frontend(product_small_shelf,'Percentage',1,undefined)).then(compare_backend_frontend(product_magnetic_board,'Percentage',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'Formula',1,undefined)).then(compare_backend_frontend(product_small_shelf,'Formula',1,undefined)).then(compare_backend_frontend(product_magnetic_board,'Formula',1,undefined)).then(compare_backend_frontend(product_monitor_stand,'Formula',1,undefined)).then(compare_backend_frontend(product_desk_pad,'Formula',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'min_quantity ordering',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'min_quantity ordering',2,undefined)).then(compare_backend_frontend(product_letter_tray,'Category vs no category',1,undefined)).then(compare_backend_frontend(product_letter_tray,'Category',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'Product template',1,undefined)).then(compare_backend_frontend(product_wall_shelf,'Dates',1,undefined)).then(compare_backend_frontend(product_miscellaneous,'Cost base',1,undefined)).then(compare_backend_frontend(product_miscellaneous,'Pricelist base',1,undefined)).then(compare_backend_frontend(product_miscellaneous,'Pricelist base 2',1,undefined)).then(compare_backend_frontend(product_small_shelf,'Pricelist base rounding',1,undefined)).then(compare_backend_frontend(product_whiteboard,'Public Pricelist',1,undefined)).then(function(){$('.pos').addClass('done-testing');});},}];steps=steps.concat([{content:"wait for unit tests to finish",trigger:".pos.done-testing",run:function(){},},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"verify default pricelist is set",trigger:".selection-item.selected:contains('Public Pricelist')",run:function(){},},{content:"select fixed pricelist",trigger:".selection-item:contains('Fixed')",},{content:"prices should be updated in the product screen",trigger:".product:contains('Miscellaneous'):contains('$ 1.00')",run:function(){},},{content:"open customer list",trigger:"button.set-customer",},{content:"select Deco Addict",trigger:".client-line:contains('Deco Addict')",},{content:"confirm selection",trigger:".clientlist-screen .next",},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"verify pricelist changed",trigger:".selection-item.selected:contains('Public Pricelist')",run:function(){},},{content:"cancel pricelist dialog",trigger:".button.cancel:visible",},{content:"prices should be updated in the product screen",trigger:".product:contains('Miscellaneous'):contains('$ 18.00')",run:function(){},},{content:"open customer list",trigger:"button.set-customer",},{content:"select Lumber Inc",trigger:".client-line:contains('Lumber Inc')",},{content:"confirm selection",trigger:".clientlist-screen .next",},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"verify pricelist remained public pricelist ('Not loaded' is not available)",trigger:".selection-item.selected:contains('Public Pricelist')",run:function(){},},{content:"cancel pricelist dialog",trigger:".button.cancel:visible",},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"select fixed pricelist",trigger:".selection-item:contains('min_quantity ordering')",},{content:"order 1 kg shelf",trigger:".product:contains('Wall Shelf')",},{content:"change qty to 2 kg",trigger:".numpad button.input-button:visible:contains('2')",},{content:"verify that unit price of shelf changed to $1",trigger:".total > .value:contains('$ 2.00')",},{content:"order different shelf",trigger:".product:contains('Small Shelf')",},{content:"change to price mode",trigger:".numpad button:contains('Price')",},{content:"manually override the unit price of these shelf to $5",trigger:".numpad button.input-button:visible:contains('5')",},{content:"change back to qty mode",trigger:".numpad button:contains('Qty')",},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"select public pricelist",trigger:".selection-item:contains('Public Pricelist')",},{content:"verify that the boni shelf have been recomputed and the\
  100. shelf have not (their price was manually overriden)",trigger:".total > .value:contains('$ 8.96')",},{content:"click pricelist button",trigger:".control-button.o_pricelist_button",},{content:"select fixed pricelist",trigger:".selection-item:contains('min_quantity ordering')",},{content:"order 1 miscellaneous product",trigger:".product:contains('Miscellaneous')",},{content:"order 1 miscellaneous product",trigger:".product:contains('Miscellaneous')",},{content:"order 1 miscellaneous product",trigger:".product:contains('Miscellaneous')",},{content:"verify there is one line with 3 miscellaneous products",trigger:".orderline:contains('Miscellaneous') em:contains('3.000')",run:function(){},},{content:"close the Point of Sale frontend",trigger:".header-button",},{content:"confirm closing the frontend",trigger:".header-button",run:function(){},}]);Tour.register('pos_pricelist',{test:true,url:'/pos/web'},steps);});odoo.define('point_of_sale.tour.acceptance',function(require){"use strict";var Tour=require("web_tour.tour");function add_product_to_order(product_name){return[{content:'buy '+product_name,trigger:'.product-list .product-name:contains("'+product_name+'")',},{content:'the '+product_name+' have been added to the order',trigger:'.order .product-name:contains("'+product_name+'")',run:function(){},}];}
  101. function set_fiscal_position_on_order(fp_name){return[{content:'set fiscal position',trigger:'.control-button.o_fiscal_position_button',},{content:'choose fiscal position '+fp_name+' to add to the order',trigger:'.popups .popup .selection .selection-item:contains("'+fp_name+'")',},{content:'the fiscal position '+fp_name+' has been set to the order',trigger:'.control-button.o_fiscal_position_button:contains("'+fp_name+'")',run:function(){},}];}
  102. function generate_keypad_steps(amount_str,keypad_selector){var i,steps=[],current_char;for(i=0;i<amount_str.length;++i){current_char=amount_str[i];steps.push({content:'press '+current_char+' on payment keypad',trigger:keypad_selector+' .input-button:contains("'+current_char+'"):visible'});}
  103. return steps;}
  104. function generate_payment_screen_keypad_steps(amount_str){return generate_keypad_steps(amount_str,'.payment-numpad');}
  105. function generate_product_screen_keypad_steps(amount_str){return generate_keypad_steps(amount_str,'.numpad');}
  106. function verify_order_total(total_str){return[{content:'order total contains '+total_str,trigger:'.order .total .value:contains("'+total_str+'")',run:function(){},}];}
  107. function goto_payment_screen_and_select_payment_method(){return[{content:"go to payment screen",trigger:'.button.pay',},{content:"pay with cash",trigger:'.paymentmethod:contains("Cash")',}];}
  108. function finish_order(){return[{content:"validate the order",trigger:'.button.next:visible',},{content:"verify that the order is being sent to the backend",trigger:".js_connecting:visible",run:function(){},},{content:"verify that the order has been succesfully sent to the backend",trigger:".js_connected:visible",run:function(){},},{content:"next order",trigger:'.button.next:visible',},{content:"click category switch",trigger:".js-category-switch",run:'click',}];}
  109. var steps=[{content:'waiting for loading to finish',trigger:'body:has(.loader:hidden)',run:function(){},},{content:"click category switch",trigger:".js-category-switch",run:'click',}];steps=steps.concat(add_product_to_order('Desk Organizer'));steps=steps.concat(verify_order_total('5.10'));steps=steps.concat(add_product_to_order('Desk Organizer'));steps=steps.concat(verify_order_total('10.20'));steps=steps.concat(goto_payment_screen_and_select_payment_method());steps=steps.concat(generate_payment_screen_keypad_steps("12.20"));steps=steps.concat([{content:"verify tendered",trigger:'.col-tendered:contains("12.20")',run:function(){},},{content:"verify change",trigger:'.col-change:contains("2.00")',run:function(){},}]);steps=steps.concat(finish_order());steps=steps.concat(add_product_to_order('Desk Organizer'));steps=steps.concat(generate_product_screen_keypad_steps('.999'));steps=steps.concat(verify_order_total('5.09'));steps=steps.concat(goto_payment_screen_and_select_payment_method());steps=steps.concat(generate_payment_screen_keypad_steps("10"));steps=steps.concat(finish_order());steps=steps.concat(add_product_to_order('Letter Tray'));steps=steps.concat(verify_order_total('5.28'));steps=steps.concat(set_fiscal_position_on_order('FP-POS-2M'));steps=steps.concat(verify_order_total('5.52'));steps=steps.concat([{content:"close the Point of Sale frontend",trigger:".header-button",},{content:"confirm closing the frontend",trigger:".header-button",run:function(){},}]);Tour.register('pos_basic_order',{test:true,url:'/pos/web'},steps);});;
  110.  
  111. /* /project_timesheet_synchro/static/tests/tours/timesheet_app_test_ui.js defined in bundle 'web.assets_tests' */
  112. odoo.define('project_timesheet_synchro.test_screen_navigation',function(require){'use strict';var tour=require('web_tour.tour');tour.register('activity_creation',{test:true,url:'/project_timesheet_synchro/timesheet_app',},[{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper"},{content:"Close the menu",trigger:'.pt_drawer_menu_wrapper .menu_text:contains(Today)',extra_trigger:'.pt_app:has(.pt_drawer_menu_wrapper.shown):has(.pt_btn_start_timer)',},{content:"Start the timer",extra_trigger:'.pt_drawer_menu_wrapper:not(.shown)',trigger:'.pt_btn_start_timer',},{content:"Stop the timer",trigger:'.pt_btn_stop_timer',},{content:"Insert a work summary",trigger:'textarea',run:'text A work summary'},{content:"Open the project selection",trigger:'.pt_activity_project .select2-choice',run:'click'},{content:"Enter a project name",trigger:'.select2-input',run:"text A project Name",},{content:"Create the project",trigger:'.select2-result-label:contains("A project Name")',},{content:"Save the activity",trigger:'.pt_validate_edit_btn',},]);tour.register('test_screen_navigation',{test:true,url:'/project_timesheet_synchro/timesheet_app',},[{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper"},{content:'"Go to screen This week"',trigger:'.pt_menu_item:contains("This Week")',},{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper"},{content:'"Go to screen Settings"',trigger:'.pt_menu_item:contains("Settings")',},{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper"},{content:'"Go to screen Day Plan"',trigger:'.pt_menu_item:contains("Plan")',},{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper",},{content:'"Go to screen Synchronize"',trigger:'.pt_menu_item:contains("Synchronize")',},{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper",},{content:'"Go to screen Statistics"',trigger:'.pt_menu_item:contains("Statistics")',},{content:"Open the menu",trigger:'.pt_toggle',extra_trigger:".pt_drawer_menu_wrapper"},]);});;
  113.  
  114. /* /sale/static/tests/tours/sale_signature.js defined in bundle 'web.assets_tests' */
  115. odoo.define('sale.tour_sale_signature',function(require){'use strict';var tour=require('web_tour.tour');tour.register('sale_signature',{test:true,url:'/my/quotes',},[{content:"open the test SO",trigger:'a:containsExact("test SO")',},{content:"click sign",trigger:'a:contains("Sign")',},{content:"check submit is disabled",trigger:'.o_portal_sign_submit:disabled',run:function(){},},{content:"click Auto",trigger:'.o_web_sign_auto_button',},{content:"check submit is enabled",trigger:'.o_portal_sign_submit:enabled',run:function(){},},{content:"click select style",trigger:'.o_web_sign_auto_select_style a',},{content:"click style 4",trigger:'.o_web_sign_auto_font_selection a:eq(3)',},{content:"click submit",trigger:'.o_portal_sign_submit:enabled',},{content:"check it's confirmed",trigger:'#quote_content:contains("Thank You")',},]);});;
  116.  
  117. /* /website_forum/static/tests/tours/website_forum_question.js defined in bundle 'web.assets_tests' */
  118. odoo.define('website_forum.tour_forum_question',function(require){'use strict';var tour=require("web_tour.tour");tour.register('forum_question',{test:true,url:'/forum/help-1',},[{content:"Ask the question in this forum by clicking on the button.",trigger:'.btn-lg.btn-block',},{content:"Give your question content.",trigger:'input[name=post_name]',run:'text First Question Title',},{content:"Put your question here.",extra_trigger:"#wrap:not(:has(input[name=post_name]:propValue('')))",trigger:'.note-editable p',run:'text First Question',},{content:"Insert tags related to your question.",extra_trigger:'.note-editable:not(:has(br))',trigger:'.select2-choices',run:'text Tag',},{content:"Click to post your question.",extra_trigger:"#wrap:not(:has(input[id=s2id_autogen2]:propValue('')))",trigger:'button:contains("Post Your Question")',},{content:"This page contain new created question.",extra_trigger:'#wrap:has(".fa-star")',trigger:'button[data-dismiss="modal"]',},{content:"Put your answer here.",trigger:'.note-editable p',run:'text First Answer',},{content:"Click to post your answer.",extra_trigger:'.note-editable:not(:has(br))',trigger:'button:contains("Post Answer")',},{content:"This page contain new created question and its answer.",extra_trigger:'#wrap:has(".fa-check-circle")',trigger:'button[data-dismiss="modal"]',},{content:"Click here to accept this answer.",trigger:'a[data-karma="20"]:first',},{content:"Congratulations! You just created and post your first question and answer.",trigger:'#wrap:has(".oe_answer_true")',}]);});;
  119.  
  120. /* /hr_contract_salary/static/tests/tours/hr_contract_salary.js defined in bundle 'web.assets_tests' */
  121. odoo.define('hr_contract_salary.tour',function(require){'use strict';var Tour=require('web_tour.tour');Tour.register('hr_contract_salary_tour',{test:true,url:'/',wait_for:Promise.resolve(odoo.__TipTemplateDef)},[{content:"Go on configurator",trigger:'nav.o_main_navbar',run:function(){window.location.href=window.location.origin+'/web';},},{content:"Log into Belgian Company",trigger:'.o_menu_systray .o_switch_company_menu > a',run:'click',},{content:"Log into Belgian Company",trigger:".o_menu_systray .o_switch_company_menu .dropdown-item span:contains('Belgian')",run:'click',},{content:"Recruitment",trigger:'a[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]',extra_trigger:".o_menu_systray .o_switch_company_menu > a > span:contains('Belgian')",run:'click',},{content:"Create Job Position",trigger:'div.o_cp_buttons .o-kanban-button-new',run:'click',},{content:"Job\'s Name",trigger:"div.modal-dialog input[name='name']",run:'text Experienced Developer (BE)',},{content:"Job\'s Name",trigger:"div.modal-dialog button[name='close_dialog']",run:'click',},{content:"Select Experienced Developer",trigger:".o_kanban_record:contains('Experienced Developer')",run:'click',},{content:"Create Applicant",trigger:'.o_cp_buttons .o-kanban-button-new',extra_trigger:'li.active:contains("Applications")',run:'click',},{content:"Application Name",trigger:'.oe_title input[name="name"]',run:"text Mitchell's Application",},{content:"Applicant\'s Name",trigger:'.oe_title input[name="partner_name"]',run:'text Mitchell Admin',},{content:"Applicant Contact",trigger:'.o_field_widget.o_field_many2one[name=partner_id]',run:function(actions){actions.text("Mitchell",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains(Mitchell)",auto:true,},{content:"Create Employee",trigger:".o_statusbar_buttons > button[name='create_employee_from_applicant']",extra_trigger:".o_statusbar_buttons",run:'click',},{content:"Add Manager",trigger:".nav-link:contains('Work Information')",run:'click',},{content:"Manager",trigger:'.o_field_widget.o_field_many2one[name=parent_id]',run:function(actions){actions.text("Mitchell",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains(Mitchell)",auto:true,},{content:"Save",trigger:'.o_form_buttons_edit .o_form_button_save',extra_trigger:'.o_form_statusbar .o_statusbar_buttons:contains("Launch Plan")',run:'click',},{content:"Create Contract",trigger:'.oe_button_box .oe_stat_button:contains("Contracts")',extra_trigger:'.o_cp_buttons .btn-primary.o_form_button_edit',run:'click',},{content:"Create",trigger:'.o_cp_buttons .o-kanban-button-new',extra_trigger:'li.active:contains("Contracts")',run:'click',},{content:"Contract Reference",trigger:'.oe_title input[name="name"]',run:'text Mitchell Admin PFI Contract',},{content:"Salary Structure Type",trigger:'.o_field_widget.o_field_many2one[name=structure_type_id]',run:function(actions){actions.text("CP200",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains('Belgian Employee')",auto:true,},{content:"HR Responsible",trigger:'.o_field_widget.o_field_many2one[name=hr_responsible_id]',run:function(actions){actions.text("Marc Demo",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains('Marc Demo')",auto:true,},{content:"Contract Update Template",trigger:'.o_field_widget.o_field_many2one[name=contract_update_template_id]',run:function(actions){actions.text("CDI",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains('CDI - Experienced Developer')",auto:true,},{content:"Contract Information",trigger:".o_content .o_form_view .o_notebook li.nav-item:eq(1) a",run:"click",},{content:"Contract Information",trigger:"div.o_input[name='wage'] input",run:"text 2950",},{content:"Contract Information",trigger:"div.o_input[name='fuel_card'] input",run:"text 250",},{content:"Contract Information",trigger:"div.o_input[name='commission_on_target'] input",run:"text 1000",},{content:"Contract Information",trigger:"div.o_field_boolean[name='transport_mode_car'] input",run:"click",},{content:"Contract Information",trigger:'.o_field_widget.o_field_many2one[name=car_id]',run:function(actions){actions.text("JFC",this.$anchor.find("input"));},},{trigger:".ui-autocomplete > li > a:contains('1-JFC-095')",auto:true,},{content:"Contract Information",trigger:"input.o_input[name='ip_wage_rate']",run:"text 25",},{content:"Contract Information",trigger:"div.o_field_boolean[name='ip'] input",run:"click",},{content:"Generate Simulation Link",trigger:".o_statusbar_buttons > button.btn-primary span:contains('Simulation')",extra_trigger:".o_statusbar_buttons",run:'click',},{content:"Send Offer",trigger:"button[name='send_offer']",run:'click',},{content:"Send Offer",trigger:"button[name='action_send_mail']",run:'click',},{content:"Go on configurator",trigger:'.o_mail_thread .o_thread_message:eq(0) a',run:function(){var simulation_link=$(".o_mail_thread .o_thread_message:eq(0) a")[0].href;var regex='/salary_package/simulation/.*';var url=simulation_link.match(regex)[0];window.location.href=window.location.origin+url;},},{content:"BirthDate",trigger:'input[name="birthdate"]',run:function(){$("input[name='birthdate']").val('2017-09-01');},},{content:"National Identification Number",trigger:'input[name="identification_id"]',run:'text 11.11.11-111.11',},{content:"Street",trigger:'input[name="street"]',run:'text Rue des Wallons',},{content:"City",trigger:'input[name="city"]',run:'text Louvain-la-Neuve',},{content:"Zip Code",trigger:'input[name="zip"]',run:'text 1348',},{content:"Email",trigger:'input[name="email"]',run:'text mitchell.stephen@example.com',},{content:"Phone Number",trigger:'input[name="phone"]',run:'text 1234567890',},{content:"Phone Number",trigger:'input[name="place_of_birth"]',run:'text Brussels',},{content:"KM Home/Work",trigger:'input[name="km_home_work"]',run:'text 75',},{content:"School",trigger:'input[name="study_school"]',run:'text UCL',},{content:"School Level",trigger:'input[name="study_field"]',run:'text Civil Engineering, Applied Mathematics',},{content:"Bank Account",trigger:'input[name="bank_account"]',run:'text BE10 3631 0709 4104',},{content:"Bank Account",trigger:'input[name="emergency_contact"]',run:'text Batman',},{content:"Bank Account",trigger:'input[name="emergency_phone"]',run:'text +32 2 290 34 90',},{content:"Nationality",trigger:'label[for=country_id]',run:function(){$('select[name=country_id] option:contains(Belgium)').prop('selected',true);$('select[name=country_id]').trigger('change');},},{content:"Country of Birth",trigger:'label[for=country_of_birth]',run:function(){$('select[name=country_of_birth] option:contains(Belgium)').prop('selected',true);$('select[name=country_of_birth]').trigger('change');},},{content:"Country",trigger:'label[for=country]',run:function(){$('select[name=country] option:contains(Belgium)').prop('selected',true);$('select[name=country]').trigger('change');},},{content:"submit",trigger:'button#hr_cs_submit',run:'click',},{content:"Next",trigger:'iframe .o_sign_sign_item_navigator',run:'click',},{content:"Type Date",trigger:'iframe input.ui-selected',run:'text 17/09/2018',},{content:"Next",trigger:'iframe .o_sign_sign_item_navigator',run:'click',},{content:"Type Number",trigger:'iframe input.ui-selected',run:'text 58/4',},{content:"Next",trigger:'iframe .o_sign_sign_item_navigator',run:'click',},{content:"Click Signature",trigger:'iframe button.o_sign_sign_item',run:'click',},{content:"Adopt and Sign",trigger:'footer.modal-footer button.btn-primary:enabled',run:'click',},{content:"Wait modal closed",trigger:'iframe body:not(:has(footer.modal-footer button.btn-primary))',run:function(){},},{content:"Next",trigger:'iframe .o_sign_sign_item_navigator:contains("next")',run:'click',},{content:"Type Date",trigger:'iframe input.ui-selected',run:'text 17/09/2018',},{content:"Validate and Sign",trigger:".o_sign_validate_banner button",run:'click',},{content:"Go on configurator",trigger:'nav.o_main_navbar',run:function(){window.location.href=window.location.origin+'/web';},},]);});;
  122.  
  123. /* /sale_product_configurator/static/tests/tours/product_configurator_ui.js defined in bundle 'web.assets_tests' */
  124. odoo.define('sale.product_configurator_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('sale_product_configurator_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:"a:contains('Add a product')",},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Custo');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Customizable Desk")',run:'click'},{trigger:'.configurator_container span:contains("Steel")',run:function(){$('input.product_id').change(function(){$('.o_sale_product_configurator_add').attr('request_count',1);});}},{trigger:'.configurator_container span:contains("Aluminium")',run:'click'},{trigger:'span.oe_currency_value:contains("800.40")',run:function(){}},{trigger:'.o_sale_product_configurator_add[request_count="1"]',run:function(){}},{trigger:'.o_sale_product_configurator_add:not(.disabled)'},{trigger:'span:contains("Aluminium")',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'.js_product:has(strong:contains(Conference Chair)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Conference Chair))',run:'click'},{trigger:'.js_product:has(strong:contains(Chair floor protection)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Chair floor protection))',run:'click'},{trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',id:"quotation_product_selected",run:'click'},{trigger:'td.o_data_cell:contains("Customizable Desk (Aluminium, White)")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("Conference Chair (Aluminium)")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("Chair floor protection")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'.o_readonly_modifier[name=amount_total]:contains("0.00")',in_modal:false,run:function(){}}]);});;
  125.  
  126. /* /sale_product_configurator/static/tests/tours/product_configurator_advanced_ui.js defined in bundle 'web.assets_tests' */
  127. odoo.define('sale.sale_product_configurator_advanced_tour',function(require){"use strict";var tour=require('web_tour.tour');var optionVariantImage;tour.register('sale_product_configurator_advanced_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:".o_required_modifier[name=partner_id] input",run:"text Tajine Saucisse",},{trigger:".ui-menu-item > a:contains('Tajine Saucisse')",auto:true,},{trigger:"a:contains('Add a product')",extra_trigger:".o_field_widget[name=pricelist_id] > .o_external_button",},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Custo');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Customizable Desk")',run:'click'},{trigger:'span:contains("Custom")',extra_trigger:'.o_product_configurator',run:'click'},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(1) .variant_custom_value',extra_trigger:'.o_product_configurator',run:'text Custom 1'},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(3) span:contains("PAV9")',extra_trigger:'.o_product_configurator',run:'click'},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(3) .variant_custom_value',extra_trigger:'.o_product_configurator',run:'text Custom 2'},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(4) span:contains("PAV5")',extra_trigger:'.o_product_configurator',run:'click'},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(6) select ',extra_trigger:'.o_product_configurator',run:function(){var inputValue=$('.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(6) option[data-value_name="PAV9"]').val();$('.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(6) select').val(inputValue);$('.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(6) select').trigger('change');}},{trigger:'.o_product_configurator ul.js_add_cart_variants li[data-attribute_id]:nth-child(6) .variant_custom_value',extra_trigger:'.o_product_configurator',run:'text Custom 3'},{trigger:".o_sale_product_configurator_add",run:'click'},{trigger:'.main_product strong:contains("Custom, White, PAV9, PAV5, PAV1")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("Custom: Custom 1")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("PAV9: Custom 2")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("PAV9: Custom 3")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("PA5: PAV1")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("PA5: PAV1")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.main_product div:contains("PA8: PAV1")',extra_trigger:'.oe_optional_products_modal',run:function(){}},{trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("Conference Chair (Steel)")',run:function(){optionVariantImage=$('.oe_optional_products_modal .js_product:eq(1) img.variant_image').attr('src');}},{trigger:'.oe_optional_products_modal .js_product:eq(1) input[data-value_name="Aluminium"]',},{trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("Conference Chair (Aluminium)")',run:function(){var newVariantImage=$('.oe_optional_products_modal .js_product:eq(1) img.variant_image').attr('src');if(newVariantImage!==optionVariantImage){$('<p>').text('image variant option src changed').insertAfter('.oe_optional_products_modal .js_product:eq(1) .product-name');}}},{extra_trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("image variant option src changed")',trigger:'.oe_optional_products_modal .js_product:eq(1) input[data-value_name="Steel"]',},{trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'td.o_data_cell:contains("Customizable Desk (Custom, White, PAV9, PAV5, PAV1)")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("Custom: Custom 1")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("PAV9: Custom 2")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("PAV9: Custom 3")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("PA5: PAV1")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("PA5: PAV1")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}},{trigger:'td.o_data_cell:contains("PA8: PAV1")',extra_trigger:'div[name="order_line"]',in_modal:false,run:function(){}}]);});;
  128.  
  129. /* /sale_product_configurator/static/tests/tours/product_configurator_edition_ui.js defined in bundle 'web.assets_tests' */
  130. odoo.define('sale.product_configurator_edition_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('sale_product_configurator_edition_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:"a:contains('Add a product')"},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Custo');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Customizable Desk")',run:'click'},{trigger:'.configurator_container span:contains("Steel")',run:function(){$('input.product_id').change(function(){$('.o_sale_product_configurator_add').attr('request_count',1);});}},{trigger:'.configurator_container span:contains("Aluminium")'},{trigger:'.o_sale_product_configurator_add[request_count="1"]',run:function(){}},{trigger:'.o_sale_product_configurator_add:not(.disabled)'},{trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'td.o_data_cell:contains("Customizable Desk (Aluminium, White)")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'td.o_product_configurator_cell',},{trigger:'.o_edit_product_configuration',},{trigger:'.configurator_container li.js_attribute_value:has(span:contains("Aluminium")) input:checked',run:function(){}},{trigger:'span.oe_currency_value:contains("800")',run:function(){}},{trigger:'.configurator_container span:contains("Steel")',run:function(){$('input.product_id').change(function(){if($('.o_sale_product_configurator_edit').attr('request_count')){$('.o_sale_product_configurator_edit').attr('request_count',parseInt($('.o_sale_product_configurator_edit').attr('request_count'))+1);}else{$('.o_sale_product_configurator_edit').attr('request_count',1);}});}},{trigger:'.configurator_container span:contains("Custom")',run:function(){$('.configurator_container span:contains("Custom")').click();}},{trigger:'.configurator_container .variant_custom_value',run:'text nice custom value'},{trigger:'input[data-value_name="Black"]',run:'click'},{trigger:'.o_sale_product_configurator_edit[request_count="2"]',run:function(){}},{trigger:'.o_sale_product_configurator_edit',},{trigger:'td.o_data_cell:contains("Customizable Desk (Custom, Black)")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'td.o_data_cell:contains("Custom: nice custom value")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'td.o_product_configurator_cell',},{trigger:'.o_edit_product_configuration',},{trigger:'.configurator_container .variant_custom_value',run:'text another nice custom value'},{trigger:'.o_sale_product_configurator_edit',},{trigger:'td.o_data_cell:contains("Custom: another nice custom value")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'td.o_product_configurator_cell',},{trigger:'.o_edit_product_configuration',},{trigger:'.configurator_container span:contains("Steel")',run:function(){$('input.product_id').change(function(){$('.o_sale_product_configurator_edit').attr('request_count',1);});}},{trigger:'.configurator_container span:contains("Steel")',run:function(){$('.configurator_container span:contains("Steel")').click();}},{trigger:'.o_sale_product_configurator_edit[request_count="1"]',run:function(){}},{trigger:'.configurator_container button.js_add_cart_json:has(.fa-plus)',},{trigger:'.o_sale_product_configurator_edit',},{trigger:'td.o_data_cell:contains("2.000")',run:function(){}},{trigger:'td.o_product_configurator_cell',run:function(){if($('td.o_data_cell:contains("Custom: another nice custom value")').length===0){$('td.o_data_cell:contains("Customizable Desk (Steel, Black)")').html('tour success');}}},{trigger:'td.o_data_cell:contains("tour success")',extra_trigger:'div[name="order_line"]',run:function(){}}]);});;
  131.  
  132. /* /sale_product_configurator/static/tests/tours/product_configurator_single_custom_attribute_ui.js defined in bundle 'web.assets_tests' */
  133. odoo.define('sale.product_configurator_single_custom_attribute_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('sale_product_configurator_single_custom_attribute_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:"a:contains('Add a product')"},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Custo');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Customizable Desk")',run:'click'},{trigger:'.configurator_container span:contains("Aluminium")',run:function(){if($('.configurator_container ul[data-attribute_id].d-none input[data-value_name="single product attribute value"]').length===1){$('.configurator_container').addClass('tour_success');}}},{trigger:'.configurator_container.tour_success',run:function(){}},{trigger:'.configurator_container .variant_custom_value',run:'text great single custom value'},{trigger:'.o_sale_product_configurator_add',},{trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'td.o_data_cell:contains("single product attribute value: great single custom value")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'td.o_product_configurator_cell',},{trigger:'.o_edit_product_configuration',},{trigger:'.configurator_container .variant_custom_value',run:function(){if($('.configurator_container .variant_custom_value').val()==="great single custom value"){$('.configurator_container').addClass('tour_success_2');}}},{trigger:'.configurator_container.tour_success_2',run:function(){}}]);});;
  134.  
  135. /* /sale_product_configurator/static/tests/tours/product_configurator_pricelist_ui.js defined in bundle 'web.assets_tests' */
  136. odoo.define('sale.product_configurator_pricelist_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('sale_product_configurator_pricelist_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{content:"navigate to the sale app",trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{content:"navigate to the sale app",trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{content:"create a new order",trigger:'.o_list_button_add',extra_trigger:".o_sale_order"},{content:"search the partner",trigger:'div[name="partner_id"] input',run:'text Azure'},{content:"select the partner",trigger:'ul.ui-autocomplete > li > a:contains(Azure)',},{content:"search the pricelist",trigger:'div[name="pricelist_id"] input',run:'text Public Pricelist'},{content:"select the pricelist",trigger:'ul.ui-autocomplete > li > a:contains(Public Pricelist)',},{content:"wait for pricelist to be set",trigger:'div.o_with_button[name="pricelist_id"]',run:function(){},},{trigger:"a:contains('Add a product')"},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Custo');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Customizable Desk")',run:'click'},{content:"check price is correct (USD)",trigger:'span.oe_currency_value:contains("750.00")',run:function(){}},{content:"add one more",trigger:'button.js_add_cart_json:has(i.fa-plus)',},{content:"check price for 2",trigger:'span.oe_currency_value:contains("600.00")',run:function(){}},{content:"click add",trigger:'.o_sale_product_configurator_add:not(.disabled)'},{content:"check we are on the add modal",trigger:'.td-product_name:contains("Customizable Desk (Steel, White)")',extra_trigger:'.oe_optional_products_modal',run:'click'},{content:"add conference chair",trigger:'.js_product:has(strong:contains(Conference Chair)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Conference Chair))',run:'click'},{content:"add chair floor protection",trigger:'.js_product:has(strong:contains(Chair floor protection)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Chair floor protection))',run:'click'},{content:"verify configurator final price",trigger:'.o_total_row .oe_currency_value:contains("1,257.00")',},{content:"add to SO",trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',run:'click'},{content:"verify SO final price excluded",trigger:'span[name="amount_untaxed"]:contains("1,257.00")',},{content:"verify SO final price included",trigger:'span[name="amount_total"]:contains("1,437.00")',}]);});;
  137.  
  138. /* /sale_product_configurator/static/tests/tours/product_configurator_optional_products_ui.js defined in bundle 'web.assets_tests' */
  139. odoo.define('sale.product_configurator_optional_products_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('sale_product_configurator_optional_products_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:"a:contains('Add a product')"},{trigger:'div[name="product_template_id"] input',run:function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('Office Chair Black');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);}},{trigger:'ul.ui-autocomplete a:contains("Office Chair Black")',run:'click'},{trigger:'.js_add'},{trigger:'.js_add_cart_json .fa-plus'},{trigger:'button span:contains(Confirm)',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'tr:has(td.o_data_cell:contains("Office Chair Black")) td.o_data_cell:contains("2.0")',extra_trigger:'div[name="order_line"]',run:function(){}},{trigger:'tr:has(td.o_data_cell:contains("Chair floor protection")) td.o_data_cell:contains("2.0")',extra_trigger:'div[name="order_line"]',run:function(){}}]);});;
  140.  
  141. /* /website_sale/static/tests/tours/website_sale_buy.js defined in bundle 'web.assets_tests' */
  142. odoo.define('website_sale.tour',function(require){'use strict';var tour=require("web_tour.tour");tour.register('shop_buy_product',{test:true,url:'/shop',},[{content:"search conference chair",trigger:'form input[name="search"]',run:"text conference chair",},{content:"search conference chair",trigger:'form:has(input[name="search"]) .oe_search_button',},{content:"select conference chair",trigger:'.oe_product_cart:first a:contains("Conference Chair")',},{content:"select Conference Chair Aluminium",extra_trigger:'#product_detail',trigger:'label:contains(Aluminium) input',},{content:"select Conference Chair Steel",extra_trigger:'#product_detail',trigger:'label:contains(Steel) input',},{id:'add_cart_step',content:"click on add to cart",extra_trigger:'label:contains(Steel) input:propChecked',trigger:'#product_detail form[action^="/shop/cart/update"] .btn-primary',},{content:"add suggested",extra_trigger:'#wrap:not(:has(#cart_products:contains("Storage Box")))',trigger:'.oe_cart:has(tr:contains("Storage Box")) a:contains("Add to Cart")',},{content:"add one more",extra_trigger:'#cart_products tr:contains("Storage Box")',trigger:'#cart_products tr:contains("Steel") a.js_add_cart_json:eq(1)',},{content:"remove Storage Box",extra_trigger:'#cart_products tr:contains("Steel") input.js_quantity:propValue(2)',trigger:'#cart_products tr:contains("Storage Box") a.js_add_cart_json:first',},{content:"set one",extra_trigger:'#wrap:not(:has(#cart_products tr:contains("Storage Box")))',trigger:'#cart_products input.js_quantity',run:'text 1',},{content:"go to checkout",extra_trigger:'#cart_products input.js_quantity:propValue(1)',trigger:'a[href*="/shop/checkout"]',},{content:"select payment",trigger:'#payment_method label:contains("Wire Transfer")',},{content:"Pay Now",extra_trigger:'#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',trigger:'button[id="o_payment_form_pay"]:visible:not(:disabled)',},{content:"finish",trigger:'.oe_website_sale:contains("Pending... The order will be validated after the payment.")',timeout:30000,}]);});;
  143.  
  144. /* /website_sale/static/tests/tours/website_sale_complete_flow.js defined in bundle 'web.assets_tests' */
  145. odoo.define('website_sale_tour.tour',function(require){'use strict';var ajax=require('web.ajax');var tour=require("web_tour.tour");var rpc=require("web.rpc");tour.register('website_sale_tour',{test:true,url:'/',},[{content:"Configuration Settings for 'Free Sign Up' and 'Tax-Excluded'",trigger:'#wrapwrap',run:function(){var taxDef=$.Deferred();ajax.jsonRpc('/web/dataset/call','call',{model:'product.template',method:'search',args:[[['name','=','Storage Box']]],}).then(function(productId){return ajax.jsonRpc('/web/dataset/call','call',{model:'account.tax.group',method:'create',args:[{'name':'Tax 15%',}],}).then(function(taxGroupId){return ajax.jsonRpc('/web/dataset/call','call',{model:'account.tax',method:'create',args:[{'name':'Tax 15%','amount':15,'type_tax_use':'sale','tax_group_id':taxGroupId,}],}).then(function(taxId){return ajax.jsonRpc('/web/dataset/call','call',{model:'product.template',method:'write',args:[productId,{'taxes_id':[[4,taxId]],}],}).then(function(){taxDef.resolve();});});});});var def1=rpc.query({model:'res.config.settings',method:'create',args:[{'auth_signup_uninvited':'b2c','show_line_subtotals_tax_selection':'tax_excluded','group_show_line_subtotals_tax_excluded':true,'group_show_line_subtotals_tax_included':false,}],});var def2=def1.then(function(resId){return rpc.query({model:'res.config.settings',method:'execute',args:[[resId]],});});return Promise.all([taxDef,def2]).then(function(res){window.location.href='/web/session/logout?redirect=/shop?search=Storage Box';});},},{content:"Open product page",trigger:'.oe_product_cart a:contains("Storage Box")',},{content:"Add one more storage box",trigger:'.js_add_cart_json:eq(1)',},{content:"Check b2b Tax-Excluded Prices",trigger:'.product_price .oe_price .oe_currency_value:containsExact(79.00)',run:function(){},},{content:"Click on add to cart",trigger:'#add_to_cart',},{content:"Check for 2 products in cart and proceed to checkout",extra_trigger:'#cart_products tr:contains("Storage Box") input.js_quantity:propValue(2)',trigger:'a[href*="/shop/checkout"]',},{content:"Check Price b2b subtotal",trigger:'tr#order_total_untaxed .oe_currency_value:containsExact(158.00)',run:function(){},},{content:"Check Price b2b Sale Tax(15%)",trigger:'tr#order_total_taxes .oe_currency_value:containsExact(23.70)',run:function(){},},{content:"Check Price b2b Total amount",trigger:'tr#order_total .oe_currency_value:containsExact(181.70)',run:function(){},},{content:"Fulfill billing address form",trigger:'select[name="country_id"]',run:function(){$('input[name="name"]').val('abc');$('input[name="phone"]').val('99999999');$('input[name="email"]').val('abc@odoo.com');$('input[name="street"]').val('SO1 Billing Street, 33');$('input[name="city"]').val('SO1BillingCity');$('#country_id option:eq(1)').attr('selected',true);},},{content:"Shipping address is not same as billing address",trigger:'#shipping_use_same',},{content:"Click on next button",trigger:'.oe_cart .btn:contains("Next")',},{content:"Fulfill shipping address form",trigger:'select[name="country_id"]',extra_trigger:'h2:contains("Shipping Address")',run:function(){$('input[name="name"]').val('def');$('input[name="phone"]').val('8888888888');$('input[name="street"]').val('17, SO1 Shipping Road');$('input[name="city"]').val('SO1ShippingCity');$('#country_id option:eq(1)').attr('selected',true);},},{content:"Click on next button",trigger:'.oe_cart .btn:contains("Next")',},{content:"Check selected billing address is same as typed in previous step",trigger:'#shipping_and_billing:contains(SO1 Billing Street, 33):contains(SO1BillingCity):contains(Afghanistan)',run:function(){},},{content:"Check selected shipping address is same as typed in previous step",trigger:'#shipping_and_billing:contains(17, SO1 Shipping Road):contains(SO1ShippingCity):contains(Afghanistan)',run:function(){},},{content:"Click for edit address",trigger:'a:contains("Edit") i',},{content:"Click for edit billing address",trigger:'.js_edit_address:first',},{content:"Change billing address form",trigger:'select[name="country_id"]',extra_trigger:'h2:contains("Your Address")',run:function(){$('input[name="name"]').val('abcd');$('input[name="phone"]').val('11111111');$('input[name="street"]').val('SO1 Billing Street Edited, 33');$('input[name="city"]').val('SO1BillingCityEdited');},},{content:"Click on next button",trigger:'.oe_cart .btn:contains("Next")',},{content:"Confirm Address",trigger:'a.btn:contains("Confirm")',},{content:"Check selected billing address is same as typed in previous step",trigger:'#shipping_and_billing:contains(SO1 Billing Street Edited, 33):contains(SO1BillingCityEdited):contains(Afghanistan)',run:function(){},},{content:"Select `Wire Transfer` payment method",trigger:'#payment_method label:contains("Wire Transfer")',},{content:"Pay Now",extra_trigger:'#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',trigger:'button[id="o_payment_form_pay"]:visible:not(:disabled)',},{content:"Sign up",trigger:'.oe_cart a:contains("Sign Up")',},{content:"Submit login",trigger:'.oe_signup_form',run:function(){$('.oe_signup_form input[name="password"]').val("1admin@admin");$('.oe_signup_form input[name="confirm_password"]').val("1admin@admin");$('.oe_signup_form input[name="redirect"]').val("/my");$('.oe_signup_form').submit();},},{content:"See Quotations",trigger:'.o_portal_docs a:contains("Quotations")',},{content:"Open Dropdown for logout",trigger:'#top_menu li.dropdown:visible a:contains("abcd")',},{content:"Logout",trigger:'#o_logout:contains("Logout")',},{content:"Sign in as admin",trigger:'#top_menu li a b:contains("Sign in")',},{content:"Submit login",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("admin");$('.oe_login_form input[name="password"]').val("admin");$('.oe_login_form input[name="redirect"]').val("/");$('.oe_login_form').submit();},},{content:"Configuration Settings for 'Tax Included' and sign up 'On Invitation'",extra_trigger:'.o_connected_user #wrapwrap',trigger:'#wrapwrap',run:function(){var def1=rpc.query({model:'res.config.settings',method:'create',args:[{'auth_signup_uninvited':'b2b','show_line_subtotals_tax_selection':'tax_included','group_show_line_subtotals_tax_excluded':false,'group_show_line_subtotals_tax_included':true,}],});var def2=def1.then(function(resId){return rpc.query({model:'res.config.settings',method:'execute',args:[[resId]],});});def2.then(function(){window.location.href='/web/session/logout?redirect=/shop?search=Storage Box';});},},{content:"Open product page",trigger:'.oe_product_cart a:contains("Storage Box")',},{content:"Add one more Storage Box",trigger:'.js_add_cart_json:eq(1)',},{content:"Check b2c Tax-Included Prices",trigger:'.product_price .oe_price .oe_currency_value:containsExact(90.85)',run:function(){},},{content:"Click on add to cart",trigger:'#add_to_cart',},{content:"Check for 2 products in cart and proceed to checkout",extra_trigger:'#cart_products tr:contains("Storage Box") input.js_quantity:propValue(2)',trigger:'a[href*="/shop/checkout"]',},{content:"Check Price b2c total",trigger:'tr#order_total_untaxed .oe_currency_value:containsExact(158.00)',run:function(){},},{content:"Check Price b2c Sale Tax(15%)",trigger:'tr#order_total_taxes .oe_currency_value:containsExact(23.70)',run:function(){},},{content:"Check Price b2c Total amount",trigger:'tr#order_total .oe_currency_value:containsExact(181.70)',run:function(){},},{content:"Click on Login Button",trigger:'.oe_cart a.btn:contains("Log In")',},{content:"Submit login",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("abc@odoo.com");$('.oe_login_form input[name="password"]').val("1admin@admin");$('.oe_login_form').submit();},},{content:"Add new shipping address",trigger:'.one_kanban form[action^="/shop/address"] .btn',},{content:"Fulfill shipping address form",trigger:'select[name="country_id"]',run:function(){$('input[name="name"]').val('ghi');$('input[name="phone"]').val('7777777777');$('input[name="street"]').val('SO2New Shipping Street, 5');$('input[name="city"]').val('SO2NewShipping');$('#country_id option:eq(1)').attr('selected',true);},},{content:"Click on next button",trigger:'.oe_cart .btn:contains("Next")',},{content:"Select `Wire Transfer` payment method",trigger:'#payment_method label:contains("Wire Transfer")',},{content:"Pay Now",extra_trigger:'#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',trigger:'button[id="o_payment_form_pay"]:visible:not(:disabled)',},{content:"Open Dropdown for See quotation",extra_trigger:'.oe_cart .oe_website_sale_tx_status',trigger:'#top_menu li.dropdown:visible a:contains("abc")',},{content:"My account",extra_trigger:'#top_menu li.dropdown .js_usermenu.show',trigger:'#top_menu .dropdown-menu a[href="/my/home"]:visible',},{content:"See Quotations",trigger:'.o_portal_docs a:contains("Quotations") .badge:containsExact(2)',},{content:"Open Dropdown for logout",trigger:'#top_menu li.dropdown:visible a:contains("abc")',},{content:"Logout",trigger:'#o_logout:contains("Logout")',},{content:"Sign in as admin",trigger:'#top_menu li a b:contains("Sign in")',},{content:"Submit login",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("admin");$('.oe_login_form input[name="password"]').val("admin");$('.oe_login_form input[name="redirect"]').val("/shop/cart");$('.oe_login_form').submit();},},{content:"Open Customize menu",trigger:'.o_menu_sections a:contains("Customize")',},{content:"Enable Extra step",trigger:'a.dropdown-item label:contains("Extra Step Option")',},{content:"Open Dropdown for logout",extra_trigger:'.progress-wizard-step:contains("Extra Info")',trigger:'#top_menu li.dropdown:visible a:contains("Mitchell Admin")',},{content:"Logout",trigger:'#o_logout:contains("Logout")',},{content:"Sign in as abc",trigger:'#top_menu li a b:contains("Sign in")',},{content:"Submit login",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("abc@odoo.com");$('.oe_login_form input[name="password"]').val("1admin@admin");$('.oe_login_form input[name="redirect"]').val("/shop?search=Storage Box");$('.oe_login_form').submit();},},{content:"Open product page",trigger:'.oe_product_cart a:contains("Storage Box")',},{content:"Click on add to cart",trigger:'#add_to_cart',},{content:"Proceed to checkout",trigger:'a[href*="/shop/checkout"]',},{content:"Click on next button",trigger:'.oe_cart .btn:contains("Next")',},{content:"Check selected billing address is same as typed in previous step",trigger:'#shipping_and_billing:contains(SO1 Billing Street Edited, 33):contains(SO1BillingCityEdited):contains(Afghanistan)',run:function(){},},{content:"Check selected shipping address is same as typed in previous step",trigger:'#shipping_and_billing:contains(SO2New Shipping Street, 5):contains(SO2NewShipping):contains(Afghanistan)',run:function(){},},{content:"Select `Wire Transfer` payment method",trigger:'#payment_method label:contains("Wire Transfer")',},{content:"Pay Now",extra_trigger:'#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',trigger:'button[id="o_payment_form_pay"]:visible',}]);});;
  146.  
  147. /* /website_sale/static/tests/tours/website_sale_shop_cart_recovery.js defined in bundle 'web.assets_tests' */
  148. odoo.define('website_sale.tour_shop_cart_recovery',function(require){'use strict';var localStorage=require('web.local_storage');var rpc=require('web.rpc');var tour=require('web_tour.tour');require('web.dom_ready');var orderIdKey='website_sale.tour_shop_cart_recovery.orderId';var recoveryLinkKey='website_sale.tour_shop_cart_recovery.recoveryLink';tour.register('shop_cart_recovery',{test:true,url:'/shop?search=Acoustic Bloc Screens',},[{content:"select Acoustic Bloc Screens",trigger:'.oe_product_cart a:containsExact("Acoustic Bloc Screens")',},{content:"click add to cart",trigger:'#product_details #add_to_cart',},{content:"check product is in cart, get cart id, logout, go to login",trigger:'td.td-product_name:contains("Acoustic Bloc Screens")',run:function(){rpc.query({'model':'website','method':'sale_get_order','args':[[$('html').data('website-id')]],}).then(function(data){var orderId=parseInt(data.match(/sale\.order\((\d+),\)/)[1]);localStorage.setItem(orderIdKey,orderId);window.location.href="/web/session/logout?redirect=/web/login";});},},{content:"login as admin and go to the SO (backend)",trigger:'.oe_login_form',run:function(){var orderId=localStorage.getItem(orderIdKey);var url="/web#action=sale.action_orders&view_type=form&id="+orderId;var $loginForm=$('.oe_login_form');$loginForm.find('input[name="login"]').val("admin");$loginForm.find('input[name="password"]').val("admin");$loginForm.find('input[name="redirect"]').val(url);$loginForm.submit();},},{content:"click action",trigger:'.btn:containsExact("Action")',},{content:"click Send a Cart Recovery Email",trigger:'a:containsExact("Send a Cart Recovery Email")',},{content:"click Send email",trigger:'.btn[name="action_send_mail"]',},{content:"check the mail is sent, grab the recovery link, and logout",trigger:'.o_thread_message_content a:containsExact("Resume order")',run:function(){var link=$('.o_thread_message_content a:containsExact("Resume order")').attr('href');localStorage.setItem(recoveryLinkKey,link);window.location.href="/web/session/logout?redirect=/";}},{content:"go to the recovery link",trigger:'a[href="/web/login"]',run:function(){window.location.href=localStorage.getItem(recoveryLinkKey);},},{content:"check the page is working, click on restore",extra_trigger:'p:contains("This is your current cart")',trigger:'p:contains("restore") a:contains("Click here")',},{content:"check product is in restored cart",trigger:'td.td-product_name:contains("Acoustic Bloc Screens")',run:function(){},},]);});;
  149.  
  150. /* /website_sale/static/tests/tours/website_sale_shop_mail.js defined in bundle 'web.assets_tests' */
  151. odoo.define('website_sale.tour_shop_mail',function(require){'use strict';var rpc=require('web.rpc');var tour=require('web_tour.tour');require('web.dom_ready');tour.register('shop_mail',{test:true,url:'/',},[{content:"Change the domain of the websites and go to shop",trigger:'body',run:function(){var def1=rpc.query({'model':'website','method':'write','args':[[1],{'domain':"my-test-domain.com",}],});var def2=rpc.query({'model':'website','method':'write','args':[[2],{'domain':"https://domain-not-used.fr",}],});Promise.all([def1,def2]).then(function(data){window.location.href='/shop?search=Acoustic Bloc Screens';});},},{content:"select Acoustic Bloc Screens",trigger:'.oe_product_cart a:containsExact("Acoustic Bloc Screens")',},{content:"click add to cart",trigger:'#product_details #add_to_cart',},{content:"check product is in cart, get cart id, go to backend",trigger:'td.td-product_name:contains("Acoustic Bloc Screens")',run:function(){rpc.query({'model':'website','method':'sale_get_order','args':[[$('html').data('website-id')]],}).then(function(data){var orderId=parseInt(data.match(/sale\.order\((\d+),\)/)[1]);window.location.href="/web#action=sale.action_orders&view_type=form&id="+orderId;});},},{content:"click confirm",trigger:'.btn[name="action_confirm"]',},{content:"click send by email",trigger:'.btn[name="action_quotation_send"]',extra_trigger:'.o_statusbar_status .btn-primary:contains("Sales Order")',},{content:"Open recipients dropdown",trigger:'.o_field_many2one[name="partner_ids"] .ui-autocomplete-input',run:'click',},{content:"Select azure interior",trigger:'.ui-menu-item a:contains(Interior24)',in_modal:false,},{content:"click Send email",trigger:'.btn[name="action_send_mail"]',extra_trigger:'.o_badge_text:contains("Azure")',},{content:"wait mail to be sent, and go see it",trigger:'.o_thread_message_content:contains("Your"):contains("order")',run:function(){window.location.href="/web#action=mail.action_view_mail_mail&view_type=list";},},{content:"click on the first email",trigger:'.o_data_cell:contains("(Ref SO")',},{content:"check it's the correct email, and the URL is correct too",trigger:'div.oe_form_field_html[name="body_html"] p:contains("Your"):contains("order")',extra_trigger:'div.oe_form_field_html[name="body_html"] a[href^="http://my-test-domain.com"]',},]);});;
  152.  
  153. /* /website_sale/static/tests/tours/website_sale_shop_customize.js defined in bundle 'web.assets_tests' */
  154. odoo.define('website_sale.tour_shop_customize',function(require){'use strict';var tour=require("web_tour.tour");tour.register('shop_customize',{test:true,url:'/shop',},[{content:"open customize menu",trigger:'#customize-menu > a',},{content:"click on 'Product Attribute's Filters'",trigger:"#customize-menu a:contains(Product Attribute's Filters)",},{content:"select product attribute Steel",extra_trigger:'body:not(:has(#customize-menu:visible .dropdown-menu:visible))',trigger:'form.js_attributes label:contains(Steel) input:not(:checked)',},{content:"check the selection",trigger:'form.js_attributes label:contains(Steel) input:checked',run:function(){},},{content:"select product",extra_trigger:'body:not(:has(.oe_website_sale .oe_product_cart:eq(3)))',trigger:'.oe_product_cart a:contains("Test Product")',},{content:"open customize menu",trigger:'#customize-menu',extra_trigger:"#product_detail",run:function(){$('body').addClass('notReady');var ajax=odoo.__DEBUG__.services['web.ajax'];var get_group_payload={model:'ir.model.data',method:'xmlid_to_res_id',args:['product.group_product_variant',false],kwargs:{}};ajax.jsonRpc('/web/dataset/call_kw','call',get_group_payload).then(function(group_id){ajax.jsonRpc('/web/dataset/call_kw','call',{model:'res.groups',method:'write',args:[group_id,{'users':[[4,1]]}],kwargs:{}}).then(function(){location.reload(true);});});},},{content:"open customize menu",trigger:'#customize-menu > a',extra_trigger:'body:not(.notReady)',},{content:"check page loaded after enable  variant group",trigger:'#customize-menu a:contains(List View of Variants)',run:function(){},},{content:"check list view of variants is disabled initially",trigger:'body:not(:has(.js_product_change))',run:function(){},},{content:"click on 'List View of Variants'",trigger:"#customize-menu a:contains(List View of Variants)",},{content:"check page loaded after list of variant customization enabled",trigger:'.js_product_change',run:function(){},},{context:"check variant price",trigger:'.custom-radio:contains("Aluminium") .badge:contains("+") .oe_currency_value:contains("50.4")',run:function(){},},{content:"check price is 750",trigger:".product_price .oe_price .oe_currency_value:containsExact(750.00)",run:function(){},},{content:"switch to another variant",trigger:".js_product label:contains('Aluminium')",},{content:"verify that price has changed when changing variant",trigger:".product_price .oe_price .oe_currency_value:containsExact(800.40)",run:function(){},},{content:"open customize menu",trigger:'#customize-menu > a',},{content:"remove 'List View of Variants'",trigger:"#customize-menu a:contains(List View of Variants):has(input:checked)",},{content:"check page loaded after list of variant customization disabled",trigger:".js_product:not(:has(.js_product_change))",run:function(){},},{content:"check price is 750",trigger:".product_price .oe_price .oe_currency_value:containsExact(750.00)",run:function(){},},{content:"switch to Aluminium variant",trigger:'.js_product input[data-value_name="Aluminium"]',},{content:"verify that price has changed when changing variant",trigger:".product_price .oe_price .oe_currency_value:containsExact(800.40)",run:function(){},},{content:"switch back to Steel variant",trigger:".js_product label:contains('Steel')",},{content:"check price is 750",trigger:".product_price .oe_price .oe_currency_value:containsExact(750.00)",run:function(){},},{content:"click on 'Add to Cart' button",trigger:"a:contains(Add to Cart)",},{content:"check quantity",trigger:'.my_cart_quantity:containsExact(1),.o_extra_menu_items .fa-plus',run:function(){},},{content:"click on shop",trigger:"a:contains(Continue Shopping)",extra_trigger:'body:not(:has(#products_grid_before .js_attributes))',},{content:"open customize menu bis",extra_trigger:'#products_grid_before .js_attributes',trigger:'#customize-menu > a',},{content:"remove 'Product Attribute's Filters'",trigger:"#customize-menu a:contains(Product Attribute's Filters):has(input:checked)",},{content:"finish",extra_trigger:'body:not(:has(#products_grid_before .js_attributes))',trigger:'#wrap:not(:has(li:has(.my_cart_quantity):visible))',run:function(){},},]);});;
  155.  
  156. /* /website_sale/static/tests/tours/website_sale_shop_custom_attribute_value.js defined in bundle 'web.assets_tests' */
  157. odoo.define("website_sale.tour_shop_custom_attribute_value",function(require){"use strict";var tour=require("web_tour.tour");tour.register("shop_custom_attribute_value",{url:"/shop?search=Customizable Desk",test:true,},[{content:"click on Customizable Desk",trigger:'.oe_product_cart a:contains("Customizable Desk")',},{trigger:'li.js_attribute_value span:contains(Custom)',extra_trigger:'li.js_attribute_value',run:'click',},{trigger:'input.variant_custom_value',run:'text Wood',},{id:'add_cart_step',trigger:'a:contains(Add to Cart)',run:'click',},{trigger:'span:contains(Custom: Wood)',extra_trigger:'#cart_products',run:function(){},}]);});;
  158.  
  159. /* /website_sale/static/tests/tours/website_sale_shop_zoom.js defined in bundle 'web.assets_tests' */
  160. odoo.define('website_sale.tour_shop_zoom',function(require){'use strict';var tour=require('web_tour.tour');var imageSelector='#o-carousel-product .carousel-item.active img';var imageName="A Colorful Image";var nameGreen="Forest Green";tour.register('shop_zoom',{test:true,url:'/shop?search='+imageName,},[{content:"select "+imageName,trigger:'.oe_product_cart a:containsExact("'+imageName+'")',},{content:"click on the image",trigger:imageSelector,run:'clicknoleave',},{content:"check there is no zoom on that small image",trigger:'body:not(:has(.zoomodoo-flyout img))',},{content:"change variant",trigger:'input[data-attribute_name="Beautiful Color"][data-value_name="'+nameGreen+'"]',run:'click',},{content:"wait for variant to be loaded",trigger:'.oe_currency_value:contains("21.00")'},{content:"click on the image",trigger:imageSelector,run:'clicknoleave',},{content:"check there is a zoom on that big image",trigger:'.zoomodoo-flyout img',},]);});;
  161.  
  162. /* /website_sale/static/tests/tours/website_sale_shop_dynamic_variants.js defined in bundle 'web.assets_tests' */
  163. odoo.define('website_sale.tour_shop_dynamic_variants',function(require){'use strict';var tour=require('web_tour.tour');tour.register('tour_shop_dynamic_variants',{test:true,url:'/shop?search=Dynamic Product',},[{content:"select Dynamic Product",trigger:'.oe_product_cart a:containsExact("Dynamic Product")',},{content:"click on the second variant",trigger:'input[data-attribute_name="Dynamic Attribute"][data-value_name="Dynamic Value 2"]',},{content:"wait for variant to be loaded",trigger:'.oe_price .oe_currency_value:contains("0.00")',run:function(){},},{content:"click add to cart",extra_trigger:'body:has(input[type="hidden"][name="product_id"][value=0])',trigger:'#add_to_cart',},{content:"check the variant is in the cart",trigger:'td.td-product_name:contains(Dynamic Product (Dynamic Value 2))',},]);});;
  164.  
  165. /* /website_sale/static/tests/tours/website_sale_shop_deleted_archived_variants.js defined in bundle 'web.assets_tests' */
  166. odoo.define('website_sale.tour_shop_deleted_archived_variants',function(require){'use strict';var tour=require('web_tour.tour');tour.register('tour_shop_deleted_archived_variants',{test:true,url:'/shop?search=Test Product 2',},[{content:"check price on /shop (template price)",trigger:'.oe_product_cart .oe_currency_value:contains("1.00")',},{content:"select Test Product 2",trigger:'.oe_product_cart a:containsExact("Test Product 2")',},{content:"check price (3rd variant)",trigger:'.oe_currency_value:contains("31.00")'},{content:"click on the second variant",trigger:'input[data-attribute_name="My Attribute"][data-value_name="My Value 2"]',},{content:"check combination is not possible",trigger:'.js_main_product.css_not_available .css_not_available_msg:contains("This combination does not exist.")'},{content:"click on the 3rd variant to reset the warning",trigger:'input[data-attribute_name="My Attribute"][data-value_name="My Value 3"]',},{content:"check price (3rd variant)",trigger:'.oe_currency_value:contains("31.00")'},{content:"click on the first variant",trigger:'input[data-attribute_name="My Attribute"][data-value_name="My Value 1"]',},{content:"check combination is not possible",trigger:'.js_main_product.css_not_available .css_not_available_msg:contains("This combination does not exist.")'},{content:"check add to cart not possible",trigger:'#add_to_cart.disabled',run:function(){},}]);});;
  167.  
  168. /* /website_sale/static/tests/tours/website_sale_shop_list_view_b2c.js defined in bundle 'web.assets_tests' */
  169. odoo.define('website_sale.tour_shop_list_view_b2c',function(require){'use strict';var rpc=require('web.rpc');var tour=require('web_tour.tour');tour.register('shop_list_view_b2c',{test:true,url:'/shop?search=Test Product',},[{content:"activate b2c",trigger:'body',run:function(){return rpc.query({model:'res.config.settings',method:'create',args:[{'auth_signup_uninvited':'b2c','show_line_subtotals_tax_selection':'tax_included','group_show_line_subtotals_tax_excluded':false,'group_show_line_subtotals_tax_included':true,}],}).then(function(resId){return rpc.query({model:'res.config.settings',method:'execute',args:[[resId]],}).then(function(){window.location.reload();});});},},{content:"check price on /shop",trigger:'.oe_product_cart .oe_currency_value:contains("825.00")',run:function(){},},{content:"select product",trigger:'.oe_product_cart a:contains("Test Product")',},{content:"check list view of variants is disabled initially (when on /product page)",trigger:'body:not(:has(.js_product_change))',extra_trigger:'#product_details',run:function(){},},{content:"open customize menu",trigger:'#customize-menu > a',extra_trigger:'body:not(.notReady)',},{content:"click on 'List View of Variants'",trigger:'#customize-menu a:contains(List View of Variants)',},{content:"check page loaded after list of variant customization enabled",trigger:'.js_product_change',run:function(){},},{context:"check variant price",trigger:'.custom-radio:contains("Aluminium") .badge:contains("+") .oe_currency_value:contains("55.44")',run:function(){},},{content:"check price is 825",trigger:'.product_price .oe_price .oe_currency_value:containsExact("825.00")',run:function(){},},{content:"switch to another variant",trigger:'.js_product label:contains("Aluminium")',},{content:"verify that price has changed when changing variant",trigger:'.product_price .oe_price .oe_currency_value:containsExact("880.44")',run:function(){},},{content:"click on 'Add to Cart' button",trigger:'a:contains(Add to Cart)',},{content:"check price on /cart",trigger:'#cart_products .oe_currency_value:containsExact("880.44")',run:function(){},},]);});;
  170.  
  171. /* /website_sale/static/tests/tours/website_sale_shop_no_variant_attribute.js defined in bundle 'web.assets_tests' */
  172. odoo.define('website_sale.tour_shop_no_variant_attribute',function(require){'use strict';var tour=require('web_tour.tour');tour.register('tour_shop_no_variant_attribute',{test:true,url:'/shop?search=Test Product 3',},[{content:"select Test Product 3",trigger:'.oe_product_cart a:containsExact("Test Product 3")',},{content:"check price",trigger:'.oe_currency_value:contains("1.00")',run:function(){},},{content:"add to cart",trigger:'a:contains(Add to Cart)',},{content:"check no_variant value is present",trigger:'.td-product_name:contains(No Variant Attribute: No Variant Value)',extra_trigger:'#cart_products',run:function(){},},{content:"check price is correct",trigger:'.td-price:contains(11.0)',run:function(){},},]);});;
  173.  
  174. /* /event_sale/static/tests/tours/event_configurator_ui.js defined in bundle 'web.assets_tests' */
  175. odoo.define('event.event_configurator_tour',function(require){"use strict";var tour=require('web_tour.tour');tour.register('event_configurator_tour',{url:"/web",test:true,},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',edition:'enterprise'},{trigger:".o_list_button_add",extra_trigger:".o_sale_order"},{trigger:"a:contains('Add a product')"},{trigger:'div[name="product_id"] input',run:function(){var $input=$('div[name="product_id"] input');$input.click();$input.val('EVENT');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);},id:'product_selection_step'},{trigger:'ul.ui-autocomplete a:contains("EVENT")',run:'click'},{trigger:'div[name="event_id"] input',run:'click'},{trigger:'ul.ui-autocomplete a:contains("Design")',run:'click',in_modal:false},{trigger:'div[name="event_ticket_id"] input',run:'click'},{trigger:'ul.ui-autocomplete a:contains("VIP")',run:'click',in_modal:false},{trigger:'.o_event_sale_js_event_configurator_ok'},{trigger:'textarea[name="name"]',run:function(){var $textarea=$('textarea[name="name"]');if($textarea.val().includes('Design Fair Los Angeles')&&$textarea.val().includes('VIP')){$textarea.addClass('tour_success');}}},{trigger:'textarea[name="name"].tour_success',run:function(){}},{trigger:'ul.nav a:contains("Order Lines")',run:'click'},{trigger:'td:contains("EVENT")',run:'click'},{trigger:'.o_event_sale_js_event_configurator_edit'},{trigger:'div[name="event_ticket_id"] input',run:'click'},{trigger:'ul.ui-autocomplete a:contains("Standard")',run:'click',in_modal:false},{trigger:'.o_event_sale_js_event_configurator_ok'},{trigger:'textarea[name="name"]',run:function(){var $textarea=$('textarea[name="name"]');if($textarea.val().includes('Standard')){$textarea.addClass('tour_success_2');}}},{trigger:'textarea[name="name"].tour_success_2',run:function(){}}]);});;
  176.  
  177. /* /website_sale_product_configurator/static/tests/tours/website_sale_buy.js defined in bundle 'web.assets_tests' */
  178. odoo.define("website_sale_product_configurator.website_sale_tour",function(require){"use strict";var tour=require('web_tour.tour');require('website_sale.tour');var addCartStepIndex=_.findIndex(tour.tours.shop_buy_product.steps,function(step){return(step.id==='add_cart_step');});tour.tours.shop_buy_product.steps.splice(addCartStepIndex+1,0,{content:"click in modal on 'Proceed to checkout' button",trigger:'button:contains("Proceed to Checkout")',});});;
  179.  
  180. /* /website_sale_product_configurator/static/tests/tours/website_sale_shop_custom_attributes_value.js defined in bundle 'web.assets_tests' */
  181. odoo.define("website_sale_product_configurator.tour_shop_custom_attribute_value",function(require){"use strict";var tour=require('web_tour.tour');require('website_sale.tour_shop_custom_attribute_value');var optionVariantImage;var addCartStepIndex=_.findIndex(tour.tours.shop_custom_attribute_value.steps,function(step){return(step.id==='add_cart_step');});tour.tours.shop_custom_attribute_value.steps.splice(addCartStepIndex+1,0,{trigger:'div:contains(Custom: Wood)',extra_trigger:'.js_product.in_cart.main_product',run:function(){}},{trigger:'button.js_add_cart_json:has(i.fa-plus)',run:'click',},{trigger:'div.oe_striked_price span:contains(750)',run:function(){},},{trigger:'span.oe_price span:contains(600)',run:function(){},},{trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("Conference Chair (Steel)")',run:function(){optionVariantImage=$('.oe_optional_products_modal .js_product:eq(1) img.variant_image').attr('src');}},{trigger:'.oe_optional_products_modal .js_product:eq(1) input[data-value_name="Aluminium"]',},{trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("Conference Chair (Aluminium)")',run:function(){var newVariantImage=$('.oe_optional_products_modal .js_product:eq(1) img.variant_image').attr('src');if(newVariantImage!==optionVariantImage){$('<p>').text('image variant option src changed').insertAfter('.oe_optional_products_modal .js_product:eq(1) .product-name');}}},{extra_trigger:'.oe_optional_products_modal .js_product:eq(1) div:contains("image variant option src changed")',trigger:'.oe_optional_products_modal .js_product:eq(1) input[data-value_name="Steel"]',},{trigger:'li.js_attribute_value span:contains(Aluminium)',extra_trigger:'.oe_optional_products_modal',run:'click'},{trigger:'.oe_price span:contains(22.90)',run:function(){},},{trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Conference Chair)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Conference Chair))',run:'click'},{trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Chair floor protection)) .js_add',extra_trigger:'.oe_optional_products_modal .js_product:has(strong:contains(Chair floor protection))',run:'click'},{trigger:'span:contains(1,269.80)',run:function(){},},{trigger:'button:has(span:contains(Proceed to Checkout))',run:'click',});});;
  182.  
  183. /* /website_sale_wishlist/static/tests/tours/website_sale_wishlist.js defined in bundle 'web.assets_tests' */
  184. odoo.define('website_sale_wishlist.tour',function(require){'use strict';var rpc=require('web.rpc');var tour=require("web_tour.tour");tour.register('shop_wishlist',{test:true,url:'/shop',},[{content:"click on add to wishlist",trigger:'.o_add_wishlist',},{content:"go to wishlist",extra_trigger:'a[href="/shop/wishlist"] .badge:contains(1)',trigger:'a[href="/shop/wishlist"]',},{content:"remove first item in whishlist",trigger:'.o_wish_rm:first',},{content:"go back to the store",trigger:"a[href='/shop']"},{content:"click on add to wishlist",trigger:'.o_add_wishlist',},{content:"check value of wishlist and go to login",extra_trigger:".my_wish_quantity:contains(1)",trigger:'a[href="/web/login"]',},{content:"submit login",trigger:".oe_login_form",run:function(){$('.oe_login_form input[name="login"]').val("admin");$('.oe_login_form input[name="password"]').val("admin");$('.oe_login_form input[name="redirect"]').val("/shop");$('.oe_login_form').submit();},},{content:"check that logged in",trigger:"li span:contains('Mitchell Admin')",run:function(){},},{content:"click on Customizable Desk",trigger:'.oe_product_cart a:contains("Customizable Desk")',},{content:"check the first variant is already in wishlist",trigger:'#product_detail .o_add_wishlist_dyn:disabled',run:function(){},},{content:"change variant",extra_trigger:'#product_detail label:contains(Aluminium) input',trigger:'label:contains(Aluminium) input',},{content:"wait button enable and click on add to wishlist",extra_trigger:'#product_detail .o_add_wishlist_dyn:not(:disabled)',trigger:'#product_detail .o_add_wishlist_dyn',},{content:"check that wishlist contains 2 items and go to wishlist",extra_trigger:'a[href="/shop/wishlist"] .badge:contains(2)',trigger:'a[href="/shop/wishlist"]',},{content:"remove Customizable Desk",trigger:'tr:contains("Customizable Desk") .o_wish_rm:first',},{content:"check that wishlist contains 1 item",trigger:".my_wish_quantity:contains(1)",run:function(){},},{content:"check B2B wishlist mode",trigger:"input#b2b_wish",},{content:"add item to cart",trigger:'.o_wish_add:eq(1)',},{content:"check that cart contains 1 item",trigger:".my_cart_quantity:contains(1)",run:function(){},},{content:"check that wishlist contains 1 item",trigger:".my_wish_quantity:contains(1)",run:function(){},},{content:"remove B2B wishlist mode",trigger:"input#b2b_wish",},{content:"add last item to cart",trigger:'.o_wish_add:eq(1)',},{content:"check that user is redirect - wishlist is empty",trigger:"#wrap #cart_products",run:function(){},},{content:"check that cart contains 2 items",trigger:".my_cart_quantity:contains(2)",run:function(){},},{content:"check that wishlist is empty and no more visible",trigger:":not(:has(.my_wish_quantity:visible))",run:function(){},},{content:"Create a product with dynamic attribute and its values.",trigger:'body',run:function(){rpc.query({model:'product.attribute',method:'create',args:[{'name':"color",'type':'color','create_variant':'dynamic'}],}).then(function(attributeId){return rpc.query({model:'product.template',method:'create',args:[{'name':"Bottle",'is_published':true,'attribute_line_ids':[[0,0,{'attribute_id':attributeId,'value_ids':[[0,0,{'name':"red",'attribute_id':attributeId,}],[0,0,{'name':"blue",'attribute_id':attributeId,}],[0,0,{'name':"black",'attribute_id':attributeId,}],]}]],}],});}).then(function(){window.location.href='/web/session/logout?redirect=/shop?search=Bottle';});},},{content:"Add Bottle to wishlist from /shop",extra_trigger:'.oe_product_cart:contains("Bottle")',trigger:'.oe_product_cart:contains("Bottle") .o_add_wishlist',},{content:"Check that wishlist contains 1 item",trigger:'.my_wish_quantity:contains(1)',run:function(){},},{content:"Click on product",extra_trigger:'.oe_product_cart:contains("Bottle") .o_add_wishlist.disabled',trigger:'.oe_product_cart a:contains("Bottle")',},{content:"Select Bottle with second variant from /product",trigger:'.js_variant_change[data-value_name="blue"]',},{content:"Add product in wishlist",extra_trigger:'#product_detail .o_add_wishlist_dyn:not(".disabled")',trigger:'#product_detail .o_add_wishlist_dyn',},{content:"Select Bottle with third variant from /product",trigger:'.js_variant_change[data-value_name="black"]',},{content:"Add product in wishlist",extra_trigger:'#product_detail .o_add_wishlist_dyn:not(".disabled")',trigger:'#product_detail .o_add_wishlist_dyn',},{content:"Check that wishlist contains 3 items and go to wishlist",trigger:'.my_wish_quantity:contains(3)',run:function(){window.location.href='/shop/wishlist';},},{content:"Check wishlist contains first variant",trigger:'#o_comparelist_table tr:contains("red")',run:function(){},},{content:"Check wishlist contains second variant",trigger:'#o_comparelist_table tr:contains("blue")',run:function(){},},{content:"Check wishlist contains third variant, then go to login",trigger:'#o_comparelist_table tr:contains("black")',run:function(){window.location.href="/web/login";},},{content:"Submit login as admin",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("admin");$('.oe_login_form input[name="password"]').val("admin");$('.oe_login_form input[name="redirect"]').val("/");$('.oe_login_form').submit();},},{content:"Archive the first variant",trigger:'#top_menu:contains("Mitchell Admin")',run:function(){rpc.query({model:'product.product',method:'search',args:[[['name','=',"Bottle"]]],}).then(function(productIds){return rpc.query({model:'product.product',method:'write',args:[productIds[0],{active:false}],});}).then(function(){window.location.href='/web/session/logout?redirect=/shop?search=Bottle';});},},{content:"Check there is wishlist button on product from /shop",extra_trigger:'.js_sale',trigger:'.oe_product_cart:contains("Bottle") .o_add_wishlist',run:function(){},},{content:"Click on product",trigger:'.oe_product_cart a:contains("Bottle")',},{content:"Select Bottle with first variant (red) from /product",trigger:'.js_variant_change[data-value_name="red"]',},{content:"Check there is no wishlist button when selecting impossible variant",trigger:'#product_detail:not(:has(.o_add_wishlist))',run:function(){},},{content:"Select Bottle with second variant (blue) from /product",trigger:'.js_variant_change[data-value_name="blue"]',},{content:"Click on wishlist when selecting a possible variant from /product",trigger:'#product_detail .o_add_wishlist_dyn:not(.disabled)',},{content:"Check product added to wishlist and go to login",trigger:'.my_wish_quantity:contains(1)',run:function(){window.location.href="/web/login";},},{content:"Submit login",trigger:'.oe_login_form',run:function(){$('.oe_login_form input[name="login"]').val("admin");$('.oe_login_form input[name="password"]').val("admin");$('.oe_login_form input[name="redirect"]').val("/");$('.oe_login_form').submit();},},{content:"Archive all variants",trigger:'#top_menu:contains("Mitchell Admin")',run:function(){rpc.query({model:'product.product',method:'search',args:[[['name','=',"Bottle"]]],}).then(function(productIds){return rpc.query({model:'product.product',method:'write',args:[productIds,{active:false}],});}).then(function(){window.location.href='/web/session/logout?redirect=/shop?search=Bottle';});}},{content:"Check that there is no wishlist button from /shop",extra_trigger:'.js_sale',trigger:'.oe_product_cart:contains("Bottle"):not(:has(.o_add_wishlist))',run:function(){},},{content:"Click on product",trigger:'.oe_product_cart a:contains("Bottle")',},{content:"Check that there is no wishlist button from /product",trigger:'#product_detail:not(:has(.o_add_wishlist_dyn))',run:function(){},},]);});;
  185.  
  186. /* /event_sale_product_configurator/static/tests/tours/event_configurator_ui.js defined in bundle 'web.assets_tests' */
  187. odoo.define("event_sale_product_configurator.event_configurator_tour",function(require){"use strict";var tour=require('web_tour.tour');require('event.event_configurator_tour');var productSelectionStepIndex=_.findIndex(tour.tours.event_configurator_tour.steps,function(step){return(step.id==='product_selection_step');});var productSelectionStep=tour.tours.event_configurator_tour.steps[productSelectionStepIndex];productSelectionStep.trigger='div[name="product_template_id"] input';productSelectionStep.run=function(){var $input=$('div[name="product_template_id"] input');$input.click();$input.val('EVENT');var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;$input.trigger(keyDownEvent);};});;
  188.  
  189. /* /test_main_flows/static/tests/tours/main_flow.js defined in bundle 'web.assets_tests' */
  190. odoo.define('test_main_flows.tour',function(require){"use strict";var core=require('web.core');var tour=require('web_tour.tour');var _t=core._t;tour.register('main_flow_tour',{test:true,url:"/web",},[tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',content:_t('Organize your sales activities with the <b>Sales app</b>.'),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',content:_t('Organize your sales activities with the <b>Sales app</b>.'),position:'bottom',edition:'enterprise'},{trigger:".o_menu_sections a:contains('Products')",extra_trigger:'.o_main_navbar',content:_t("Let\'s create products."),position:"bottom",},{trigger:".o_menu_sections a:has(span:contains('Products'))",content:_t("Let\'s create products."),position:"bottom"},{trigger:'.o-kanban-button-new',extra_trigger:'.o_kanban_view',content:_t('Let\'s create your first product.'),position:'bottom',},{trigger:'input[name=name]',extra_trigger:'.o_form_sheet',content:_t('Let\'s enter the name.'),position:'left',run:'text the_flow.product',},{trigger:"select[name=type]",content:_t('Let\'s enter the product type'),position:'left',run:'text "product"',},{trigger:'.o_notebook a:contains("Inventory")',content:_t('Go to inventory tab'),position:'top',},{trigger:'.o_field_widget[name=route_ids] .custom-checkbox > label:contains("Manufacture")',content:_t('Check Manufacture'),position:'right',},{trigger:'.o_field_widget[name=route_ids] .custom-checkbox > label:contains("Buy")',content:_t('Uncheck Buy'),position:'right',},{trigger:'.o_field_widget[name=route_ids] .custom-checkbox > label:contains("Replenish on Order (MTO)")',content:_t('Uncheck  Replenish on Order (MTO)'),position:'right',},{trigger:'.o_notebook a:contains("General Information")',content:_t('Go to main tab'),position:'top',},{trigger:".o_field_widget[name=taxes_id] input",content:_t("Focus on customer taxes field."),run:function(actions){actions.click();var $e=$('.ui-menu-item:not(.o_m2o_dropdown_option) > a.ui-state-active');if($e.length){actions.click($e);}else{actions.click();}},},{trigger:'.o_form_button_save',content:_t('Save this product and the modifications you\'ve made to it.'),position:'bottom',},{trigger:".oe_button_box .oe_stat_button:has(div[name=bom_count])",extra_trigger:'.o_form_readonly',content:_t('See Bill of material'),position:'bottom',},{trigger:".o_list_button_add",content:_t("Let's create a new bill of material"),position:"bottom",},{trigger:".o_field_x2many_list_row_add > a",extra_trigger:".o_form_editable",content:_t("Click here to add some lines."),position:"bottom",},{trigger:".o_selected_row .o_required_modifier[name=product_id] input",content:_t("Select a product, or create a new one on the fly."),position:"right",run:"text the_flow.component1",},{trigger:".ui-menu-item > a:contains('the_flow.component1')",auto:true,},{trigger:".o_selected_row .o_external_button",content:_t("Click here to edit your component"),position:"right",},{trigger:'.o_notebook a:contains("Inventory")',content:_t('Go to inventory tab'),position:'top',},{trigger:'.o_field_widget[name=route_ids] .custom-checkbox > label:contains("Replenish on Order (MTO)")',content:_t('Check Replenish on Order (MTO)'),position:'right',},{trigger:'.o_notebook a:contains("Purchase")',content:_t('Go to purchase tab'),position:'top',},{trigger:".o_field_widget[name=seller_ids] .o_field_x2many_list_row_add > a",content:_t('Let\'s enter the cost price'),position:'right',},{trigger:".o_field_widget[name=name] input",extra_trigger:".modal-dialog",content:_t('Select a seller'),position:'top',run:"text the_flow.vendor",},{trigger:".ui-menu-item > a:contains('the_flow.vendor')",in_modal:false,},{trigger:".o_field_widget[name=price]",content:_t('Set the cost price'),position:'right',run:"text 1",},{trigger:".modal-footer .btn-primary:first",extra_trigger:".o_field_widget[name=name] > .o_external_button",content:_t('Save & Close'),position:'bottom',},{trigger:".modal-footer .btn-primary",content:_t('Save'),position:'bottom',},{trigger:".o_field_x2many_list_row_add > a",extra_trigger:"body:not(:has(table.o_list_view div.o_field_widget[name='product_id'] input))",content:_t("Click here to add some lines."),position:"bottom",},{trigger:".o_selected_row .o_required_modifier[name=product_id] input",extra_trigger:'.o_field_widget[name=bom_line_ids] .o_data_row:nth(1).o_selected_row',content:_t("Select a product, or create a new one on the fly."),position:"right",run:"text the_flow.component2",},{trigger:".ui-menu-item > a:contains('the_flow.component2')",auto:true,},{trigger:".o_selected_row .o_external_button",content:_t("Click here to edit your component"),position:"right",},{trigger:'.o_notebook a:contains("Purchase")',content:_t('Go to purchase tab'),position:'top',},{trigger:".o_field_widget[name=seller_ids] .o_field_x2many_list_row_add > a",content:_t('Let\'s enter the cost price'),position:'right',},{trigger:".o_field_widget[name=name] input",extra_trigger:".modal-dialog",content:_t('Select a seller'),position:'top',run:"text the_flow.vendor",},{trigger:".ui-menu-item > a:contains('the_flow.vendor')",auto:true,in_modal:false,},{trigger:".o_field_widget[name=price]",content:_t('Set the cost price'),position:'right',run:"text 1",},{trigger:".modal-footer .btn-primary:first",content:_t('Save & Close'),position:'bottom',},{trigger:".modal-footer .btn-primary",extra_trigger:".o_field_widget[name=seller_ids] .o_data_row td:nth-child(2):contains('the_flow.vendor')",content:_t('Save'),position:'bottom',},{trigger:'.o_form_button_save',extra_trigger:".o_field_widget[name=bom_line_ids] .o_list_view tr:nth-child(3):has(.o_field_x2many_list_row_add)",content:_t('Save the bom.'),position:'bottom',},{trigger:".breadcrumb-item:first",content:_t("Use the breadcrumbs to <b>go back to products</b>."),position:"bottom"},{trigger:'.o-kanban-button-new',extra_trigger:'.o_kanban_view',content:_t('Let\'s create your second product.'),position:'bottom',},{trigger:'input[name=name]',extra_trigger:'.o_form_sheet',content:_t('Let\'s enter the name.'),position:'left',run:'text the_flow.service',},{trigger:'.o_field_widget[name=type]',content:_t('Set to service'),position:'left',run:'text "service"',},{trigger:".o_field_widget[name=taxes_id] input",content:_t("Focus on customer taxes field."),run:function(actions){actions.click();var $e=$('.ui-menu-item:not(.o_m2o_dropdown_option) > a.ui-state-active');if($e.length){actions.click($e);}else{actions.click();}},},{trigger:'.o_notebook a:contains("Sales")',content:_t('Go to sales tab'),position:'bottom',},{trigger:'.o_field_widget[name=service_policy] .o_radio_input[data-value="delivered_timesheet"]',content:_t('Change service policy'),position:'left',},{trigger:'.o_field_widget[name=service_tracking] input[data-value="task_global_project"]',content:_t('Change track service'),position:'left',},{trigger:'.o_field_widget[name=project_id] input',content:_t('Choose project'),position:'left',run:'text the_flow.project',},{trigger:".ui-menu-item > a:contains('the_flow.project')",auto:true,},{trigger:'.o_form_button_save',extra_trigger:'.o_field_widget[name=project_id] > .o_external_button',content:_t('Save this product and the modifications you\'ve made to it.'),position:'bottom',},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t('Organize your sales activities with the <b>CRM app</b>.'),position:'right',edition:'community'},{trigger:'.o_app[data-menu-xmlid="crm.crm_menu_root"]',content:_t('Organize your sales activities with the <b>CRM app</b>.'),position:'bottom',edition:'enterprise'},{trigger:".o-kanban-button-new",extra_trigger:'.o_opportunity_kanban',content:_t("Click here to <b>create your first opportunity</b> and add it to your pipeline."),position:"bottom"},{trigger:".o_kanban_quick_create input:first",content:_t("<b>Choose a name</b> for your opportunity."),position:"right",run:"text the_flow.opportunity",},{trigger:".o_kanban_quick_create .o_field_widget[name=partner_id] input",content:_t("Write the name of your customer to create one on the fly, or select an existing one."),position:"left",run:"text the_flow.customer",},{trigger:".ui-menu-item > a:contains('the_flow.customer')",auto:true,},{trigger:".o_kanban_quick_create .o_kanban_add",extra_trigger:".o_kanban_quick_create .o_field_widget[name=partner_id] > .o_external_button",content:_t("Click here to <b>add your opportunity</b>."),position:"right",},{trigger:".o_kanban_group:first .o_kanban_record:has(span:contains('the_flow.opportunity'))",content:_t("<b>Drag &amp; drop opportunities</b> between columns as you progress in your sales cycle."),position:"right",run:"drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(2) ",},{trigger:".o_kanban_group:eq(2) > .o_kanban_record:has(span:contains('the_flow.opportunity'))",content:_t("Click on an opportunity to zoom to it."),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('New Quotation')",content:_t('<p><b>Create a quotation</p>'),position:"right"},{trigger:".o_field_widget[name=order_line] .o_field_x2many_list_row_add > a",content:_t("Click here to add some lines to your quotations."),position:"bottom",},{trigger:".o_field_widget[name=product_id] input, .o_field_widget[name=product_template_id] input",content:_t("Select a product, or create a new one on the fly. The product will define the default sales price (that you can change), taxes and description automatically."),position:"right",run:function(actions){actions.text("the_flow.product",this.$anchor);var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;this.$anchor.trigger(keyDownEvent);var $descriptionElement=$('.o_form_editable textarea[name="name"]');$descriptionElement.change(function(){if($(this).val().indexOf('the_flow.product')!==-1){$(this).addClass('product_loading_success');}});},},{trigger:".ui-menu-item > a:contains('the_flow.product')",},{trigger:'.o_form_editable textarea[name="name"].product_loading_success',run:function(){}},{trigger:".o_field_widget[name=order_line] .o_field_x2many_list_row_add > a",content:_t("Click here to add some lines to your quotations."),position:"bottom",},{trigger:".o_field_widget[name=product_id] input, .o_field_widget[name=product_template_id] input",extra_trigger:'.o_field_widget[name=order_line] .o_data_row:nth(1).o_selected_row',content:_t("Select a product"),position:"right",run:function(actions){actions.text("the_flow.service",this.$anchor);var keyDownEvent=jQuery.Event("keydown");keyDownEvent.which=42;this.$anchor.trigger(keyDownEvent);var $descriptionElement=$('.o_form_editable textarea[name="name"]');$descriptionElement.change(function(){if($(this).val().indexOf('the_flow.service')!==-1){$(this).addClass('product_service_loading_success');}});},},{trigger:".ui-menu-item > a:contains('the_flow.service')",},{trigger:'.o_form_editable textarea[name="name"].product_service_loading_success',run:function(){}},{trigger:'label:contains("Untaxed Amount")',},{trigger:".o_statusbar_buttons > button.o_sale_print:enabled",content:_t("<p><b>Print this quotation.</b></p>"),position:"bottom"},{trigger:".o_statusbar_buttons > button:enabled:contains('Send by Email')",extra_trigger:".o_statusbar_status .btn-primary:contains('Quotation Sent')",content:_t("Try to send it to email"),position:"bottom",},{trigger:".o_field_widget[name=email]",content:_t("Enter an email address"),position:"right",run:"text test@the_flow.com",},{trigger:".modal-footer .btn-primary",content:_t("Save your changes"),position:"bottom",},{trigger:".modal-footer .btn-primary span:contains('Send')",content:_t("Try to send it to email"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Confirm')",content:_t("<p>Confirm this quotation</p>"),position:"bottom"},{trigger:".o_form_button_save",extra_trigger:".o_statusbar_status .btn-primary:contains('Sales Order')",content:_t("<p>Save this quotation</p>"),position:"bottom"},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app:contains("Inventory")',content:_t('Go to Inventory'),position:'right',edition:'community'},{trigger:'.o_app > div:contains("Inventory")',content:_t('Go to Inventory'),position:'bottom',edition:'enterprise'},{trigger:".o_menu_sections a:contains('Master Data')",content:_t("Go to Master Data"),position:"bottom"},{trigger:".o_menu_sections a[data-menu-xmlid='stock.menu_reordering_rules_config']",content:_t("Reordering Rules"),position:"bottom"},{trigger:".o_list_button_add",content:_t("Let's create a new reordering rule"),position:"right",},{trigger:".o_field_widget[name=product_id] input",content:_t("Write the name of your product."),position:"top",run:"text the_flow.component2",},{trigger:".ui-menu-item > a:contains('the_flow.component2')",auto:true,},{trigger:".o_field_widget[name=product_min_qty]",content:_t("Set the minimum product quantity"),position:"right",run:'text 1',},{trigger:".o_field_widget[name=product_max_qty]",content:_t("Set the maximum product quantity"),position:"right",run:'text 10',},{trigger:".o_form_button_save",content:_t("<p>Save this reordering rule</p>"),position:"bottom"},{trigger:".o_menu_sections a:contains('Operations')",content:_t("Go to Run Schedulers"),position:"bottom"},{trigger:".o_menu_sections a[data-menu-xmlid='stock.menu_procurement_compute']",content:_t("Click on schedulers"),position:"bottom"},{trigger:".modal-footer .btn-primary",extra_trigger:".modal-dialog",content:_t("Run Schedulers"),position:"bottom",},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app:contains("Purchase")',content:_t('Go to Purchase'),position:'right',edition:'community'},{trigger:'.o_app > div:contains("Purchase")',content:_t('Go to Purchase'),position:'bottom',edition:'enterprise'},{trigger:'.o_data_row:has(.o_data_cell:contains("the_flow.vendor"))',content:_t('Select the generated request for quotation'),position:'bottom',},{trigger:".o_statusbar_buttons > button:enabled:contains('Confirm Order')",content:_t("Confirm quotation"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Receive Products')",content:_t("Receive Product"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Validate')",content:_t("Validate"),position:"bottom",},{trigger:".modal-footer .btn-primary",extra_trigger:".modal-dialog",content:_t("Apply"),position:"bottom",},{trigger:".o_back_button a, .breadcrumb-item:not('.active'):last",content:_t('go back to the purchase order'),position:'bottom',},{trigger:".o_statusbar_buttons > button:enabled:contains('Create Bill')",content:_t('go to Vendor Bills'),position:'bottom',},{trigger:".o_statusbar_buttons > button:enabled:contains('Validate')",content:_t("Try to send it to email"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Register Payment')",content:_t("Register Payment"),position:"bottom",},{trigger:".modal-footer .btn-primary",content:_t("Validate"),position:"bottom",},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app:contains("Manufacturing")',content:_t('Go to Manufacturing'),position:'right',edition:'community'},{trigger:'.o_app > div:contains("Manufacturing")',content:_t('Go to Manufacturing'),position:'bottom',edition:'enterprise'},{trigger:".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_manufacturing']",content:_t('Click on Operations menuitem'),position:'bottom',},{trigger:".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_production_action']",content:_t('Open manufacturing orders'),position:'bottom',},{trigger:'.o_data_row:has(.o_data_cell:contains("the_flow.product")):first',content:_t('Select the generated manufacturing order'),position:'bottom',},{trigger:".o_statusbar_buttons > button[name='action_assign']:enabled",content:_t("Check availability"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Produce')",content:_t("Produce"),position:"bottom",},{trigger:".modal-footer .btn-primary:nth-child(3)",content:_t('Record Production'),position:'bottom',},{trigger:".o_statusbar_buttons > button:enabled:contains('Mark as Done')",content:_t("Mark as Done"),position:"bottom",},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},tour.STEPS.SHOW_APPS_MENU_ITEM,{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',content:_t('Organize your sales activities with the <b>Sales app</b>.'),position:'bottom',edition:'community'},{trigger:'.o_app[data-menu-xmlid="sale.sale_menu_root"]',content:_t('Organize your sales activities with the <b>Sales app</b>.'),position:'bottom',edition:'enterprise'},{trigger:".o_menu_sections a[data-menu-xmlid='sale.sale_order_menu']",content:_t("Go to Sales menu"),position:"bottom"},{trigger:".o_menu_sections a[data-menu-xmlid='sale.menu_sale_order']",content:_t("Go to the sales orders"),position:"bottom"},{trigger:".o_data_row:first",extra_trigger:'.o_control_panel > .breadcrumb:contains("Sales Orders")',content:_t("Go to the last sale order"),position:"right"},{trigger:'.oe_button_box .oe_stat_button:has(div[name=tasks_count])',content:_t('See Tasks'),position:'right',},{trigger:'.o_field_widget[name=project_id]',content:_t('See Project'),position:'right',},{trigger:'.oe_button_box .oe_stat_button:has(span:contains("Timesheets"))',extra_trigger:'.o_form_readonly',content:_t('See Timesheets'),position:'bottom',},{trigger:'.o_list_button_add',content:_t('Add a Timesheet'),position:'bottom',},{trigger:'.o_selected_row input[name=name]',content:_t('Set description'),position:'bottom',run:'text 10 hours',},{trigger:'.o_selected_row .o_field_widget[name=task_id] input',content:_t('Choose a task'),position:'bottom',run:'click',},{trigger:".ui-menu-item > a",auto:true,},{trigger:'.o_selected_row input[name=unit_amount]',content:_t('Set time'),position:'bottom',run:'text 10',},{trigger:'.o_list_button_save',content:_t('Save'),position:'bottom',},{trigger:'.breadcrumb-item:nth-child(2) a',extra_trigger:'.o_list_button_add',content:_t('Back to the sale order'),position:'bottom',},{trigger:".o_statusbar_buttons > button:enabled:contains('Create Invoice')",content:_t("Validate"),position:"bottom",},{trigger:".modal-footer .btn-primary",content:_t("Create and View Invoices"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Validate')",content:_t("Validate"),position:"bottom",},{trigger:".o_statusbar_buttons > button:enabled:contains('Register Payment')",content:_t("Register Payment"),position:"bottom",},{trigger:"select.o_field_widget[name=journal_id]",extra_trigger:".modal-dialog",content:_t("Select Journal"),position:"bottom",run:'text(Bank (USD))',},{trigger:".modal-footer .btn-primary",content:_t("Validate"),position:"bottom",},{edition:"enterprise",trigger:'.o_menu_toggle',content:_t('Go back to the home menu'),position:'bottom',},{edition:"enterprise",trigger:'.o_app[data-menu-xmlid="account_accountant.menu_accounting"]',content:_t('Go to Accounting'),position:'bottom',},{edition:"enterprise",trigger:'div[name=bank_journal_cta] > button[data-name=action_cofigure_bank_journal], div[name=bank_journal_cta] > button[data-name=action_configure_bank_journal]',content:_t('Configure Bank Journal'),position:'bottom',},{edition:"enterprise",trigger:'.js_configure_manually',content:_t('Enter manual data for bank account'),position:'bottom',},{edition:"enterprise",trigger:".o_field_widget[name=acc_number]",content:_t("Enter an account number"),position:"right",run:"text 867656544",},{trigger:".modal-footer .btn-primary",content:_t('Save'),position:'bottom',},{edition:"enterprise",trigger:'div[name=bank_statement_create_button] > a[data-name=create_bank_statement], div[name=bank_statement_create_button] > a[data-name=create_bank_statement]',content:_t('Create a new bank statement'),position:'bottom',},{edition:"enterprise",trigger:'input[name=name]',content:_t('Let\'s enter the reference.'),position:'left',run:'text the_flow.statement',},{edition:"enterprise",trigger:".o_field_widget[name=balance_end_real] input",content:_t('Let\'s calculate the ending balance.'),position:'right',run:'text 9010.85',},{edition:"enterprise",trigger:".o_field_widget[name=line_ids] .o_field_x2many_list_row_add > a",content:_t("Click here to add some lines."),position:"bottom",},{edition:"enterprise",trigger:".o_selected_row .o_field_widget[name=amount] input",content:_t("Write the amount received."),position:"bottom",run:"text 12.65",},{edition:"enterprise",trigger:".o_selected_row .o_field_widget[name=partner_id] input",content:_t("Write the name of your customer."),position:"bottom",run:"text the_flow.customer",},{edition:"enterprise",trigger:".ui-menu-item > a:contains('the_flow.customer')",in_modal:false,auto:true,},{edition:"enterprise",trigger:".o_selected_row .o_field_widget[name=name]",content:_t('Let\'s enter a name.'),position:"bottom",run:"text the_flow.statement.line",},{edition:"enterprise",trigger:'.o_form_button_save',content:_t('Save.'),position:'bottom',},{edition:"enterprise",trigger:".o_statusbar_buttons > button:enabled:contains('Reconcile')",content:_t('<p><b>Reconcile</p>'),position:"bottom",},{edition:"enterprise",trigger:"button.o_reconcile",content:_t('<p><b>Click on Reconcile</p>'),position:"right",},{edition:"enterprise",trigger:".button_back_to_statement",content:_t('<p><b>Close this statement.</p>'),position:"bottom",}]);});;
  191.  
  192. /* /website_event_sale/static/tests/tours/website_event_sale.js defined in bundle 'web.assets_tests' */
  193. odoo.define('website_event_sale.tour',function(require){'use strict';var tour=require('web_tour.tour');tour.register('event_buy_tickets',{test:true,url:'/event',},[{content:"Go to the `Events` page",trigger:'a[href*="/event"]:contains("Conference for Architects"):first',},{content:"Select 1 unit of `Standard` ticket type",extra_trigger:'#wrap:not(:has(a[href*="/event"]:contains("Conference for Architects")))',trigger:'select:eq(0)',run:'text 1',},{content:"Select 2 units of `VIP` ticket type",extra_trigger:'select:eq(0):has(option:contains(1):propSelected)',trigger:'select:eq(1)',run:'text 2',},{content:"Click on `Order Now` button",extra_trigger:'select:eq(1):has(option:contains(2):propSelected)',trigger:'.btn-primary:contains("Register Now")',},{content:"Fill attendees details",trigger:'form[id="attendee_registration"] .btn:contains("Continue")',run:function(){$("input[name='1-name']").val("Att1");$("input[name='1-phone']").val("111 111");$("input[name='1-email']").val("att1@example.com");$("input[name='2-name']").val("Att2");$("input[name='2-phone']").val("222 222");$("input[name='2-email']").val("att2@example.com");$("input[name='3-name']").val("Att3");$("input[name='3-phone']").val("333 333");$("input[name='3-email']").val("att3@example.com");},},{content:"Validate attendees details",extra_trigger:"input[name='1-name'], input[name='2-name'], input[name='3-name']",trigger:'button:contains("Continue")',},{content:"Check that the cart contains exactly 3 triggers",trigger:'a:has(.my_cart_quantity:containsExact(3)),.o_extra_menu_items .fa-plus',run:function(){},},{content:"go to cart",trigger:'a:contains(Return to Cart)',},{content:"Modify the cart to add 1 unit of `VIP` ticket type",extra_trigger:"#cart_products:contains(Standard):contains(VIP)",trigger:"#cart_products tr:contains(VIP) .fa-plus",},{content:"Now click on `Process Checkout`",extra_trigger:'a:has(.my_cart_quantity):contains(4),#cart_products input.js_quantity[value="3"]',trigger:'.btn-primary:contains("Process Checkout")'},{content:"Check that the subtotal is 5,500.00 USD",trigger:'#order_total_untaxed .oe_currency_value:contains("5,500.00")',run:function(){},},{content:"Select `Wire Transfer` payment method",trigger:'#payment_method label:contains("Wire Transfer")',},{content:"Pay",extra_trigger:'#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',trigger:'button[id="o_payment_form_pay"]:visible',},{content:"Last step",trigger:'.oe_website_sale:contains("Pending... The order will be validated after the payment.")',timeout:30000,}]);});;
  194.  
  195. /* /website_sale_coupon/static/tests/tours/website_sale_coupon.js defined in bundle 'web.assets_tests' */
  196. odoo.define('website_sale_coupon.test',function(require){'use strict';require("website_sale.tour");var tour=require("web_tour.tour");var ajax=require('web.ajax');tour.register('shop_sale_coupon',{test:true,url:'/shop?search=Large%20Cabinet',},[{content:"open customize menu",extra_trigger:'.oe_website_sale .o_wsale_products_searchbar_form',trigger:'#customize-menu > a',},{content:"enable 'Show # found' if needed",trigger:"#customize-menu a:contains(Show # found)",run:function(){if(!$('#customize-menu a:contains(Show # found) input').prop('checked')){$('#customize-menu a:contains(Show # found)').click();}}},{content:"select Large Cabinet",extra_trigger:'.oe_search_found',trigger:'.oe_product_cart a:contains("Large Cabinet")',},{content:"add 2 Large Cabinet into cart",trigger:'#product_details input[name="add_qty"]',run:"text 2",},{content:"click on 'Add to Cart' button",trigger:"a:contains(Add to Cart)",},{content:"open customize menu",extra_trigger:'.oe_website_sale .oe_cart',trigger:'#customize-menu > a',},{content:"enable 'Promo Code' if needed",trigger:"#customize-menu a:contains(Promo Code)",run:function(){if(!$('#customize-menu a:contains(Promo Code) input').prop('checked')){$('#customize-menu a:contains(Promo Code)').click();}}},{content:"click on 'I have a promo code'",extra_trigger:'.show_coupon',trigger:'.show_coupon',},{content:"insert promo code '10pc'",extra_trigger:'form[name="coupon_code"]',trigger:'form[name="coupon_code"] input[name="promo"]',run:"text 10pc",},{content:"validate the coupon",trigger:'form[name="coupon_code"] .a-submit',},{content:"check reward product",trigger:'.reward_product:contains("10.0% discount on total amount")',run:function(){},},{content:"go to shop",trigger:'.reward_product:contains("10.0% discount on total amount")',run:function(){ajax.jsonRpc('/web/dataset/call','call',{model:'account.tax',method:'create',args:[{'name':'15% tax incl '+_.now(),'amount':15,}],}).then(function(tax_id){ajax.jsonRpc('/web/dataset/call','call',{model:'product.template',method:'create',args:[{'name':'Taxed Product','taxes_id':[([6,false,[tax_id]])],'list_price':100,'website_published':true,}],}).then(function(data){location.href='/shop';});});},},{content:"type Taxed Product in search",trigger:'form input[name="search"]',run:"text Taxed Product",},{content:"start search",trigger:'form:has(input[name="search"]) .oe_search_button',},{content:"select Taxed Product",extra_trigger:'.oe_search_found',trigger:'.oe_product_cart a:containsExact("Taxed Product")',},{content:"click on 'Add to Cart' button",trigger:"a:contains(Add to Cart)",},{content:"check reduction amount got recomputed and merged both discount lines into one only",extra_trigger:'.oe_currency_value:contains("-75.50"):not(#cart_total .oe_currency_value:contains("-75.50"))',trigger:'.oe_website_sale .oe_cart',run:function(){},},{content:"add one Large Cabinet",trigger:'#cart_products input.js_quantity',run:"text 3",},{content:"check reduction amount got recomputed when changing qty",trigger:'.oe_currency_value:contains("-107.50")',run:function(){},},{content:"add more Large Cabinet into cart",trigger:'#cart_products input.js_quantity',run:"text 4",},{content:"check free product is added",trigger:'#wrap:has(.reward_product:contains("Free Product - Large Cabinet"))',run:function(){},},{content:"remove one cabinet from cart",trigger:'#cart_products input.js_quantity[value="4"]',run:"text 3",},{content:"check free product is removed",trigger:'#wrap:not(:has(.reward_product:contains("Free Product - Large Cabinet")))',run:function(){},},{content:"go to checkout",trigger:'a[href="/shop/checkout?express=1"]',},{content:"check total is unchanged",trigger:'tr#order_total .oe_currency_value:contains("967.50")',run:function(){},},]);});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement