[FIX] pos_loyalty: fix runbot error
Use of `addOrderline` presses the numpad, after clicking the product, even if the quantity of the product being added is only 1. Because of this, there might be a rogue press which calls `_updateSelectedOrderline` at the wrong timing. This can be proven by looking at the screenshot where the quantity of `Small Shelf` is 11, not 1. In this particular failing tour, the sequence of steps properly aligned resulting to this runbot issue. To make sure runbot isn't failing randomly, we replace `addOrderline` with manual `click product` and `orderline check`. Runbot: 3883, 3884, 3886 X-original-commit: 40aef1c4161f21801c1bbae823d9b5c46a035478 Part-of: odoo/odoo#93124
This commit is contained in:
@@ -98,9 +98,11 @@ PosLoyalty.exec.finalizeOrder('Cash', '10');
|
||||
|
||||
// Promotion: 2 items of shelves, get desk_pad/monitor_stand free
|
||||
// This is the 5th order.
|
||||
ProductScreen.exec.addOrderline('Wall Shelf Unit', '1');
|
||||
ProductScreen.do.clickDisplayedProduct('Wall Shelf Unit');
|
||||
ProductScreen.check.selectedOrderlineHas('Wall Shelf Unit', '1.00');
|
||||
PosLoyalty.check.isRewardButtonHighlighted(false);
|
||||
ProductScreen.exec.addOrderline('Small Shelf', '1');
|
||||
ProductScreen.do.clickDisplayedProduct('Small Shelf');
|
||||
ProductScreen.check.selectedOrderlineHas('Small Shelf', '1.00');
|
||||
PosLoyalty.check.isRewardButtonHighlighted(true);
|
||||
// Click reward product. Should be automatically added as reward.
|
||||
ProductScreen.do.clickDisplayedProduct('Desk Pad');
|
||||
|
||||
Reference in New Issue
Block a user