mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 15:32:04 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,45 @@
|
|||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add('test_generate_serial_with_expiration', {
|
||||
steps: () => [
|
||||
{
|
||||
trigger: "button:contains('Details')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: '.o_widget_generate_serials > button',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".modal .btn-primary:contains('New')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".modal .btn-primary:contains('Generate')",
|
||||
run: "click",
|
||||
},
|
||||
// Check that the expiration date is now set after generating Serials/Lots.
|
||||
{
|
||||
trigger: "td.o_field_cell[name=expiration_date]",
|
||||
run: () => {
|
||||
const exp_dates = document.querySelectorAll("td.o_field_cell[name=expiration_date]");
|
||||
for (const exp_date of exp_dates) {
|
||||
if (exp_date.innerText.trim() !== "Jun 3, 2020, 12:00 AM") {
|
||||
throw new Error("Expiration date should be Jun 3, 12:00 AM.");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
trigger: ".modal button:contains(save)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: "button.o_form_button_save",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".o_form_saved",
|
||||
},
|
||||
],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue