mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-03 19:54:31 +00:00
Add a failing unit test for automeasuring a node mid-transition (#2204)
This commit is contained in:
@@ -1986,4 +1986,22 @@ static bool stringContainsPointer(NSString *description, id p) {
|
||||
XCTAssertTrue(subnode.hasFetchedData);
|
||||
}
|
||||
|
||||
// FIXME
|
||||
// Supernode is measured, subnode isnt, transition starts, UIKit does a layout pass before measurement finishes
|
||||
- (void)DISABLED_testThatItsSafeToAutomeasureANodeMidTransition
|
||||
{
|
||||
ASDisplayNode *supernode = [[ASDisplayNode alloc] init];
|
||||
[supernode measure:CGSizeMake(100, 100)];
|
||||
ASDisplayNode *node = [[ASDisplayNode alloc] init];
|
||||
node.bounds = CGRectMake(0, 0, 50, 50);
|
||||
[supernode addSubnode:node];
|
||||
|
||||
XCTAssertNil(node.calculatedLayout);
|
||||
XCTAssertTrue(node.layer.needsLayout);
|
||||
|
||||
[supernode transitionLayoutWithAnimation:NO shouldMeasureAsync:YES measurementCompletion:nil];
|
||||
|
||||
XCTAssertNoThrow([node.view layoutIfNeeded]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user