[FIX] (test_)sale(_product_configurators): fix nightly race condition

Fix some uncommon nightly error on the runbot where a race condition
happened when the tour finished too soon. The test is successful but
during the browser cleanup, things are still happening.

task-2832564

closes odoo/odoo#91920

Related: odoo/enterprise#27600
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Demesmaeker
2022-06-30 18:51:54 +02:00
parent 55130e50f2
commit 08aff3b686
3 changed files with 25 additions and 0 deletions
@@ -37,6 +37,15 @@ tour.register('sale_signature', {
{
content: "check it's confirmed",
trigger: '#quote_content:contains("Thank You")',
}, {
trigger: '#quote_content',
run: function () {
window.location.href = window.location.origin + '/web';
}, // Avoid race condition at the end of the tour by returning to the home page.
},
{
trigger: 'nav',
run: function() {},
}
]);
});
@@ -142,4 +142,12 @@ tour.register('sale_product_configurator_edition_tour', {
trigger: 'td.o_data_cell:contains("tour success")',
extra_trigger: 'div[name="order_line"]',
run: function (){}
}, {
trigger: 'td.o_data_cell',
run: function () {
window.location.href = window.location.origin + '/web';
}, // Avoid race condition at the end of the tour by returning to the home page.
}, {
trigger: '.o_navbar',
run: function() {}, // Check the home page is loaded
}]);
@@ -57,4 +57,12 @@ tour.register('sale_product_configurator_single_custom_attribute_tour', {
run: function () {
//check
}
}, {
trigger: '.configurator_container',
run: function () {
window.location.href = window.location.origin + '/web';
}
}, {
trigger: '.o_navbar',
run: function() {}, // Check the home page is loaded
}]);