| 1 | import { registry } from "@web/core/registry"; |
| 2 | import { stepUtils } from "@web_tour/tour_utils"; |
| 3 | |
| 4 | registry.category("web_tour.tours").add("version_timeline_auto_save_tour", { |
| 5 | url: "/odoo", |
| 6 | steps: () => [ |
| 7 | stepUtils.showAppsMenuItem(), |
| 8 | { |
| 9 | content: "Open Employees app", |
| 10 | trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']", |
| 11 | run: "click", |
| 12 | }, |
| 13 | { |
| 14 | content: "Open an Employee Profile", |
| 15 | trigger: ".o_kanban_record:contains('Bob M.')", |
| 16 | run: "click", |
| 17 | }, |
| 18 | { |
| 19 | content: "Open Payroll Page", |
| 20 | trigger: ".o_notebook_headers a[name='payroll_information']", |
| 21 | run: "click", |
| 22 | }, |
| 23 | { |
| 24 | content: "Open contract end date", |
| 25 | trigger: ".o_field_widget[name='contract_date_end'] .o_input", |
| 26 | run: "click", |
| 27 | }, |
| 28 | { |
| 29 | content: "Go to the next month", |
| 30 | trigger: ".o_next", |
| 31 | run: "click", |
| 32 | }, |
| 33 | { |
| 34 | content: "Choose date X + 1", |
| 35 | trigger: ".o_date_item_cell:nth-child(11) > div", |
| 36 | run: "click", |
| 37 | }, |
| 38 | { |
| 39 | content: "Open Create New Version", |
| 40 | trigger: ".o_field_widget[name='version_id'] > .o_arrow_button_wrapper > button", |
| 41 | run: "click", |
| 42 | }, |
| 43 | { |
| 44 | content: "Go to the next month", |
| 45 | trigger: ".o_next", |
| 46 | run: "click", |
| 47 | }, |
| 48 | { |
| 49 | content: "Choose date X + 2", |
| 50 | trigger: ".o_date_item_cell:nth-child(12) > div", |
| 51 | run: "click", |
| 52 | }, |
| 53 | { |
| 54 | content: "Wait until the form is saved", |
| 55 | trigger: "body .o_form_saved", |
| 56 | }, |
| 57 | ], |
| 58 | }); |