Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044757Retail ModulesWeb POSpublic2020-08-05 14:082020-08-05 14:25
jarmendariz 
jarmendariz 
normalminoralways
closedfixed 
5
 
RR20Q4 
alostale
No
0044757: SynchronizationBuffer unit test is not testing the subject's behavior
Test 'when IndexedDB persist fails'.'isReceivingMessages flag is set to false even when persist fails' checks that this.isReceivingMessages is false. This test will always pass because it should check the isReceivingMessages property in SynchronizationBuffer instance.
1- Execute 'isReceivingMessages flag is set to false even when persist fails' test in SynchronizationBuffer.test.js. Chech that it passes.
2- Change the following line in SynchronizationBuffer.js:

  try {
    await OB.App.MessageModelController.put(messages);
  } finally {
  // Comment the following line to force the test to fail
  // this.isReceivingMessages = false;
  }

3- Run again 'isReceivingMessages flag is set to false even when persist fails'. Check that the test still passes even if it's supposed to fail.
No tags attached.
Issue History
2020-08-05 14:08jarmendarizNew Issue
2020-08-05 14:08jarmendarizAssigned To => jarmendariz
2020-08-05 14:08jarmendarizTriggers an Emergency Pack => No
2020-08-05 14:09jarmendarizReview Assigned To => alostale
2020-08-05 14:09jarmendarizStatusnew => scheduled
2020-08-05 14:22hgbotNote Added: 0121854
2020-08-05 14:25hgbotNote Added: 0121855
2020-08-05 14:25hgbotResolutionopen => fixed
2020-08-05 14:25hgbotStatusscheduled => closed
2020-08-05 14:25hgbotFixed in Version => RR20Q4
2020-08-05 14:25hgbotNote Added: 0121856

Notes
(0121854)
hgbot   
2020-08-05 14:22   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/44 [^]
(0121855)
hgbot   
2020-08-05 14:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/44 [^]
(0121856)
hgbot   
2020-08-05 14:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 070ec48f7faa8ca07acd087fe34cfa1d4896b235
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 2020-08-05T14:12:11+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/070ec48f7faa8ca07acd087fe34cfa1d4896b235 [^]

Fixed ISSUE-44757: SynchronizationBuffer test does not test the subject's behavior.

Instead of checking the synchronizationBuffer's property value, it checks for a local flag that
is never set, so it always passes regardless the syncBuffer behavior

---
M web-test/model/synchronization-buffer/SynchronizationBuffer.test.js
---