Fix failing cell sizing test with IGListCollectionViewLayout

Summary:
This test started failing in Xcode 15. It looks like now, the default behaviour of `UICollectionView` is to not perform cell sizing until the next layout pass. As such, the sizing of the cells were invalid until `layoutIfNeeded` is first called.

Adding this line to the test brings it back to all of the expected values.

Differential Revision: D49906272

fbshipit-source-id: cc05cb2e105521b2576b2b2013d06e6285f4e8a4
This commit is contained in:
Tim Oliver 2023-10-06 03:08:34 -07:00 committed by Facebook GitHub Bot
parent 51a3cb140e
commit 749a65b1bf

View file

@ -455,6 +455,8 @@
XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
[self.adapter performUpdatesAnimated:YES completion:^(BOOL finished) {
[self.collectionView layoutIfNeeded];
IGTestCell *updatedCell00 = [self cellAtSection:0 item:0];
IGTestCell *updatedCell01 = [self cellAtSection:0 item:1];
IGTestCell *nochangedCell10 = [self cellAtSection:1 item:0];