Thursday, April 10, 2025
3 changes · saas-18.1
Resolved issues and error corrections
The point of sale test setup now removes sample category data before running an automated walkthrough. This prevents differences between demo and non-demo databases from causing false test failures, helping keep release validation stable.
Original PR description
This commit is unlinking all demo categories before starting the tour. In this way we avoid different behavior in no-demo and demo databases. runbot error: 162972
This fixes an issue in the Point of Sale loyalty flow where free product rewards could fail during automated checks because product details were incomplete. The change helps ensure loyalty rewards are added to orders reliably, reducing the risk of checkout disruptions related to reward products.
Original PR description
Currently the following tests
- test_loyalty_free_product_rewards
- test_loyalty_free_product_rewards_2
may fail with the error
```
TypeError: Cannot read properties of undefined (reading 'sale_line_warn')
at Proxy.addLineToCurrentOrder (http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:17244:235)
at Proxy.addLineToCurrentOrder (http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:17415:14)
at http://127.0.0.1:8959/web/assets/eb52e48/point_of_sale.assets_prod.min.js:16996:532
```
This occurs because, since 5620a16d55091b0ed74feee694a02252e3d13c17, when adding a line to current order we should specify the product template idThis fix prevents point of sale automated tests from failing when browser storage cleanup takes too long. It allows testing to continue after a short wait, improving build reliability without changing customer-facing behavior.
Original PR description
Before this commit, when indexedDB takes too long to flush, an error is raised in the tests, causing them to fail. This commit allows continuing the tests without flushing indexedDB after 2 seconds. runbot error: 163055