You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add experiment to ensure ASCollectionView's range controller updates on changeset updates
This experiment makes sure a ASCollectionView's `rangeController` updates when
a changeset WITH updates is applied. Currently it is possible for nodes
inserted into the preload range to not get preloaded when performing a batch
update.
For example, suppose a collection node has:
- Tuning parameters with a preload range of 1 screenful for the given range
mode.
- Nodes A and B where A is visible and B is off screen.
Currently if node B is deleted and a new node C is inserted in its place, node
C will not get preloaded until the collection node is scrolled.
XCTAssertTrue(weakController.asyncDelegate->_itemCounts.size() > nextItemSection, @"There is no items after the last visible item. Update the section/row counts so that there is one for this test to work properly.");
546
+
XCTAssertTrue(weakController.asyncDelegate->_itemCounts[nextItemSection] > nextItemRow, @"There is no items after the last visible item. Update the section/row counts so that there is one for this test to work properly.");
XCTestExpectation *noChangeDone = [selfexpectationWithDescription:@"Batch update with no changes done and completion block has been called. Tuning params set to 1 screenful."];
XCTAssertTrue(nodeBeforeUpdate == nodeAfterUpdate, @"Node should not have changed since no updates were made.");
563
+
XCTAssertTrue(nodeAfterUpdate.didEnterPreloadStateCount == 1, @"Node should have been preloaded.");
564
+
565
+
XCTestExpectation *changeDone = [selfexpectationWithDescription:@"Batch update with changes done and completion block has been called. Tuning params set to 1 screenful."];
XCTestExpectation *changeDoneZeroSreenfuls = [selfexpectationWithDescription:@"Batch update with changes done and completion block has been called. Tuning params set to 0 screenful."];
0 commit comments