Openbravo Issue Tracking System - POS2
View Issue Details
0046320POS2Corepublic2021-04-22 10:572021-04-22 13:59
alostale 
alostale 
normalminorhave not tried
closedopen 
5
 
 
Packaging and release
https://gitlab.com/openbravo/product/openbravo/-/commit/1254c2bec0d1621912813df5887e0b06e2958d36 [^]
No
0046320: cannot execute core2 tests from vscode + jest runner
Trying to execute jest tests defined in core2 module from vscode using the jest runner extension produces an error.

Note that tests defined in other modules (ie. pos2) work fine, also executing the tests from cli is fine.
1. Install jest runner [1] in vscode
2. Run from vscode using this extension any test define in core2 (ie. App.test.jsx)

 FAIL  src/components/App/__test__/App.test.jsx
  ● Test suite failed to run

    SyntaxError: /home/alostale/ws/projects/react/openbravo/modules/org.openbravo.core2/web-jspack/org.openbravo.core2/src/components/App/__test__/App.test.jsx: 
Support for the experimental syntax 'jsx' isn't currently enabled (21:10):

      19 | 
      20 | const AppTestComponent = () => {
    > 21 |   return <div data-testid="obc2App">ABC123</div>;
         |          ^
      22 | };
      23 | 
      24 | describe('App', () => {

    Add @babel/preset-react (https://git.io/JfeDR [^]) to the 'presets' section of your Babel config to enable 
transformation.
    If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA [^]) to the 'plugins' 
section to enable parsing.


[1] https://github.com/firsttris/vscode-jest-runner [^]
No tags attached.
caused by feature request 0045971 closed AugustoMauch Openbravo ERP New UI - infrastructure improvements 
Issue History
2021-04-22 10:57alostaleNew Issue
2021-04-22 10:57alostaleAssigned To => Retail
2021-04-22 10:57alostaleRegression level => Packaging and release
2021-04-22 10:57alostaleRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/1254c2bec0d1621912813df5887e0b06e2958d36 [^]
2021-04-22 10:57alostaleTriggers an Emergency Pack => No
2021-04-22 10:57alostaleRelationship addedcaused by 0045971
2021-04-22 10:57alostaleAssigned ToRetail => alostale
2021-04-22 13:45hgbotNote Added: 0127444
2021-04-22 13:57hgbotNote Added: 0127445
2021-04-22 13:59alostaleNote Added: 0127446
2021-04-22 13:59alostaleStatusnew => closed

Notes
(0127444)
hgbot   
2021-04-22 13:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/475 [^]
(0127445)
hgbot   
2021-04-22 13:57   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/475 [^]
(0127446)
alostale   
2021-04-22 13:59   
It's possible to configure jest runner not to change directory to execute the tests from the root path with "jestrunner.changeDirectoryToWorkspaceRoot": false.