Closed nhgrif closed 5 years ago
This PR adds two convenience methods for testing reusable cells in table/collection views.
The methods will first fail (and not execute the test closure) if the dataSource property is not set.
Next, it will possibly fail if the passed indexPath is outside the bounds for the data source.
Finally, it will possibly fail if the cell returned for the indexPath can't be cast to the specified type.
If any of these fail, the test closure isn't executed and the testCell causes the test to fail. If they all pass, the test closure is executed.
testCell
This PR adds two convenience methods for testing reusable cells in table/collection views.
The methods will first fail (and not execute the test closure) if the dataSource property is not set.
Next, it will possibly fail if the passed indexPath is outside the bounds for the data source.
Finally, it will possibly fail if the cell returned for the indexPath can't be cast to the specified type.
If any of these fail, the test closure isn't executed and the
testCell
causes the test to fail. If they all pass, the test closure is executed.