Skip to content

Commit

Permalink
Merge pull request #42 from wizeline/feature/allow-scrolling
Browse files Browse the repository at this point in the history
Allow Enable/Disable Scrolling
  • Loading branch information
Jorge R Ovalle Z authored Aug 1, 2019
2 parents 592548e + e47fad3 commit d2cd0f6
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 55 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PODS:
- iOSSnapshotTestCase/Core (4.0.1)
- iOSSnapshotTestCase/SwiftSupport (4.0.1):
- iOSSnapshotTestCase/Core
- WLEmptyState (2.0.0)
- WLEmptyState (3.0.0)

DEPENDENCIES:
- iOSSnapshotTestCase
Expand All @@ -20,7 +20,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
iOSSnapshotTestCase: f3b2b7e606fe03fdbe49af84316bd235df32dc44
WLEmptyState: 0573edb909655cd6e5e7a367b371a10525dcee5a
WLEmptyState: 5c7cae4cdc57641ff1193338ad601bf4fa2f05ad

PODFILE CHECKSUM: 5fd6a2332b7cd50dfecaf0807164322168c50c78

Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/WLEmptyState.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 14 additions & 12 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions Example/Tests/DelegateTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// DelegateTests.swift
// WLEmptyState_Example
//
// Created by Jorge Ovalle on 8/1/19.
// Copyright © 2019 CocoaPods. All rights reserved.
//

import XCTest
import WLEmptyState

class DelegateTests: XCTestCase {

override func setUp() {
WLEmptyState.configure()
}

// MARK: - UTableView
func testShouldScrollDelegatePropertyOnTableDefault() {
let defaultTableViewController = DefaultTableViewController()

let enableScrollForEmptyState = defaultTableViewController.tableView.emptyStateDelegate?.enableScrollForEmptyState()
XCTAssertEqual(true, enableScrollForEmptyState)
}

func testShouldScrollDelegatePropertyOnTableCustom() {
let customTableViewController = CustomEmptyStateTableViewController()

let enableScrollForEmptyState = customTableViewController.tableView.emptyStateDelegate?.enableScrollForEmptyState()
XCTAssertEqual(false, enableScrollForEmptyState)
}

// MARK: - UICollectionView
func testShouldScrollDelegatePropertyOnCollectionDefault() {
let defaultCollectionViewController = DefaultCollectionViewController(collectionViewLayout: UICollectionViewFlowLayout())

let enableScrollForEmptyState = defaultCollectionViewController.collectionView.emptyStateDelegate?.enableScrollForEmptyState()
XCTAssertEqual(true, enableScrollForEmptyState)
}

func testShouldScrollDelegatePropertyOnCollectionCustom() {
let customCollectionViewController = CustomCollectionViewController(collectionViewLayout: UICollectionViewFlowLayout())

let enableScrollForEmptyState = customCollectionViewController.collectionView.emptyStateDelegate?.enableScrollForEmptyState()
XCTAssertEqual(false, enableScrollForEmptyState)
}

}
Loading

0 comments on commit d2cd0f6

Please sign in to comment.