Skip to content

Commit 68b2b9c

Browse files
fix: correct off-by-one header/row assertions in ENROLLMENT_OU e2e test (#24506)
queryWithProgramAndFilterByEnrollmentOuKeyword asserted 16 headers/columns, one short of the 17 its sibling queryWithProgramAndFilterByEnrollmentOrgUnit correctly asserts for the equivalent `.ou` query. 2.43's TrackedEntityStaticField includes a storedby field that master's does not, so the 16-header expectation (correct on master, where this test originated) became stale once cherry-picked onto 2.43. Verified the corrected assertions exactly match the sibling test's row data and pass against a live server. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent d66adbd commit 68b2b9c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

dhis-2/dhis-test-e2e/src/test/java/org/hisp/dhis/analytics/trackedentity/TrackedEntityQueryTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,13 +1478,13 @@ public void queryWithProgramAndFilterByEnrollmentOuKeyword() {
14781478
response
14791479
.validate()
14801480
.statusCode(200)
1481-
.body("headers", hasSize(equalTo(16)))
1481+
.body("headers", hasSize(equalTo(17)))
14821482
.body("rows", hasSize(equalTo(14)))
14831483
.body("metaData.dimensions.ou", hasSize(equalTo(1)))
14841484
.body("metaData.dimensions.ou", hasItem("BV4IomHvri4"))
14851485
.body("height", equalTo(14))
1486-
.body("width", equalTo(16))
1487-
.body("headerWidth", equalTo(16));
1486+
.body("width", equalTo(17))
1487+
.body("headerWidth", equalTo(17));
14881488

14891489
// Validate the first three rows, as samples (identical to the `ou` variant).
14901490
validateRow(
@@ -1499,6 +1499,7 @@ public void queryWithProgramAndFilterByEnrollmentOuKeyword() {
14991499
"",
15001500
"",
15011501
"",
1502+
"",
15021503
"Ahmadiyya Muslim Hospital",
15031504
"OU_268246",
15041505
"Sierra Leone / Tonkolili / Yoni / Ahmadiyya Muslim Hospital",
@@ -1520,6 +1521,7 @@ public void queryWithProgramAndFilterByEnrollmentOuKeyword() {
15201521
"",
15211522
"",
15221523
"",
1524+
"",
15231525
"Ahmadiyya Muslim Hospital",
15241526
"OU_268246",
15251527
"Sierra Leone / Tonkolili / Yoni / Ahmadiyya Muslim Hospital",
@@ -1541,6 +1543,7 @@ public void queryWithProgramAndFilterByEnrollmentOuKeyword() {
15411543
"",
15421544
"",
15431545
"",
1546+
"",
15441547
"Ahmadiyya Muslim Hospital",
15451548
"OU_268246",
15461549
"Sierra Leone / Tonkolili / Yoni / Ahmadiyya Muslim Hospital",

0 commit comments

Comments
 (0)