Propagate ASTraitCollection for snapshot testing (#1646)

Our helper methods set the current trait collection on the node we want
to snapshot but did not propagate the trait collection as expected.
This commit is contained in:
Rahul Malik
2019-08-28 10:43:00 -07:00
committed by GitHub
parent caa0d8de54
commit dfe0f57311
+1 -1
View File
@@ -36,7 +36,7 @@ NSOrderedSet *ASSnapshotTestCaseDefaultSuffixes(void)
// Since the goal of this method is to just to ensure a node is rendered before snapshotting, this should be reasonable default for all callers.
#if AS_AT_LEAST_IOS13
if (@available(iOS 13.0, *)) {
node.primitiveTraitCollection = ASPrimitiveTraitCollectionFromUITraitCollection(UITraitCollection.currentTraitCollection);
ASTraitCollectionPropagateDown(node, ASPrimitiveTraitCollectionFromUITraitCollection(UITraitCollection.currentTraitCollection));
}
#endif // #if AS_AT_LEAST_IOS13
node.displaysAsynchronously = NO;