Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040348Retail ModulesTests Stabilizationpublic2019-03-11 12:022019-07-01 19:21
gorka_gil 
gorka_gil 
normalminorN/A
closedfixed 
5
 
RR19Q2 
marvintm
No
0040348: pi-mobile: wait for process to finish or till a new popup is opened
In this issue:
https://issues.openbravo.com/view.php?id=40266 [^]

Pi-mobile was changed to wait for the finish of all processes after all taps and writes.

As part of this change was needed to introduce the pause and resume of process when a popup is opened, so the tests can write in that popup.

The problem is that this popup sometimes is opened as part of a hook, and inside the hook don't have the process id to do a pause/resume of the process.


The new idea is instead do a pause/resume of the processes is that the tests wait for the end of the process or if a new popup is opened. For that, before a tap should be needed to save the number of opened popups and after the tap, check that the number of opened popups has not increase.

The problem with this new idea is that some actions don't open a popup, for example the write of user and pass in the authorization popup for prepayment.
And for this cases is needed a tap or write that don't wait for processes.

Some of the are a bit risky, like for example the click on search for giftcards or creditnotes, that do a request to the backend, and don't wait for the processes in these cases is not very good.
-
No tags attached.
related to feature request 0040266 closed gorka_gil Make tests to wait for all mobile processes to finish in each action 
depends on backport 0041216RR19Q1.2 closed gorka_gil pi-mobile: wait for process to finish or till a new popup is opened 
diff waitProcesses-popup-posterminal.diff (5,356) 2019-03-11 12:02
https://issues.openbravo.com/file_download.php?file_id=12731&type=bug
diff waitProcesses-popup-piMobile.diff (36,627) 2019-03-11 12:02
https://issues.openbravo.com/file_download.php?file_id=12732&type=bug
Issue History
2019-03-11 12:02gorka_gilNew Issue
2019-03-11 12:02gorka_gilAssigned To => gorka_gil
2019-03-11 12:02gorka_gilTriggers an Emergency Pack => No
2019-03-11 12:02gorka_gilFile Added: waitProcesses-popup-posterminal.diff
2019-03-11 12:02gorka_gilFile Added: waitProcesses-popup-piMobile.diff
2019-03-11 12:03gorka_gilRelationship addedrelated to 0040266
2019-03-11 12:07gorka_gilNote Added: 0110346
2019-03-27 16:12hgbotCheckin
2019-03-27 16:12hgbotNote Added: 0110697
2019-03-27 16:12hgbotStatusnew => resolved
2019-03-27 16:12hgbotResolutionopen => fixed
2019-03-27 16:12hgbotFixed in SCM revision => http://code.openbravo.com/tools/automation/pi-mobile/rev/7d553108f4a028616b03ba208adac11b1cdde7be [^]
2019-03-27 16:12hgbotCheckin
2019-03-27 16:12hgbotNote Added: 0110698
2019-03-27 16:12hgbotCheckin
2019-03-27 16:12hgbotNote Added: 0110699
2019-03-27 16:12hgbotCheckin
2019-03-27 16:12hgbotNote Added: 0110701
2019-03-27 16:12hgbotCheckin
2019-03-27 16:12hgbotNote Added: 0110703
2019-03-27 18:10hgbotCheckin
2019-03-27 18:10hgbotNote Added: 0110706
2019-03-29 12:02marvintmReview Assigned To => marvintm
2019-03-29 12:02marvintmStatusresolved => closed
2019-03-29 12:02marvintmFixed in Version => RR19Q2
2019-07-01 19:20gorka_gilStatusclosed => new
2019-07-01 19:20gorka_gilResolutionfixed => open
2019-07-01 19:20gorka_gilFixed in VersionRR19Q2 =>
2019-07-01 19:20gorka_gilStatusnew => scheduled
2019-07-01 19:20gorka_gilStatusscheduled => resolved
2019-07-01 19:20gorka_gilResolutionopen => fixed
2019-07-01 19:20gorka_gilStatusresolved => closed
2019-07-01 19:21gorka_gilFixed in Version => RR19Q2

Notes
(0110346)
gorka_gil   
2019-03-11 12:07   
Added the patch for the current implementation of wait for processes or popups.

It removes the logic of pause and resume.

As told is the description of the issue, is not a good solution because don't wait for some requests to the backend.

Probably will be interesting to investigate a mixed solution, like for example pause/resume for popups opened inside the method, and if is inside a hook use the wait for popup.

Or maybe just think about another solution.
(0110697)
hgbot   
2019-03-27 16:12   
Repository: tools/automation/pi-mobile
Changeset: 7d553108f4a028616b03ba208adac11b1cdde7be
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Mar 26 13:49:35 2019 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7d553108f4a028616b03ba208adac11b1cdde7be [^]

Fixes issue 40348: wait for process to finish or till a new popup is opened

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/terminals/WebPOSExtModulesTerminalHelper.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/intuitive/IntuitiveCommandsMobileCore.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/EnyoNode.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/utils/RetailUtils.java
---
(0110698)
hgbot   
2019-03-27 16:12   
Repository: tools/automation/pi-mobile
Changeset: e707b5474fce63b89a12453b10430091ceb54dcb
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Mar 26 19:54:09 2019 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e707b5474fce63b89a12453b10430091ceb54dcb [^]

Related to issue 40348: improve the waitProcesses so if the current processes are the same that the previous ones, no need to wait

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/terminals/WebPOSExtModulesTerminalHelper.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/intuitive/IntuitiveCommandsMobileCore.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/EnyoNode.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/utils/RetailUtils.java
---
(0110699)
hgbot   
2019-03-27 16:12   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 22f1baee90be1c9bda4295d5361683780e709c17
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Mar 26 14:24:00 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/22f1baee90be1c9bda4295d5361683780e709c17 [^]

Related to issue 40348. Backout of issue 40266. Remove retail process status feature

---
M web/org.openbravo.mobile.core/source/utils/ob-processcontroller.js
---
(0110701)
hgbot   
2019-03-27 16:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5de78866739b4a5dbe05bac59183d8d11c920f96
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Mar 26 14:33:43 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5de78866739b4a5dbe05bac59183d8d11c920f96 [^]

Related to issue 40348. Backout of issue 40266. Remove retail process status feature

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0110703)
hgbot   
2019-03-27 16:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e177d56da527e1cfd50a3866a9d684ef8194067b
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Mar 27 12:31:17 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e177d56da527e1cfd50a3866a9d684ef8194067b [^]

Related to issue 40348. Backout of issue 40232. ProcessController.getProcessesRunning no longer exists

---
M src-db/database/sourcedata/OBMOBC_PROCESS_DEFINITION.xml
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js
---
(0110706)
hgbot   
2019-03-27 18:10   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f7b0766874652bf1c0852bdcad30ebb1b12263f2
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Mar 27 12:27:31 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f7b0766874652bf1c0852bdcad30ebb1b12263f2 [^]

Related to issue 40348. Backout of issue 40262. ProcessController.getProcessesRunning no longer exists

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---