You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
Recently I have been noticing that many of my specs around table views and collection views are looking for cells at particular locations, however the full (row/item)+section pair is an implementation detail, causing the tests to break horribly if choose to refactor the way that the view controller is using sections internally. I have started using a category that allows looking up cells by an integer "flat index" instead, treating all cells as if they were part of a simple list.
Does this sound like a useful thing to add to PCK as a spec helper? I'd be glad to open a PR if there is any interest.
The text was updated successfully, but these errors were encountered:
A PR for a helper here would be welcome of course. I'm neutral on this - I tend to use a combination of visibleCells and scrollToItem* but that's the kind of hackery you're trying to remove the need for. There are also going to be questions about getting cells through the table view vs. directly from the dataSource/delegate objects. My preference is to retrieve cells through the table view as it implicitly tests the delegate/dataSource wiring, but reasonable people can disagree here.
Recently I have been noticing that many of my specs around table views and collection views are looking for cells at particular locations, however the full (row/item)+section pair is an implementation detail, causing the tests to break horribly if choose to refactor the way that the view controller is using sections internally. I have started using a category that allows looking up cells by an integer "flat index" instead, treating all cells as if they were part of a simple list.
Does this sound like a useful thing to add to PCK as a spec helper? I'd be glad to open a PR if there is any interest.
The text was updated successfully, but these errors were encountered: