From 749a65b1bf4a2460eeecf7d6c66bd2611a8c2dff Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Fri, 6 Oct 2023 03:08:34 -0700 Subject: [PATCH] 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 --- Tests/IGListBindingSectionControllerTests.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/IGListBindingSectionControllerTests.m b/Tests/IGListBindingSectionControllerTests.m index cc210cbc..0edb494e 100644 --- a/Tests/IGListBindingSectionControllerTests.m +++ b/Tests/IGListBindingSectionControllerTests.m @@ -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];