19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:53 +01:00
parent dc68f80d3f
commit 7221b9ac46
610 changed files with 135477 additions and 161677 deletions

View file

@ -1,87 +1,119 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
import tour from 'web_tour.tour';
tour.register('crm_rainbowman', {
test: true,
url: "/web",
}, [
tour.stepUtils.showAppsMenuItem(),
registry.category("web_tour.tours").add("crm_rainbowman", {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
trigger: ".o_app[data-menu-xmlid='crm.crm_menu_root']",
content: "open crm app",
}, {
trigger: ".o-kanban-button-new",
run: "click",
},
{
trigger: "body:has(.o_kanban_renderer) .o-kanban-button-new",
content: "click create",
}, {
run: "click",
},
{
trigger: ".o_field_widget[name=name] input",
content: "complete name",
run: "text Test Lead 1",
}, {
run: "edit Test Lead 1",
},
{
trigger: ".o_field_widget[name=expected_revenue] input",
content: "complete expected revenue",
run: "text 999999997",
}, {
run: "edit 999999997",
},
{
trigger: "button.o_kanban_add",
content: "create lead",
}, {
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Lead 1')",
run: "click",
},
{
trigger: ".o_kanban_record:contains('Test Lead 1')",
content: "move to won stage",
run: "drag_and_drop_native .o_opportunity_kanban .o_kanban_group:has(.o_column_title:contains('Won')) "
}, {
run: "drag_and_drop (.o_opportunity_kanban .o_kanban_group:has(.o_column_title:contains('Won')))",
},
{
trigger: ".o_reward_rainbow",
extra_trigger: ".o_reward_rainbow",
run: function () {} // check rainbowman is properly displayed
}, {
},
{
// This step and the following simulates the fact that after drag and drop,
// from the previous steps, a click event is triggered on the window element,
// which closes the currently shown .o_kanban_quick_create.
trigger: ".o_kanban_renderer",
}, {
run: "click",
},
{
trigger: ".o_kanban_renderer:not(:has(.o_kanban_quick_create))",
run() {},
}, {
},
{
trigger: ".o-kanban-button-new",
content: "create second lead",
}, {
run: "click",
},
{
trigger: ".o_field_widget[name=name] input",
content: "complete name",
run: "text Test Lead 2",
}, {
run: "edit Test Lead 2",
},
{
trigger: ".o_field_widget[name=expected_revenue] input",
content: "complete expected revenue",
run: "text 999999998",
}, {
run: "edit 999999998",
},
{
trigger: "button.o_kanban_add",
content: "create lead",
}, {
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Lead 2')",
run: function () {} // wait for the record to be properly created
}, {
run: "click",
},
{
trigger: ".o_kanban_record:contains('Test Lead 2')",
},
{
// move first test back to new stage to be able to test rainbowman a second time
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Lead 1')",
trigger: ".o_kanban_record:contains('Test Lead 1')",
content: "move back to new stage",
run: "drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(0) "
}, {
trigger: ".o_kanban_record .o_kanban_record_title:contains('Test Lead 2')",
run: "drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(0) ",
},
{
trigger: ".o_kanban_record:contains('Test Lead 2')",
content: "click on second lead",
}, {
run: "click",
},
{
trigger: ".o_statusbar_status button[data-value='4']",
content: "move lead to won stage",
run: "click",
},
{
content: "wait for save completion",
trigger: ".o_form_readonly, .o_form_saved",
},
{
trigger: ".o_reward_rainbow",
},
...tour.stepUtils.saveForm(),
{
trigger: ".o_statusbar_status button[data-value='1']",
extra_trigger: ".o_reward_rainbow",
content: "move lead to previous stage & rainbowman appears",
}, {
run: "click",
},
{
trigger: "button[name=action_set_won_rainbowman]",
content: "click button mark won",
run: "click",
},
{
content: "wait for save completion",
trigger: ".o_form_readonly, .o_form_saved",
},
{
trigger: ".o_reward_rainbow",
},
...tour.stepUtils.saveForm(),
{
trigger: ".o_menu_brand",
extra_trigger: ".o_reward_rainbow",
content: "last rainbowman appears",
}
]);
},
],
});