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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0048987
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POSmajorhave not tried2022-04-06 14:532022-04-17 21:12
ReporterjarmendarizView Statuspublic 
Assigned Tojarmendariz 
PriorityhighResolutionfixedFixed 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

0048987: Improve jest tests to make them compatible with Node 16

DescriptionSome tests are passing with the current Node version (v14), but v16 introduces some changes that makes a few test fails.

At the moment we only noticed two scenarios:

1- In ErrorHandler.test.js, the runtime exception message changed from - "Cannot read property 'b' of undefined" to "Cannot read properties of undefined (reading 'b')

2- Unhandled Promise rejection warning:
Currently in v14 the following message appears:

(node:539993) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode [^]). (rejection id: 2)
(node:539993) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Starting from v16, those warnings becomes errors, so it would be nice to fix them as soon as possible.
Steps To ReproduceSee description
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0049048TAP closedjarmendariz Improve jest tests to make them compatible with Node 16 
blocks feature request 0048870 closedjarmendariz Add support to Node 16/Npm 8 

-  Notes
(0136374)
hgbot (developer)
2022-04-06 18:58

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/730 [^]
(0136375)
hgbot (developer)
2022-04-06 18:58

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/917 [^]
(0136376)
hgbot (developer)
2022-04-06 18:59

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/134 [^]
(0136527)
hgbot (developer)
2022-04-17 21:12

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: e1193e7bd13b30ef641baf882eda310492594c18
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 17-04-2022 20:41:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/e1193e7bd13b30ef641baf882eda310492594c18 [^]

Fixed ISSUE-48987: Improved tests that will potentially break on Node v16

---
M web-jspack/org.openbravo.core2/src/core/error/__test__/ErrorHandler.test.js
---
(0136528)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 0d91944ecadc67a2359eb4e37794165510c810ba
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/0d91944ecadc67a2359eb4e37794165510c810ba [^]

Related to ISSUE-48987: Correctly handle unmounted MultiStepProcess, to fix some unresolved promise test

---
M web-jspack/org.openbravo.core2/src/components/MultiStepProcess/MultiStepProcess.jsx
---
(0136529)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 3bcfe124703a991f358cf69b170eac3ded7fe211
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/3bcfe124703a991f358cf69b170eac3ded7fe211 [^]

Related to ISSUE-48987: Change material-ui/core imports to be explicit, avoiding css warning

---
M web-jspack/org.openbravo.core2/src/components/BaseAccordion/BaseAccordion.jsx
M web-jspack/org.openbravo.core2/src/components/BaseButtonGroup/BaseButtonGroup.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormCheckbox/BaseFormCheckbox.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/BaseFormInput.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/ClearInputButton.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormRadioGroup/BaseFormRadioGroup.jsx
M web-jspack/org.openbravo.core2/src/components/BaseGridLayout/BaseGridLayout.jsx
M web-jspack/org.openbravo.core2/src/components/BaseKeymap/hooks/usePagination.js
M web-jspack/org.openbravo.core2/src/components/BaseList/BaseList.jsx
M web-jspack/org.openbravo.core2/src/components/BaseMenu/BaseMenu.jsx
M web-jspack/org.openbravo.core2/src/components/BaseMenuItemSubmenu/BaseMenuItemSubmenu.jsx
M web-jspack/org.openbravo.core2/src/components/BasePopover/BasePopover.jsx
M web-jspack/org.openbravo.core2/src/components/BaseSwitch/BaseSwitch.jsx
M web-jspack/org.openbravo.core2/src/components/ConfigSwipeableLine/BaseSwipeableLine.jsx
M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/DataGrid.jsx
M web-jspack/org.openbravo.core2/src/components/InputPassword/InputPassword.jsx
M web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.jsx
M web-jspack/org.openbravo.core2/src/components/MultiStepProcess/MultiStepProcessTitle/MultiStepProcessTitle.jsx
M web-jspack/org.openbravo.core2/src/components/SettingsButton/SettingsButton.jsx
---
(0136530)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 715847010705c5a1828c50db55ea50380c40efed
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 17-04-2022 20:41:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/715847010705c5a1828c50db55ea50380c40efed [^]

Related to ISSUE-48987: Fixing deprecated use of fs.rmdir()

---
M web-jspack/org.openbravo.core2/src/storybook/Storyshots.test.js
---
(0136531)
hgbot (developer)
2022-04-17 21:12

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/730 [^]
(0136532)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: eba72e25ff0740fac57cbf933c60374abb0f1d78
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/eba72e25ff0740fac57cbf933c60374abb0f1d78 [^]

Related to ISSUE-48987: Fix KeyMapEditor test with unhandled-promises error

---
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/__test__/KeyMapEditor.test.jsx
---
(0136533)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 2d2eaf172f0fa287a7f0231ac500a71e40204d71
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/2d2eaf172f0fa287a7f0231ac500a71e40204d71 [^]

Related to ISSUE-48987: Fix warning related to material-ui css, by importing directly instead of destructured import

---
M web-jspack/org.openbravo.pos2/src/components/Customer/CustomerForm/CustomerForm.jsx
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentMethods/PaymentMethodsStandardPanel/PaymentMethodsStandardPanel.jsx
M web-jspack/org.openbravo.pos2/src/components/ProofOfPayment/ProofOfPaymentDetails/ProofOfPaymentDetails.jsx
M web-jspack/org.openbravo.pos2/src/components/ProofOfPayment/ProofOfPaymentList/ProofOfPaymentList.jsx
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/TicketLines.jsx
---
(0136534)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: dadad3d67e35c18d4b593237b8388b958a5ee439
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/dadad3d67e35c18d4b593237b8388b958a5ee439 [^]

Related to ISSUE-48987: Disable not correctly mocked KeyMapEditorLayout second test

This test has missing mocks, it generates several unresolved promises.
To see the missing mocked functions/things, an await waitFor can be
added at the bottom, as specified in the added comment by this commit.

Doing that, it will show an error, regarding some not mocked functions,
there are a lot of them, and should be similar to what we have for
getKeymapInformation.test.js.

---
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/__test__/KeyMapEditorLayout.test.jsx
---
(0136535)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 9135b7df17305639414c39b7868becb7424e8ac1
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 17-04-2022 20:41:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/9135b7df17305639414c39b7868becb7424e8ac1 [^]

Related to ISSUE-48987: Fixed KeymapEditorLayout test

---
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/__test__/KeyMapEditorLayout.test.jsx
---
(0136536)
hgbot (developer)
2022-04-17 21:12

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/917 [^]
(0136537)
hgbot (developer)
2022-04-17 21:12

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant [^]
Changeset: f771da30bff5b1edee0bccc207e68ba76cc8e301
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 17-04-2022 20:41:19
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/commit/f771da30bff5b1edee0bccc207e68ba76cc8e301 [^]

Related to ISSUE-48987: Change material-ui imports to be explicit, fixes css warning

A new warning appears with material-ui/styles 4.12.x, which is fixed by
explicitly importing the files/components used, instead of using a
destructured general import.

---
M web-jspack/org.openbravo.pos2.restaurant/src/components/TicketMenuLine/TicketMenuInProgressLineItem/TicketMenuInProgressLineItem.jsx
---
(0136538)
hgbot (developer)
2022-04-17 21:12

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/134 [^]

- Issue History
Date Modified Username Field Change
2022-04-06 14:53 jarmendariz New Issue
2022-04-06 14:53 jarmendariz Assigned To => jarmendariz
2022-04-06 14:53 jarmendariz Triggers an Emergency Pack => No
2022-04-06 14:53 jarmendariz Status new => scheduled
2022-04-06 14:54 jarmendariz Relationship added blocks 0048870
2022-04-06 18:58 hgbot Note Added: 0136374
2022-04-06 18:58 hgbot Note Added: 0136375
2022-04-06 18:59 hgbot Note Added: 0136376
2022-04-13 09:12 jarmendariz Status scheduled => acknowledged
2022-04-13 09:12 jarmendariz Status acknowledged => scheduled
2022-04-17 21:12 hgbot Resolution open => fixed
2022-04-17 21:12 hgbot Status scheduled => closed
2022-04-17 21:12 hgbot Note Added: 0136527
2022-04-17 21:12 hgbot Note Added: 0136528
2022-04-17 21:12 hgbot Note Added: 0136529
2022-04-17 21:12 hgbot Note Added: 0136530
2022-04-17 21:12 hgbot Note Added: 0136531
2022-04-17 21:12 hgbot Note Added: 0136532
2022-04-17 21:12 hgbot Note Added: 0136533
2022-04-17 21:12 hgbot Note Added: 0136534
2022-04-17 21:12 hgbot Note Added: 0136535
2022-04-17 21:12 hgbot Note Added: 0136536
2022-04-17 21:12 hgbot Note Added: 0136537
2022-04-17 21:12 hgbot Note Added: 0136538


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker