19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:12 +01:00
parent 79f83631d5
commit 73afc09215
6267 changed files with 1534193 additions and 1130106 deletions

View file

@ -1,51 +1,99 @@
odoo.define('sale.tour_sale_signature', function (require) {
'use strict';
var tour = require('web_tour.tour');
import { registry } from "@web/core/registry";
import { redirect } from "@web/core/utils/urls";
// This tour relies on data created on the Python test.
tour.register('sale_signature', {
test: true,
registry.category("web_tour.tours").add('sale_signature', {
url: '/my/quotes',
},
[
steps: () => [
{
content: "open the test SO",
trigger: 'a:containsExact("test SO")',
trigger: 'a:text(test SO)',
run: "click",
expectUnloadPage: true,
},
{
content: "click sign",
trigger: 'a:contains("Sign")',
run: "click",
},
{
content: "clear the signature name",
trigger: '.modal .o_web_sign_name_and_signature input',
run: "clear",
},
{
content: "check submit is disabled when name is empty",
trigger: '.modal .o_portal_sign_submit:disabled',
},
{
content: "reset signature name",
trigger: '.modal .o_web_sign_name_and_signature input',
run: "fill Joel Willis",
},
{
content: "check submit is enabled",
trigger: '.o_portal_sign_submit:enabled',
run: function () {},
},
{
trigger: ".modal .o_web_sign_name_and_signature input:value(Joel Willis)"
},
{
trigger: ".modal canvas.o_web_sign_signature",
run: "canvasNotEmpty",
},
{
content: "click select style",
trigger: '.o_web_sign_auto_select_style a',
trigger: '.modal .o_web_sign_auto_select_style button',
run: "click",
},
{
content: "click style 4",
trigger: '.o_web_sign_auto_font_selection a:eq(3)',
trigger: ".o-dropdown-item:eq(3)",
run: "click",
},
{
content: "click submit",
trigger: '.o_portal_sign_submit:enabled',
trigger: '.modal .o_portal_sign_submit:enabled',
run: "click",
expectUnloadPage: true,
},
{
content: "check it's confirmed",
trigger: '#quote_content:contains("Thank You")',
run: "click",
}, {
trigger: '#quote_content',
run: function () {
window.location.href = window.location.origin + '/web';
redirect("/odoo");
}, // Avoid race condition at the end of the tour by returning to the home page.
expectUnloadPage: true,
},
{
trigger: 'nav',
run: function() {},
}
]);
]});
registry.category("web_tour.tours").add("sale_signature_without_name", {
steps: () => [
{
content: "Wait for interactions to load",
trigger: `body[is-ready=true], :iframe body[is-ready=true]`,
},
{
content: "Sign & Pay",
trigger:
".o_portal_sale_sidebar .btn-primary, :iframe .o_portal_sale_sidebar .btn-primary",
run: "click",
},
{
content: "click submit",
trigger: ".o_portal_sign_submit:enabled, :iframe .o_portal_sign_submit:enabled",
run: "click",
},
{
content: "check error because no name",
trigger:
'.o_portal_sign_error_msg:contains("Signature is missing."), :iframe .o_portal_sign_error_msg:contains("Signature is missing.")',
},
],
});