-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for collection views #34
Conversation
@@ -86,6 +86,7 @@ final class EmptyStateView: UIView { | |||
} | |||
|
|||
override public func didMoveToSuperview() { | |||
super.didMoveToSuperview() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch 👌
import Foundation | ||
import WLEmptyState | ||
|
||
class DefaultCollectionViewController: UICollectionViewController, WLEmptyStateDataSource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal. Though, can we mark these classes and the ones for TableView
as final
?
} | ||
return items | ||
private func getNumberOfSections() -> Int { | ||
return (self as? UITableView).flatMap { $0.dataSource?.numberOfSections?(in: $0) } ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
What does this PR do? Any background context you want to provide?
This PR adds the missing unit tests for empty states on collection views.
Where should the reviewer start?
Example/Tests/DataSourceTests.swift
How should this be manually tested?
What are the relevant tickets?
#26