mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-25 06:52:06 +02:00
19.0 vanilla
This commit is contained in:
parent
dc68f80d3f
commit
7221b9ac46
610 changed files with 135477 additions and 161677 deletions
|
|
@ -1,15 +1,15 @@
|
|||
/** @odoo-module */
|
||||
import tour from 'web_tour.tour';
|
||||
const today = moment();
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_utils";
|
||||
const today = luxon.DateTime.now();
|
||||
|
||||
tour.register('crm_forecast', {
|
||||
test: true,
|
||||
url: "/web",
|
||||
}, [
|
||||
tour.stepUtils.showAppsMenuItem(),
|
||||
registry.category("web_tour.tours").add('crm_forecast', {
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
stepUtils.showAppsMenuItem(),
|
||||
{
|
||||
trigger: ".o_app[data-menu-xmlid='crm.crm_menu_root']",
|
||||
content: "open crm app",
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: '.dropdown-toggle[data-menu-xmlid="crm.crm_menu_report"]',
|
||||
content: 'Open Reporting menu',
|
||||
|
|
@ -19,8 +19,8 @@ tour.register('crm_forecast', {
|
|||
content: 'Open Forecast menu',
|
||||
run: 'click',
|
||||
}, {
|
||||
trigger: '.o_column_quick_create:contains(Add next month)',
|
||||
content: 'Wait page loading'
|
||||
trigger: '.o_column_quick_create',
|
||||
content: 'Wait page loading',
|
||||
}, {
|
||||
trigger: ".o-kanban-button-new",
|
||||
content: "click create",
|
||||
|
|
@ -28,69 +28,66 @@ tour.register('crm_forecast', {
|
|||
}, {
|
||||
trigger: ".o_field_widget[name=name] input",
|
||||
content: "complete name",
|
||||
run: "text Test Opportunity 1",
|
||||
run: "edit Test Opportunity 1",
|
||||
}, {
|
||||
trigger: ".o_field_widget[name=expected_revenue] input",
|
||||
content: "complete expected revenue",
|
||||
run: "text 999999",
|
||||
run: "edit 999999",
|
||||
}, {
|
||||
trigger: "button.o_kanban_edit",
|
||||
content: "edit lead",
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: "div[name=date_deadline] button",
|
||||
content: "open date picker",
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: "div[name=date_deadline] input",
|
||||
content: "complete expected closing",
|
||||
run: `text ${today.format("MM/DD/YYYY")}`,
|
||||
run: `edit ${today.toFormat("MM/dd/yyyy")}`,
|
||||
}, {
|
||||
trigger: "div[name=date_deadline] input",
|
||||
content: "click to make the datepicker disappear",
|
||||
run: "click"
|
||||
}, {
|
||||
trigger: "body:not(:has(div.bootstrap-datetimepicker-widget))",
|
||||
content: "wait for date_picker to disappear",
|
||||
run: function () {},
|
||||
}, {
|
||||
trigger: '.o_back_button',
|
||||
content: 'navigate back to the kanban view',
|
||||
position: "bottom",
|
||||
tooltipPosition: "bottom",
|
||||
run: "click"
|
||||
}, {
|
||||
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Opportunity 1')",
|
||||
trigger: ".o_kanban_record:contains('Test Opportunity 1')",
|
||||
content: "move to the next month",
|
||||
run: function (actions) {
|
||||
const undefined_groups = $('.o_column_title:contains("None")').length;
|
||||
actions.drag_and_drop_native(`.o_opportunity_kanban .o_kanban_group:eq(${1 + undefined_groups})`, this.$anchor);
|
||||
async run({ queryAll, drag_and_drop }) {
|
||||
const undefined_groups = queryAll('.o_column_title:contains("None")').length;
|
||||
await drag_and_drop(`.o_opportunity_kanban .o_kanban_group:eq(${1 + undefined_groups})`);
|
||||
},
|
||||
}, {
|
||||
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Opportunity 1')",
|
||||
trigger: ".o_kanban_record:contains('Test Opportunity 1')",
|
||||
content: "edit lead",
|
||||
run: "click"
|
||||
}, {
|
||||
trigger: "div[name=date_deadline] button",
|
||||
content: "open date picker",
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: ".o_field_widget[name=date_deadline] input",
|
||||
content: "complete expected closing",
|
||||
run: function (actions) {
|
||||
actions.text(`text ${moment(today).add(5, 'months').startOf('month').subtract(1, 'days').format("MM/DD/YYYY")}`, this.$anchor);
|
||||
this.$anchor[0].dispatchEvent(new KeyboardEvent("keydown", { bubbles: true, key: "Escape" }));
|
||||
},
|
||||
run: `edit ${today.plus({ months: 5 }).startOf("month").minus({ days: 1 }).toFormat("MM/dd/yyyy")} && press Escape`,
|
||||
}, {
|
||||
trigger: "body:not(:has(div.bootstrap-datetimepicker-widget))",
|
||||
content: "wait for date_picker to disappear",
|
||||
run: function () {},
|
||||
}, {
|
||||
trigger: ".o_field_widget[name=probability] input",
|
||||
content: "max out probability",
|
||||
run: "text 100"
|
||||
trigger: "button[name=action_set_won_rainbowman]",
|
||||
content: "win the lead",
|
||||
run:"click"
|
||||
}, {
|
||||
trigger: '.o_back_button',
|
||||
content: 'navigate back to the kanban view',
|
||||
position: "bottom",
|
||||
tooltipPosition: "bottom",
|
||||
run: "click"
|
||||
}, {
|
||||
trigger: '.o_kanban_add_column',
|
||||
trigger: '.o_column_quick_create.o_quick_create_folded div',
|
||||
content: "add next month",
|
||||
run: "click"
|
||||
}, {
|
||||
trigger: ".o_kanban_record:contains('Test Opportunity 1'):contains('Won')",
|
||||
content: "assert that the opportunity has the Won banner",
|
||||
run: function () {},
|
||||
}
|
||||
]);
|
||||
]});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue