Skip to content
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

Merged
merged 13 commits into from
Jul 2, 2019
Merged

Conversation

lojals
Copy link
Contributor

@lojals lojals commented Jun 28, 2019

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?

  • Run the tests.

What are the relevant tickets?

#26

@lojals lojals added the enhancement New feature or request label Jun 28, 2019
@lojals lojals self-assigned this Jun 28, 2019
@@ -86,6 +86,7 @@ final class EmptyStateView: UIView {
}

override public func didMoveToSuperview() {
super.didMoveToSuperview()
Copy link
Contributor

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 {
Copy link
Contributor

@leonardo-garcia leonardo-garcia Jul 1, 2019

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) } ??
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@lojals lojals merged commit 16158fb into develop Jul 2, 2019
@lojals lojals deleted the feature/wrapping-new-version branch July 2, 2019 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants