Skip to content

Commit 6c9f928

Browse files
ThomasChadzelekGerrit Code Review
authored andcommitted
Merge "[INTERNAL] sap.ui.model.odata.v4.lib._AggregationCache#expand: iLevels is mandatory"
2 parents 0d0171a + fe5a2b4 commit 6c9f928

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_AggregationCache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ sap.ui.define([
864864
}
865865
if (_Helper.hasPrivateAnnotation(oElement, "expanding")) {
866866
_Helper.deletePrivateAnnotation(oElement, "expanding");
867-
iCount += that.expand(_GroupLock.$cached, oElement).getResult();
867+
iCount += that.expand(_GroupLock.$cached, oElement, 1).getResult();
868868
}
869869
}
870870
}
@@ -1755,7 +1755,7 @@ sap.ui.define([
17551755
let iResult = 1;
17561756
switch (oParentNode ? oParentNode["@$ui5.node.isExpanded"] : true) {
17571757
case false:
1758-
iResult = this.expand(_GroupLock.$cached, sParentPredicate).unwrap() + 1;
1758+
iResult = this.expand(_GroupLock.$cached, sParentPredicate, 1).unwrap() + 1;
17591759
// fall through
17601760
case true:
17611761
break;
@@ -1819,7 +1819,7 @@ sap.ui.define([
18191819
this.aElements.splice(iNodeIndex, 1);
18201820
this.aElements.splice(iParentIndex + 1, 0, oNode);
18211821
if (bExpanded) {
1822-
this.expand(_GroupLock.$cached, sNodePredicate);
1822+
this.expand(_GroupLock.$cached, sNodePredicate, 1);
18231823
}
18241824
}
18251825
});

src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,7 +3222,7 @@ sap.ui.define([
32223222
.withExactArgs(sinon.match.same(oGroupLock), "~path~", "~iLevels~")
32233223
.callThrough(); // for code under test
32243224
oCacheMock.expects("expand").exactly(bStale ? 0 : 1)
3225-
.withExactArgs(sinon.match.same(_GroupLock.$cached), sinon.match.same(aSpliced[2]))
3225+
.withExactArgs(sinon.match.same(_GroupLock.$cached), sinon.match.same(aSpliced[2]), 1)
32263226
.returns(SyncPromise.resolve(100));
32273227
if (bStale) {
32283228
oCacheMock.expects("isSelectionDifferent")
@@ -5598,7 +5598,7 @@ sap.ui.define([
55985598
const oCollapseExpectation = oCacheMock.expects("collapse").exactly(bChildExpanded ? 1 : 0)
55995599
.withExactArgs("('23')").returns("~collapseCount~");
56005600
oCacheMock.expects("expand").exactly(bNewParentExpanded === false ? 1 : 0)
5601-
.withExactArgs(sinon.match.same(_GroupLock.$cached), "('42')")
5601+
.withExactArgs(sinon.match.same(_GroupLock.$cached), "('42')", 1)
56025602
.returns(SyncPromise.resolve(47));
56035603
oHelperMock.expects("updateAll")
56045604
.exactly(oParentNode && bNewParentExpanded === undefined ? 1 : 0)
@@ -7526,7 +7526,7 @@ sap.ui.define([
75267526
assert.strictEqual(oCache.aElements.indexOf(oNode3), 5, "not yet moved");
75277527
});
75287528
this.mock(oCache).expects("expand")
7529-
.withExactArgs(sinon.match.same(_GroupLock.$cached), "~predicate3~")
7529+
.withExactArgs(sinon.match.same(_GroupLock.$cached), "~predicate3~", 1)
75307530
.callsFake(function () {
75317531
assert.strictEqual(oCache.aElements.indexOf(oNode3), 2,
75327532
"moved immediately behind parent (snapshot)");

0 commit comments

Comments
 (0)