Openbravo Issue Tracking System - POS2
View Issue Details
0053241POS2POSpublic2023-08-18 15:012023-10-16 09:37
andre_montenegro 
andre_montenegro 
lowtrivialhave not tried
closedfixed 
5
 
 
No
0053241: Follow up and update to "eslint-plugin-cypress" version which fixes "unsave-to-chain-command" error
After an update to 2.14.0, the cypress/unsafe-to-chain-command rule is triggered by code as:

cy.focused().type("text")

This should be no problem however, as the cypress document states cy.focused() is a query, and it is safe to chain further commands (https://docs.cypress.io/api/commands/focused [^])

Currently, this is an opened issue in plugin's repo: https://github.com/cypress-io/eslint-plugin-cypress/issues/140 [^]

Follow up this issue and update plugin to the version which fixes it and delete the exception "eslint-disable-next-line cypress/unsafe-to-chain-command" from Cypress tests in pos2 module:

- pager.spec.js
- deliveryModes.js
- quotation.js
- ticket.js
- paidReceipts.int.spec.js



By having installed "eslint-plugin-cypress" version 2.14.0, open org.openbravo.pos2/web-jspack/org.openbravo.pos2/src-test/cypress with VSCode and delete the exception
"// eslint-disable-next-line cypress/unsafe-to-chain-command "
for the following tests:

- pager.spec.js
- deliveryModes.js
- quotation.js
- ticket.js
- paidReceipts.int.spec.js

Then, from a terminal at "openbravo/" folder, execute:

./modules/org.openbravo.client.kernel/jslint/jslint

Warning messages appears related with cypress chaining.
No tags attached.
caused by defect 0053197 closed andre_montenegro Remove "cypress/unsafe-to-chain-command" and fix warnings in ci related with eslint-plugin-cypress 
Issue History
2023-08-18 15:01andre_montenegroNew Issue
2023-08-18 15:01andre_montenegroAssigned To => andre_montenegro
2023-08-18 15:01andre_montenegroTriggers an Emergency Pack => No
2023-08-18 15:17andre_montenegroRelationship addedcaused by 0053197
2023-10-04 09:29hgbotNote Added: 0155479
2023-10-04 09:37hgbotNote Added: 0155480
2023-10-16 09:34hgbotResolutionopen => fixed
2023-10-16 09:34hgbotStatusnew => closed
2023-10-16 09:34hgbotFixed in Version => 24Q1
2023-10-16 09:34hgbotNote Added: 0155850
2023-10-16 09:34hgbotNote Added: 0155851
2023-10-16 09:35hgbotNote Added: 0155852
2023-10-16 09:35hgbotNote Added: 0155853
2023-10-16 09:37andre_montenegroFixed in Version24Q1 =>

Notes
(0155479)
hgbot   
2023-10-04 09:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1256 [^]
(0155480)
hgbot   
2023-10-04 09:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2141 [^]
(0155850)
hgbot   
2023-10-16 09:34   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: b0e795fa809e90b845409ad8d30171257a18d706
Author: André Montenegro <andre.montenegro@openbravo.com>
Date: 04-10-2023 09:19:02
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/b0e795fa809e90b845409ad8d30171257a18d706 [^]

Fixes ISSUE-53241: updated eslint-plugin-cypress to latests version

---
M web-jspack/org.openbravo.core2/package-lock.json
M web-jspack/org.openbravo.core2/package.json
---
(0155851)
hgbot   
2023-10-16 09:34   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1256 [^]
(0155852)
hgbot   
2023-10-16 09:35   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6c0d6f24df31d4c2652048a3534efd1180b31456
Author: André Montenegro <andre.montenegro@openbravo.com>
Date: 16-10-2023 09:30:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6c0d6f24df31d4c2652048a3534efd1180b31456 [^]

Fixes ISSUE-53241: deleted eslint exception on cy.focused() command

---
M web-jspack/org.openbravo.pos2/src-test/cypress/e2e/Features/deliveryModes.spec.js
M web-jspack/org.openbravo.pos2/src-test/cypress/e2e/Features/pager.spec.js
M web-jspack/org.openbravo.pos2/src-test/cypress/functions/deliveryModes.js
M web-jspack/org.openbravo.pos2/src-test/cypress/functions/quotation.js
M web-jspack/org.openbravo.pos2/src-test/cypress/functions/ticket.js
M web-jspack/org.openbravo.pos2/src-test/cypress/integration/paidReceipts.int.spec.js
M web-jspack/org.openbravo.pos2/src-test/cypress/integration/productStock.int.spec.js
---
(0155853)
hgbot   
2023-10-16 09:35   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2141 [^]