Skip to content

Commit ec1c98e

Browse files
authored
Merge pull request #10 from giulio92/develop
2 parents e521a5a + d8d1ae3 commit ec1c98e

5 files changed

Lines changed: 33 additions & 15 deletions

File tree

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: objective-c
2-
osx_image: xcode8.1
2+
osx_image: xcode8.2
33

44
env:
55
global:
66
- PROJECT=GLTableCollectionView.xcodeproj
77
- SCHEME=GLTableCollectionView
8-
- SDK=iphonesimulator10.1
8+
- SDK=iphonesimulator10.2
99
- DESTINATION="platform=iOS Simulator,OS=latest,name=iPhone 5"
1010

1111
before_install:
@@ -18,4 +18,11 @@ before_install:
1818
- xcodebuild -version
1919
- xcodebuild -showsdks
2020

21+
# This command will fix Travis CI duplicated simulators build issue
22+
# happening while using Xcode 8.2 + iOS simulator 10.2 configuration. Be
23+
# sure to check GitHub issue #7031
24+
# (https://github.com/travis-ci/travis-ci/issues/7031) for updates and, as
25+
# soon as the Travis team fix the issue, remove this line.
26+
- xcrun simctl delete D0257C83-DB81-4567-93EC-4C6DF23DC24C
27+
2128
script: xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug test | xcpretty -f `xcpretty-travis-formatter` && exit ${PIPESTATUS[0]}

Classes/GLIndexedCollectionViewCell.xib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<objects>

GLTableCollectionView/Base.lproj/LaunchScreen.storyboard

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ik1-Jh-kcr">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ik1-Jh-kcr">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<scenes>

GLTableCollectionView/Base.lproj/Main.storyboard

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ClH-cz-IEW">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ClH-cz-IEW">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<scenes>

GLTableCollectionViewTests/GLTableCollectionViewTests.swift

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ class GLTableCollectionViewTests: XCTestCase {
4949
// MARK: <GLTableCollectionViewController>
5050

5151
func testInstanceVariables() {
52-
XCTAssertGreaterThan(tableCollectionView.numberOfSections, 0, "UITableView must have at least one section")
53-
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionsForRow, 0, "There must be at least a GLIndexedCollectionView per UITableViewCell")
54-
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionItems, 0, "There must be at least one GLIndexedCollectionViewCell")
55-
XCTAssertNotEqual(tableCollectionView.tableCellID, "", "The cellIdentifier for the UITableViewCells must not be empty")
56-
XCTAssertTrue(tableCollectionView.tableCellID.hasSuffix("_section_#"), "The cellIdentifier for the UITableViewCells must end with section number suffix")
57-
XCTAssertTrue((tableCollectionView.tableCellID.components(separatedBy: "#").count - 1) == 1, "The cellIdentifier for the UITableViewCells must contain only one # in it")
52+
XCTAssertGreaterThan(tableCollectionView.numberOfSections, 0, "numberOfSections was: \(tableCollectionView.numberOfSections)\nUITableView must have at least one section")
53+
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionsForRow, 0, "numberOfCollectionsForRow was: \(tableCollectionView.numberOfCollectionsForRow)\nThere must be at least a GLIndexedCollectionView per UITableViewCell")
54+
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionItems, 0, "numberOfCollectionItems was: \(tableCollectionView.numberOfCollectionItems)\nThere must be at least one GLIndexedCollectionViewCell")
55+
XCTAssertNotEqual(tableCollectionView.tableCellID, "", "tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must not be empty")
56+
XCTAssertTrue(tableCollectionView.tableCellID.hasSuffix("_section_#"), "tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must end with section number suffix")
57+
XCTAssertTrue((tableCollectionView.tableCellID.components(separatedBy: "#").count - 1) == 1, "tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must contain only one # in it")
5858
XCTAssertNotEqual(tableCollectionView.collectionCellID, "", "The cellIdentifier for the UICollectionCells should not be empty")
5959
}
6060

@@ -90,7 +90,7 @@ class GLTableCollectionViewTests: XCTestCase {
9090
XCTAssertGreaterThan(visibleCells.count, 0, "UITableView visible cells must be greater than 0")
9191

9292
for tableViewCell in visibleCells as! [GLCollectionTableViewCell] {
93-
XCTAssertTrue(Int(tableViewCell.reuseIdentifier!.components(separatedBy: "#").last!)! >= 0, "The GLCollectionTableViewCell cellIdentifier must end with a positive integer")
93+
XCTAssertTrue(Int(tableViewCell.reuseIdentifier!.components(separatedBy: "#").last!)! >= 0, "GLCollectionTableViewCell cellIdentifier was: \(tableViewCell.reuseIdentifier)\nGLCollectionTableViewCell's cellIdentifier must end with a positive integer")
9494
}
9595
}
9696

@@ -115,6 +115,17 @@ class GLTableCollectionViewTests: XCTestCase {
115115
}
116116
}
117117

118+
func testCollectionViewPaginationConsistency() {
119+
XCTAssertGreaterThan(visibleCells.count, 0, "UITableView visible cells must be greater than 0")
120+
121+
for collectionTableCell in visibleCells as! [GLCollectionTableViewCell] {
122+
if collectionTableCell.collectionViewPaginatedScroll == true {
123+
XCTAssertTrue(collectionTableCell.collectionView.isScrollEnabled, "If custom paginated scroll is enabled the UICollectionView should be scrollable")
124+
XCTAssertTrue(collectionTableCell.collectionView.isUserInteractionEnabled, "If custom paginated scroll is enabled the UICollectionView shoud be user interactive")
125+
}
126+
}
127+
}
128+
118129
// MARK: <Other>
119130

120131
func testOpaqueFlag() {

0 commit comments

Comments
 (0)