Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048373Openbravo ERPA. Platformpublic2022-01-11 11:402022-05-18 11:48
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
PR22Q2 
Core
No
0048373: Provide test matchers for asserting JSON objects
It would be nice to provide some core test matchers for asserting the content of JSON objects and JSON arrays in tests
.
No tags attached.
related to defect 0049170 closed caristu Openbravo ERP matchesObject should not compare array properties with strict equality 
related to defect 0049226 closed caristu Openbravo ERP matchesObject should fail if there are missing properties in actual 
related to defect 0048627 closed njimenez Modules Use core JSONMatchers in the test infrastructure 
Issue History
2022-01-11 11:40caristuNew Issue
2022-01-11 11:40caristuAssigned To => Triage Platform Base
2022-01-11 11:40caristuModules => Core
2022-01-11 11:40caristuTriggers an Emergency Pack => No
2022-01-11 15:46caristuAssigned ToTriage Platform Base => caristu
2022-01-11 15:48hgbotNote Added: 0134230
2022-01-21 13:24hgbotResolutionopen => fixed
2022-01-21 13:24hgbotStatusnew => closed
2022-01-21 13:24hgbotFixed in Version => PR22Q2
2022-01-21 13:24hgbotNote Added: 0134487
2022-01-21 13:24hgbotNote Added: 0134488
2022-01-21 14:42hgbotNote Added: 0134490
2022-01-21 15:13hgbotNote Added: 0134491
2022-01-25 09:18hgbotNote Added: 0134541
2022-01-25 09:18hgbotNote Added: 0134542
2022-01-25 12:08hgbotNote Added: 0134550
2022-02-18 08:36caristuRelationship addedrelated to 0048627
2022-04-20 18:53caristuTypedefect => feature request
2022-05-04 13:09alostaleRelationship addedrelated to 0049170
2022-05-18 11:41caristuRelationship addedrelated to 0049226
2022-05-18 11:48hgbotNote Added: 0137416

Notes
(0134230)
hgbot   
2022-01-11 15:48   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/497 [^]
(0134487)
hgbot   
2022-01-21 13:24   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: c2fc6cf83291de6301a560cb8b99376d53088030
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 21-01-2022 11:51:34
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/c2fc6cf83291de6301a560cb8b99376d53088030 [^]

fixes ISSUE-48373: Test matchers for asserting JSON objects

---
A src-test/src/org/openbravo/test/matchers/json/HasItems.java
A src-test/src/org/openbravo/test/matchers/json/HasMatchingItems.java
A src-test/src/org/openbravo/test/matchers/json/IsEqualJSONObject.java
A src-test/src/org/openbravo/test/matchers/json/IsMatchingJSONObject.java
A src-test/src/org/openbravo/test/matchers/json/JSONComparator.java
A src-test/src/org/openbravo/test/matchers/json/JSONMatchers.java
A src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
M src-test/src/org/openbravo/test/StandaloneTestSuite.java
---
(0134488)
hgbot   
2022-01-21 13:24   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/497 [^]
(0134490)
hgbot   
2022-01-21 14:42   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 8ae70ddd78421b6e39b87c367f6517ebfb9b2095
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 21-01-2022 14:40:46
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/8ae70ddd78421b6e39b87c367f6517ebfb9b2095 [^]

related to ISSUE-48373: improve API for asserting inner objects

---
M src-test/src/org/openbravo/test/matchers/json/JSONComparator.java
M src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
---
(0134491)
hgbot   
2022-01-21 15:13   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 69d5425d2df00dd6158723e38e2569ed262061a2
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 21-01-2022 15:12:32
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/69d5425d2df00dd6158723e38e2569ed262061a2 [^]

related to ISSUE-48373: skip broken test

Test introduced by 8ae70ddd784 fails, let's @Ignore it till it's fixed.

---
M src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
---
(0134541)
hgbot   
2022-01-25 09:18   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 30c14adc57cbe5af7bc136bb2ec21b37a5c5e22c
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 24-01-2022 08:25:32
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/30c14adc57cbe5af7bc136bb2ec21b37a5c5e22c [^]

related to ISSUE-48373: fix failing test

---
M src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
---
(0134542)
hgbot   
2022-01-25 09:18   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 20904b11ad82f3cb37e2e3bce67127dedbf8d477
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 25-01-2022 09:14:59
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/20904b11ad82f3cb37e2e3bce67127dedbf8d477 [^]

related to ISSUE-48373: improve mismatch messages

---
A src-test/src/org/openbravo/test/matchers/json/JSONMatcher.java
M src-test/src/org/openbravo/test/matchers/json/HasItems.java
M src-test/src/org/openbravo/test/matchers/json/IsEqualJSONObject.java
M src-test/src/org/openbravo/test/matchers/json/IsMatchingJSONObject.java
M src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
R src-test/src/org/openbravo/test/matchers/json/JSONComparator.java
---
(0134550)
hgbot   
2022-01-25 12:08   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 486de4a94d858dca68dde3b5786083cb30caafe1
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 25-01-2022 12:07:42
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/486de4a94d858dca68dde3b5786083cb30caafe1 [^]

related to ISSUE-48373: minor message improvement

---
M src-test/src/org/openbravo/test/matchers/json/IsEqualJSONObject.java
M src-test/src/org/openbravo/test/matchers/json/IsMatchingJSONObject.java
---
(0137416)
hgbot   
2022-05-18 11:48   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d05fa29de3dcfb7bc4985051845b169157f4f6ee
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 18-05-2022 11:48:04
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d05fa29de3dcfb7bc4985051845b169157f4f6ee [^]

related to BUG-48373: add missing tests for empty JSON

---
M src-test/src/org/openbravo/test/matchers/json/JSONMatchersTest.java
---