[FIX] pos_restaurant: runbot random error on clicking table
Checking the log of the runbot error, there is an extra `create_from_ui` rpc call for `restaurant.floor`. This is because when table T4 is clicked, it is still an `EditableTable`. It is possible that the full rendering after toggling edit mode isn't complete and the tour proceeds because it sees table T4 in the dom, when in fact the table we want to click should not be `EditableTable` instead a `TableWidget`. This is random because the tour may proceed as long at it sees the trigger element, even if the owl rendering is not finished. In this commit, we make sure that we click the correct element which is an unselected table. So we check if table T4 is unselected before clicking table T4 to open the product screen. To reproduce, follow instructions here: https://gist.github.com/caburj/ef311076a24d898132ed9c6b99367581 closes odoo/odoo#58151 X-original-commit: 238a65f59202d279d2c9327dd7937f125d80175b Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -93,7 +93,7 @@ odoo.define('pos_restaurant.tour.FloorScreen', function (require) {
|
||||
// Opening product screen in main floor should go back to main floor
|
||||
FloorScreen.do.clickEdit();
|
||||
FloorScreen.check.editModeIsActive(false);
|
||||
FloorScreen.check.hasTable('T4');
|
||||
FloorScreen.check.tableIsNotSelected('T4');
|
||||
FloorScreen.do.clickTable('T4');
|
||||
ProductScreen.check.isShown();
|
||||
Chrome.check.backToFloorTextIs('Main Floor', 'T4');
|
||||
|
||||
@@ -140,6 +140,15 @@ odoo.define('pos_restaurant.tour.FloorScreenTourMethods', function (require) {
|
||||
},
|
||||
];
|
||||
}
|
||||
tableIsNotSelected(name) {
|
||||
return [
|
||||
{
|
||||
content: `table '${name}' is not selected`,
|
||||
trigger: `.floor-map .table:not(.selected) .label:contains("${name}")`,
|
||||
run: function () {},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
class Execute {}
|
||||
|
||||
Reference in New Issue
Block a user