[FIX] test_new_api: properly conclude tours
- the x2many tour would finish on a click canceling the creation but not wait for that to resolve, leading to the driver catching it in the act (checking before the client had had the time to switch), just need to wait for the list view to be displayed - the constraints tour would just drop in the middle of a creation with an error dialog open, so need to finish the entire thing and go back to the list view Part-of: odoo/odoo#96517
This commit is contained in:
@@ -27,6 +27,11 @@ odoo.define('web.test.constraint', function (require) {
|
||||
}, { // check popup content
|
||||
content: "check notification box",
|
||||
trigger: '.o_dialog_warning:contains(The color code must be positive !)',
|
||||
run: function () {}, // it's a check
|
||||
}]);
|
||||
run() {}
|
||||
}, {
|
||||
content: "close notification box",
|
||||
trigger: '.modal-footer .o-default-button',
|
||||
},
|
||||
...tour.stepUtils.discardForm(),
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -472,13 +472,11 @@ odoo.define('web.test.x2many', function (require) {
|
||||
trigger: '.o_field_widget[name=name] input',
|
||||
run: 'text {generate_dummy_message}',
|
||||
}, {
|
||||
content: "chuck update and new dummy message happened",
|
||||
content: "check update and new dummy message happened",
|
||||
trigger: '.o_field_widget[name=messages] .o_data_row .o_list_number:containsExact(22)',
|
||||
extra_trigger: '.o_field_widget[name=important_messages] .o_data_row .o_list_number:containsExact(22)',
|
||||
run: function () {}, // it's a check
|
||||
}, { // cancel
|
||||
content: "cancel change",
|
||||
trigger: '.o_cp_buttons .o_form_button_cancel',
|
||||
run: 'click',
|
||||
}]);
|
||||
},
|
||||
...tour.stepUtils.discardForm(),
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user