Debian Codegraph @

addons/sale_project/static/tests/tours/project_create_sol_tour.js

raw symbols SCIP
1 import { registry } from "@web/core/registry";
2 import { stepUtils } from "@web_tour/tour_utils";
3
4 registry.category("web_tour.tours").add('project_create_sol_tour', {
5 url: "/odoo",
6 steps: () => [
7 stepUtils.showAppsMenuItem(), {
8 trigger: ".o_app[data-menu-xmlid='project.menu_main_pm']",
9 content: 'Select Project main menu.',
10 run: "click",
11 }, {
12 trigger: ".o_kanban_record:contains(Test History Project):first",
13 content: "Open the project dropdown of project name 'Test History Project'.",
14 run: "hover && click .o_kanban_record:contains(Test History Project):first .o_dropdown_kanban .dropdown-toggle",
15 }, {
16 trigger: ".o_kanban_card_manage_settings a:contains('Settings')",
17 content: 'Start editing the project.',
18 run: "click",
19 }, {
20 trigger: ".o_field_widget[name='partner_id'] input",
21 content: "Add the customer for this project",
22 run: "click",
23 }, {
24 isActive: ["auto"],
25 trigger: ".ui-autocomplete > li > a:not(:has(i.fa))",
26 content: "Select the customer in the autocomplete dropdown",
27 run: "click",
28 },
29 {
30 trigger: 'div.o_notebook_headers',
31 },
32 {
33 trigger: 'a.nav-link[name="settings"]',
34 content: 'Click on Settings tab to configure this project.',
35 run: "click",
36 }, {
37 id: "project_sale_timesheet_start",
38 trigger: "div[name='sale_line_id'] input",
39 content: 'Add the Sales Order Item',
40 run: "fill New Sale order line",
41 }, {
42 trigger: ".o_field_widget[name=sale_line_id] .o-autocomplete--dropdown-menu .o_m2o_dropdown_option_create a",
43 content: "Create an Sales Order Item in the autocomplete dropdown.",
44 run: "click",
45 },
46 {
47 trigger: "body:not(:has(.modal))",
48 },
49 {
50 trigger: ".o_form_button_save:enabled",
51 content: "Save project",
52 run: "click",
53 },
54 // Those steps are currently needed in order to prevent the following issue:
55 // "Form views in edition mode are automatically saved when the page is closed, which leads to stray network requests and inconsistencies."
56 ...stepUtils.toggleHomeMenu(),
57 ...stepUtils.goToAppSteps("project.menu_main_pm", 'Go to the Project app.'),
58 ]});
59