Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045019
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSmajorhave not tried2020-09-09 16:192021-02-19 07:16
ReporteralostaleView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionout of dateFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045019: run jest tests in strict mode

DescriptionJest tests should be run in strict mode. This would prevent at least two kind of problems (see 0044752 and 0045016):

* usage of global scope objects
* mutating frozen objects
Steps To Reproduce-
Proposed SolutionIt is possible to run in this way through node parameter. To check if it can be enforced somehow to be run through "npm test". If not possible, we could at least run in this mode in CI.

node --use_strict node_modules/.bin/jest

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0044752 closedalostale Retail Modules do not use global scope in jest tests 
related to defect 0045016 closedRetail Retail Modules state actions mutate objects 
related to defect 0045796 newRetail Retail Modules Some jest tests were disabled in the org.openbravo.retail.asyncpayprovider module 
depends on defect 0045814 closedranjith_qualiantech_com Retail Modules jest test in nexoprovider fail with --strict-mode 
related to defect 0045751 closedranjith_qualiantech_com Retail Modules jest tests in org.openbravo.retail.asyncpayprovider module does not work in jest script mode (i.e. in context of pos2) 
related to defect 0045750 closedranjith_qualiantech_com Retail Modules do not use global scope in jest tests (fix new cases) 
related to defect 0045820 newRetail Retail Modules Two jest tests have been disabled in Nexo provider as they imported enyo and could not be run in strict mode 
related to feature request 0045846 closedalostale Openbravo ERP prepare infrastructure to support react applications 

-  Notes
(0126175)
hgbot (developer)
2021-02-19 06:44

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 658ef158103e8cfcc5ae4ae5de330370f1cf5edf
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-02-19T06:42:32+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/658ef158103e8cfcc5ae4ae5de330370f1cf5edf [^]

fixes FR-45846: prepare infrastructure to support react applications

MR !301

Prepares infrastructure to support react applications:

    * Openbravo modules can define react applications within web-jspack directory
       * They have specific eslint rules defined in eslintrc-airbnb-react
       * They can define jest tests outside web-test directory
    * Jest tests are pre-compiled with babel to allow transforming jsx into JavaScript.
      This makes all jest test to be run in strict mode (FR-45019)

---
A babel.config.js
A jest.setup.js
A modules/org.openbravo.client.kernel/eslint-airbnb/eslintrc-airbnb-react.template
A modules/org.openbravo.client.kernel/jsutils/fileMock.js
M .githooks/pre-commit.d/00-jslint
M .githooks/pre-commit.d/01-jsformatter
M lerna.json
M modules/org.openbravo.client.kernel/eslint-airbnb/copy-config
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
M package-lock.json
M package.json
---
(0126177)
alostale (manager)
2021-02-19 07:16

After 0045846 jest tests are run in strict mode

- Issue History
Date Modified Username Field Change
2020-09-09 16:19 alostale New Issue
2020-09-09 16:19 alostale Assigned To => Retail
2020-09-09 16:19 alostale Triggers an Emergency Pack => No
2020-09-09 16:19 alostale Relationship added related to 0044752
2020-09-09 16:19 alostale Relationship added related to 0045016
2021-01-19 12:52 shuehner Issue Monitored: shuehner
2021-01-19 12:54 shuehner Relationship added related to 0045751
2021-01-19 12:55 shuehner Relationship added related to 0045750
2021-01-29 13:10 shuehner Relationship added related to 0045796
2021-01-29 13:13 shuehner Relationship added depends on 0045814
2021-02-01 07:13 marvintm Relationship added related to 0045820
2021-02-04 11:57 alostale Relationship added related to 0045846
2021-02-19 06:44 hgbot Note Added: 0126175
2021-02-19 07:16 alostale Note Added: 0126177
2021-02-19 07:16 alostale Status new => closed
2021-02-19 07:16 alostale Resolution open => out of date


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker