Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Commit d210f5a

Browse files
authored
Tests and CI maintenance (#385)
* Updating snapshot tests with iOS 11 SDK's rendering * Bumping Travis' configs for Xcode 9.2, iOS 11.2, iPhone 8 testing
1 parent d3bd3f5 commit d210f5a

33 files changed

Lines changed: 63 additions & 10 deletions

File tree

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
osx_image: xcode8.1
1+
osx_image: xcode9.2
22
language: objective-c
33
sudo: required
44

@@ -16,10 +16,10 @@ env:
1616

1717
- WORKSPACE="DZNEmptyDataSet/DZNEmptyDataSet.xcworkspace"
1818
- IOS_SCHEME="DZNEmptyDataSet"
19-
- IOS_SDK="iphonesimulator10.0"
19+
- IOS_SDK="iphonesimulator11.2"
2020

2121
matrix:
22-
- DESTINATION="OS=10.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
22+
- DESTINATION="OS=11.2,name=iPhone 8" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
2323

2424
script:
2525
- xcodebuild clean build test -scheme "$SCHEME" -workspace "$WORKSPACE" SDK="$IOS_SDK" -destination "$DESTINATION" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES

DZNEmptyDataSet/Applications/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@
138138
"idiom" : "ipad",
139139
"size" : "83.5x83.5",
140140
"scale" : "2x"
141+
},
142+
{
143+
"idiom" : "ios-marketing",
144+
"size" : "1024x1024",
145+
"scale" : "1x"
141146
}
142147
],
143148
"info" : {

DZNEmptyDataSet/Applications/DetailViewController.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,19 @@ - (void)configureHeaderAndFooter
211211
UIImage *image = [UIImage imageNamed:imageName inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
212212
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
213213
imageView.userInteractionEnabled = YES;
214-
214+
215215
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapHeaderView:)];
216216
[imageView addGestureRecognizer:tapGesture];
217+
218+
CGRect frame = self.view.bounds;
219+
frame.size.height = image.size.height;
220+
UIView *headerView = [[UIView alloc] initWithFrame:frame];
221+
headerView.backgroundColor = [UIColor whiteColor];
222+
223+
imageView.center = CGPointMake(frame.size.width/2.0, frame.size.height/2.0);
224+
[headerView addSubview:imageView];
217225

218-
self.tableView.tableHeaderView = imageView;
226+
self.tableView.tableHeaderView = headerView;
219227
}
220228
else {
221229
self.tableView.tableHeaderView = [UIView new];

DZNEmptyDataSet/DZNEmptyDataSet.xcodeproj/project.pbxproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@
428428
F58A3E291E66AEE90086E0EF /* Project object */ = {
429429
isa = PBXProject;
430430
attributes = {
431-
LastUpgradeCheck = 0820;
431+
LastUpgradeCheck = 0920;
432432
ORGANIZATIONNAME = DZN;
433433
TargetAttributes = {
434434
F58A3E311E66AEE90086E0EF = {
@@ -662,15 +662,21 @@
662662
CLANG_CXX_LIBRARY = "libc++";
663663
CLANG_ENABLE_MODULES = YES;
664664
CLANG_ENABLE_OBJC_ARC = YES;
665+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
665666
CLANG_WARN_BOOL_CONVERSION = YES;
667+
CLANG_WARN_COMMA = YES;
666668
CLANG_WARN_CONSTANT_CONVERSION = YES;
667669
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
668670
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
669671
CLANG_WARN_EMPTY_BODY = YES;
670672
CLANG_WARN_ENUM_CONVERSION = YES;
671673
CLANG_WARN_INFINITE_RECURSION = YES;
672674
CLANG_WARN_INT_CONVERSION = YES;
675+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
676+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
673677
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
678+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
679+
CLANG_WARN_STRICT_PROTOTYPES = YES;
674680
CLANG_WARN_SUSPICIOUS_MOVE = YES;
675681
CLANG_WARN_UNREACHABLE_CODE = YES;
676682
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -713,15 +719,21 @@
713719
CLANG_CXX_LIBRARY = "libc++";
714720
CLANG_ENABLE_MODULES = YES;
715721
CLANG_ENABLE_OBJC_ARC = YES;
722+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
716723
CLANG_WARN_BOOL_CONVERSION = YES;
724+
CLANG_WARN_COMMA = YES;
717725
CLANG_WARN_CONSTANT_CONVERSION = YES;
718726
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
719727
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
720728
CLANG_WARN_EMPTY_BODY = YES;
721729
CLANG_WARN_ENUM_CONVERSION = YES;
722730
CLANG_WARN_INFINITE_RECURSION = YES;
723731
CLANG_WARN_INT_CONVERSION = YES;
732+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
733+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
724734
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
735+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
736+
CLANG_WARN_STRICT_PROTOTYPES = YES;
725737
CLANG_WARN_SUSPICIOUS_MOVE = YES;
726738
CLANG_WARN_UNREACHABLE_CODE = YES;
727739
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -909,6 +921,7 @@
909921
F5BE153B1E713E2100F6FBEA /* Release */,
910922
);
911923
defaultConfigurationIsVisible = 0;
924+
defaultConfigurationName = Release;
912925
};
913926
/* End XCConfigurationList section */
914927
};

DZNEmptyDataSet/DZNEmptyDataSet.xcodeproj/xcshareddata/xcschemes/DZNEmptyDataSet.xcscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0920"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"

DZNEmptyDataSet/DZNEmptyDataSet.xcodeproj/xcshareddata/xcschemes/DZNEmptyDataSetTests.xcscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0920"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -10,6 +10,7 @@
1010
buildConfiguration = "Debug"
1111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1212
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
language = ""
1314
shouldUseLaunchSchemeArgsEnv = "YES">
1415
<Testables>
1516
<TestableReference
@@ -39,6 +40,7 @@
3940
buildConfiguration = "Debug"
4041
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4142
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
language = ""
4244
launchStyle = "0"
4345
useCustomWorkingDirectory = "NO"
4446
ignoresPersistentStateOnLaunch = "NO"

DZNEmptyDataSet/DZNEmptyDataSetTests/ApplicationsSnapshotTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (void)setUp {
3131

3232
// Using XCTAssert instead of NSAssert since these do not cause the tests to fail.
3333
XCTAssert([device.model containsString:@"iPhone"], @"Please run snapshot tests on an iPhone.");
34-
XCTAssert([device.systemVersion doubleValue] > 10.0, @"Please run snapshot tests on a simulator with iOS 10.0 or above.");
34+
XCTAssert([device.systemVersion doubleValue] > 11.0, @"Please run snapshot tests on a simulator with iOS 11.0 or above.");
3535
XCTAssert(screen.scale == 2.0, @"Please run snapshot tests on a @2x density simulator.");
3636
});
3737
}
3 Bytes
Loading
4 Bytes
Loading
27 Bytes
Loading

0 commit comments

Comments
 (0)