Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045751Retail ModulesWeb POSpublic2021-01-19 12:542021-01-27 17:07
shuehner 
ranjith_qualiantech_com 
normalminorhave not tried
closedfixed 
5
 
 
No
0045751: jest tests in org.openbravo.retail.asyncpayprovider module does not work in jest script mode (i.e. in context of pos2)
Running jest test of this module in strict mode as it is done as part of pos2 module fails.

Those tests should be fixed to work fine in strict mode.

Example error:
Test suite failed to run

    ReferenceError: enyo is not defined

      4 | (function() {
      5 | var e = "enyo.js";
    > 6 | enyo = window.enyo || {}, enyo.locateScript = function(e) {
        | ^
      7 | var t = document.getElementsByTagName("script");
      8 | for (var n = t.length - 1, r, i, s = e.length; n >= 0 && (r = t[n]); n--) if (!r.located) {
      9 | i = r.getAttribute("src") || "";

      at modules/org.openbravo.mobile.core/web/org.openbravo.mobile.core/build/enyo.js:6:5
      at Object.<anonymous> (modules/org.openbravo.mobile.core/web/org.openbravo.mobile.core/build/enyo.js:4:1)
      at Object.<anonymous> (modules/org.openbravo.retail.asyncpayprovider/web-test/rootasyncpay.js:19:1)
      at Object.<anonymous> (modules/org.openbravo.retail.asyncpayprovider/web-test/managemessages.test.js:13:1)
Run jest for this module inside pos2 environment

or

run jest in strict mode as explained in 45019
No tags attached.
related to feature request 0045019 closed Retail run jest tests in strict mode 
related to defect 0045796 new Retail Some jest tests were disabled in the org.openbravo.retail.asyncpayprovider module 
Issue History
2021-01-19 12:54shuehnerNew Issue
2021-01-19 12:54shuehnerAssigned To => Retail
2021-01-19 12:54shuehnerTriggers an Emergency Pack => No
2021-01-19 12:54shuehnerRelationship addedrelated to 0045019
2021-01-19 14:01javietxeIssue Monitored: javietxe
2021-01-25 11:27ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-01-25 11:27ranjith_qualiantech_comStatusnew => scheduled
2021-01-26 18:31shuehnerIssue Monitored: shuehner
2021-01-27 15:37hgbotNote Added: 0125805
2021-01-27 17:06marvintmRelationship addedrelated to 0045796
2021-01-27 17:06hgbotResolutionopen => fixed
2021-01-27 17:06hgbotStatusscheduled => closed
2021-01-27 17:06hgbotNote Added: 0125809
2021-01-27 17:06hgbotNote Added: 0125810
2021-01-27 17:07marvintmNote Added: 0125811

Notes
(0125805)
hgbot   
2021-01-27 15:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/6 [^]
(0125809)
hgbot   
2021-01-27 17:06   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: 430f5bc88f54ab0e02fdbbd87760d690a2290aa5
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-01-27T11:39:56+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/430f5bc88f54ab0e02fdbbd87760d690a2290aa5 [^]

Fixed ISSUE-45751: Removed enyo dependent from jest test
* Disabled jest which depends on enyo

---
M web-test/inputanykey.test.js
M web-test/inputconfirmation.test.js
M web-test/inputdigit.test.js
M web-test/inputfunctionkey.test.js
M web-test/inputmenuentry.test.js
M web-test/rootasyncpay.js
---
(0125810)
hgbot   
2021-01-27 17:06   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/6 [^]
(0125811)
marvintm   
2021-01-27 17:07   
Tests have been disabled for now. We will refactor them to make them compatible with jest strict mode and reenable them later