Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0053412 | POS2 | POS | public | 2023-09-07 12:02 | 2023-09-15 11:41 |
Reporter | andre_montenegro | ||||
Assigned To | andre_montenegro | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0053412: Modify ProductButtonContentName data-testid to be unique | ||||
Description | As some performance degradation has been observed in Cypress tests when adding a product to the ticket several times, by reviewing Cypress documentation I found out that one of the reasons could be that “cy.get()” receives more than 1 value, which is actually our case as all product buttons have the same data-testid value and the one is desired, is filtered by it’s content text. After testing this change as a draft and by reverting some workarounds to some of this performance degradation failures, results are that job execution time does not improve, but degradation in tests is decreased as no test failed anymore. It has been tested more than 15 times. | ||||
Steps To Reproduce | Replace productT3 test (from product.spec.js) by this tests steps: " cy.changeProductCategory(this.testData.productCategory2); cy.addProduct(this.testData.product4); cy.paginateProductVertical(1); cy.addProduct(this.testData.product5); cy.paginateProductVertical(0); cy.addProduct(this.testData.product6); cy.assertNumLines(3); cy.addProduct(this.testData.product4); cy.paginateProductVerticalArrows('Down'); cy.addProduct(this.testData.product5); cy.paginateProductVerticalArrows('Up'); cy.addProduct(this.testData.product6); cy.assertNumLines(3); cy.window().should(win => { expect(win.OB.App.State.getState().Ticket.lines[0].qty).to.equal(2); expect(win.OB.App.State.getState().Ticket.lines[1].qty).to.equal(2); expect(win.OB.App.State.getState().Ticket.lines[2].qty).to.equal(2); }); " Which can easily reproduce this degradation in the performance and will fail when trying to add a product to the ticket. Launch a try-pos2 execution with the mentioned change and observe the degradation in the video and the failure. | ||||
Proposed Solution | Use an unique data-testid for each product button (ProductButtonContentName.jsx): For example: data-testid={`${testId}-${payload.identifier}`} instead data-testid={`${testId}-identifier`} This will also require to fix Jest and Cypress tests which can be affected by the change. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2023-09-07 12:02 | andre_montenegro | New Issue | |||
2023-09-07 12:02 | andre_montenegro | Assigned To | => andre_montenegro | ||
2023-09-07 12:02 | andre_montenegro | Triggers an Emergency Pack | => No | ||
2023-09-07 12:06 | andre_montenegro | Proposed Solution updated | |||
2023-09-13 10:47 | hgbot | Note Added: 0154771 | |||
2023-09-13 11:03 | hgbot | Note Added: 0154772 | |||
2023-09-15 11:37 | hgbot | Note Added: 0154889 | |||
2023-09-15 11:37 | hgbot | Note Added: 0154890 | |||
2023-09-15 11:37 | hgbot | Note Added: 0154891 | |||
2023-09-15 11:37 | hgbot | Note Added: 0154892 | |||
2023-09-15 11:37 | hgbot | Note Added: 0154893 | |||
2023-09-15 11:39 | hgbot | Note Added: 0154894 | |||
2023-09-15 11:39 | hgbot | Note Added: 0154895 | |||
2023-09-15 11:41 | andre_montenegro | Status | new => scheduled | ||
2023-09-15 11:41 | andre_montenegro | Status | scheduled => resolved | ||
2023-09-15 11:41 | andre_montenegro | Resolution | open => fixed | ||
2023-09-15 11:41 | andre_montenegro | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|