[FIX] *: properly finish a bunch of form editions

Cancel or properly wait for save to finish, depending on tour.

Part-of: odoo/odoo#96517
This commit is contained in:
Xavier Morel
2022-08-04 09:14:10 +02:00
parent f552711074
commit 67f36e8b2f
4 changed files with 13 additions and 11 deletions
@@ -80,6 +80,7 @@ tour.register('event_configurator_tour', {
}, {
trigger: 'textarea[name="name"].tour_success_2',
run: function () {} // check
}]);
}, ...tour.stepUtils.discardForm()
]);
});
@@ -45,12 +45,14 @@ const commonSteps = [tour.stepUtils.showAppsMenuItem(), {
tour.register('im_livechat_chatbot_steps_sequence_tour', {
test: true,
url: '/web',
}, [].concat(commonSteps, [{
}, [
...commonSteps, {
trigger: 'button:contains("Save & Close")'
}, {
trigger: 'body.o_web_client:not(.modal-open)',
run: () => {}
}]));
run() {},
}, ...tour.stepUtils.discardForm()
]);
/**
* Same as above, with an extra drag&drop at the end.
@@ -58,7 +60,8 @@ const commonSteps = [tour.stepUtils.showAppsMenuItem(), {
tour.register('im_livechat_chatbot_steps_sequence_with_move_tour', {
test: true,
url: '/web',
}, [].concat(commonSteps, [{
}, [
...commonSteps, {
trigger: 'button:contains("Save & New")'
}, {
trigger: 'tr:contains("Step 3")',
@@ -135,4 +138,5 @@ tour.register('im_livechat_chatbot_steps_sequence_with_move_tour', {
trigger: 'tr:contains("Step 6")',
in_modal: false,
run: () => {}
}]));
}, ...tour.stepUtils.discardForm(),
]);
@@ -48,4 +48,5 @@ tour.register('mass_mailing_snippets_menu_tabs', {
trigger: 'iframe .o_we_customize_panel .snippet-option-DesignTab',
run: () => null, // it's a check
},
...tour.stepUtils.discardForm(),
]);
@@ -101,11 +101,7 @@ tour.register('purchase_matrix_tour', {
}, {
trigger: 'span:contains("Confirm")',
run: 'click' // apply the matrix
}, {
trigger: '.o_form_button_save:contains("Save")',
extra_trigger: '.o_field_cell.o_data_cell.o_list_number:contains("8.20")',
run: 'click' // SAVE Sales Order, after matrix has been applied (extra_trigger).
},
}, ...tour.stepUtils.saveForm('.o_field_cell.o_data_cell.o_list_number:contains("8.20")')
]);