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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045750
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2021-01-19 12:492021-01-26 08:00
ReportershuehnerView Statuspublic 
Assigned Toranjith_qualiantech_com 
PrioritynormalResolutionfixedFixed 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

0045750: do not use global scope in jest tests (fix new cases)

DescriptionCurrently many jest tests are using the global scope, mainly to simulate OB object. This will not be allowed by Babel which will be required by 0044751 to support jest tests with JSX.

This is clone of 44752 bug to cover new cases added since then.

- org.openbravo.retail.sessions
 web-test/model/business-object/cashup/Cashup-processCashManagements-AddHook.test.js

- org.openbravo.retail.giftcards
web-test/model/business-object/cashup/Cashup-processCashManagements-ActionPreparation.test.js
web-test/model/business-object/cashup/Cashup-processCashManagements-AddHook.test.js

Steps To Reproducerun tests in strict mode which does not allow global:

    ReferenceError: OB is not defined

       9 | /* global global */
      10 |
    > 11 | OB = {
         | ^
      12 | App: {
      13 | Class: {}
      14 | },

Proposed SolutionUse global object instead of global scope.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0044752 closedalostale do not use global scope in jest tests 
related to feature request 0045019 closedRetail run jest tests in strict mode 

-  Notes
(0125763)
hgbot (developer)
2021-01-26 02:01

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/36 [^]
(0125764)
hgbot (developer)
2021-01-26 02:01

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/14 [^]
(0125773)
hgbot (developer)
2021-01-26 07:59

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/14 [^]
(0125774)
hgbot (developer)
2021-01-26 07:59

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions [^]
Changeset: bf5d510eee01d5f21e50dc963d02b5923a588879
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-01-25T15:55:04+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/commit/bf5d510eee01d5f21e50dc963d02b5923a588879 [^]

Related to ISSUE-45750: Use global scope used in jest test

---
M web-test/model/business-object/cashup/SetupCashup.js
---
(0125775)
hgbot (developer)
2021-01-26 08:00

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 181b4bb63c3c81f8fe143a393bccd52f089d9d1b
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-01-25T15:54:59+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/181b4bb63c3c81f8fe143a393bccd52f089d9d1b [^]

Fixed ISSUE-45750: Use global scope used in jest test

---
M web-test/model/business-object/cashup/SetupCashup.js
---
(0125776)
hgbot (developer)
2021-01-26 08:00

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/36 [^]

- Issue History
Date Modified Username Field Change
2021-01-19 12:49 shuehner New Issue
2021-01-19 12:49 shuehner Assigned To => Retail
2021-01-19 12:49 shuehner Triggers an Emergency Pack => No
2021-01-19 12:49 shuehner Issue generated from 0044752
2021-01-19 12:49 shuehner Relationship added related to 0044752
2021-01-19 12:55 shuehner Relationship added related to 0045019
2021-01-19 14:02 javietxe Issue Monitored: javietxe
2021-01-25 10:44 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2021-01-25 11:26 ranjith_qualiantech_com Status new => scheduled
2021-01-26 02:01 hgbot Note Added: 0125763
2021-01-26 02:01 hgbot Note Added: 0125764
2021-01-26 07:59 hgbot Note Added: 0125773
2021-01-26 07:59 hgbot Note Added: 0125774
2021-01-26 08:00 hgbot Resolution open => fixed
2021-01-26 08:00 hgbot Status scheduled => closed
2021-01-26 08:00 hgbot Note Added: 0125775
2021-01-26 08:00 hgbot Note Added: 0125776


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker