Skip to content

Commit

Permalink
Add KIF test for basic flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayanonagon committed Jun 20, 2014
1 parent 9121129 commit ff16540
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 14 deletions.
5 changes: 4 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Uncomment this line to define a global platform for your project
platform :ios, "7.0"

target "VENTokenField" do
Expand All @@ -9,3 +8,7 @@ target "VENTokenFieldSample" do
pod 'VENTokenField', :path => '.'
end

target "VENTokenFieldSampleTests" do
pod 'KIF', '~> 3.0.4'
end

5 changes: 5 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
PODS:
- FrameAccessor (1.1.0)
- KIF (3.0.4):
- KIF/XCTest
- KIF/XCTest (3.0.4)
- VENTokenField (1.0.0):
- FrameAccessor (~> 2.0)

DEPENDENCIES:
- FrameAccessor (~> 1.1.0)
- KIF (~> 3.0.4)
- VENTokenField (from `.`)

EXTERNAL SOURCES:
Expand All @@ -13,6 +17,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FrameAccessor: 1900268ec0c4872ce0948baaf71f995ea6d0f28c
KIF: 443c517d14fc2a99d27d3df170bc274cdf288241
VENTokenField: f972fe8c6452a78dcfd669444653c52adf706f17

COCOAPODS: 0.33.1
98 changes: 98 additions & 0 deletions VENTokenField.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>0CD24887D17F41CB9A2D8AF8</key>
<dict>
<key>includeInIndex</key>
<string>1</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>text.xcconfig</string>
<key>name</key>
<string>Pods-VENTokenFieldSampleTests.xcconfig</string>
<key>path</key>
<string>Pods/Pods-VENTokenFieldSampleTests.xcconfig</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>0F6F46E7D9B04242884425DB</key>
<dict>
<key>fileRef</key>
<string>48054D1FB265443498AE9571</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>2803779BB60049739FFA6935</key>
<dict>
<key>includeInIndex</key>
Expand All @@ -56,6 +78,19 @@
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>48054D1FB265443498AE9571</key>
<dict>
<key>explicitFileType</key>
<string>archive.ar</string>
<key>includeInIndex</key>
<string>0</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>path</key>
<string>libPods-VENTokenFieldSampleTests.a</string>
<key>sourceTree</key>
<string>BUILT_PRODUCTS_DIR</string>
</dict>
<key>50CB7BF075094249AF9DF3BD</key>
<dict>
<key>includeInIndex</key>
Expand Down Expand Up @@ -97,6 +132,30 @@ error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or up
EOM
exit 1
fi
</string>
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>745245AF77574DF0A11EFB13</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array/>
<key>inputPaths</key>
<array/>
<key>isa</key>
<string>PBXShellScriptBuildPhase</string>
<key>name</key>
<string>Copy Pods Resources</string>
<key>outputPaths</key>
<array/>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
<key>shellPath</key>
<string>/bin/sh</string>
<key>shellScript</key>
<string>"${SRCROOT}/Pods/Pods-VENTokenFieldSampleTests-resources.sh"
</string>
<key>showEnvVarsInLog</key>
<string>0</string>
Expand Down Expand Up @@ -187,6 +246,7 @@ fi
<string>B6173DFD1952760200E293BB</string>
<string>2803779BB60049739FFA6935</string>
<string>50CB7BF075094249AF9DF3BD</string>
<string>0CD24887D17F41CB9A2D8AF8</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
Expand Down Expand Up @@ -372,6 +432,7 @@ fi
<string>7A002D98BC58468DB3B8E6C4</string>
<string>B692A4711954D9CA00344E36</string>
<string>F5DB7503CF2443B686EA59B7</string>
<string>48054D1FB265443498AE9571</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
Expand Down Expand Up @@ -1400,6 +1461,7 @@ fi
<string>B692A48D1954D9CA00344E36</string>
<string>B692A48F1954D9CA00344E36</string>
<string>B692A48E1954D9CA00344E36</string>
<string>0F6F46E7D9B04242884425DB</string>
</array>
<key>isa</key>
<string>PBXFrameworksBuildPhase</string>
Expand All @@ -1425,9 +1487,11 @@ fi
<string>B692A49D1954D9CA00344E36</string>
<key>buildPhases</key>
<array>
<string>D5857AF01C324E059F218F89</string>
<string>B692A4881954D9CA00344E36</string>
<string>B692A4891954D9CA00344E36</string>
<string>B692A48A1954D9CA00344E36</string>
<string>745245AF77574DF0A11EFB13</string>
</array>
<key>buildRules</key>
<array/>
Expand Down Expand Up @@ -1689,6 +1753,8 @@ fi
</dict>
<key>B692A49E1954D9CA00344E36</key>
<dict>
<key>baseConfigurationReference</key>
<string>0CD24887D17F41CB9A2D8AF8</string>
<key>buildSettings</key>
<dict>
<key>BUNDLE_LOADER</key>
Expand Down Expand Up @@ -1724,6 +1790,8 @@ fi
</dict>
<key>B692A49F1954D9CA00344E36</key>
<dict>
<key>baseConfigurationReference</key>
<string>0CD24887D17F41CB9A2D8AF8</string>
<key>buildSettings</key>
<dict>
<key>BUNDLE_LOADER</key>
Expand Down Expand Up @@ -1752,6 +1820,36 @@ fi
<key>name</key>
<string>Release</string>
</dict>
<key>D5857AF01C324E059F218F89</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array/>
<key>inputPaths</key>
<array/>
<key>isa</key>
<string>PBXShellScriptBuildPhase</string>
<key>name</key>
<string>Check Pods Manifest.lock</string>
<key>outputPaths</key>
<array/>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
<key>shellPath</key>
<string>/bin/sh</string>
<key>shellScript</key>
<string>diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" &gt; /dev/null
if [[ $? != 0 ]] ; then
cat &lt;&lt; EOM
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
EOM
exit 1
fi
</string>
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>F5DB7503CF2443B686EA59B7</key>
<dict>
<key>explicitFileType</key>
Expand Down
33 changes: 20 additions & 13 deletions VENTokenFieldSampleTests/VENTokenFieldSampleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,35 @@
//

#import <XCTest/XCTest.h>
#import <KIF/KIF.h>

@interface VENTokenFieldSampleTests : XCTestCase

@end

@implementation VENTokenFieldSampleTests

- (void)setUp
- (void)testBasicFlow
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
[tester enterTextIntoCurrentFirstResponder:@"Ayaka\n"];
[tester waitForViewWithAccessibilityLabel:@"Ayaka,"];

- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
[tester enterTextIntoCurrentFirstResponder:@"Mark\n"];
[tester waitForViewWithAccessibilityLabel:@"Mark,"];

- (void)testExample
{
XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
[tester enterTextIntoCurrentFirstResponder:@"Neeraj\n"];
[tester waitForViewWithAccessibilityLabel:@"Neeraj,"];

[tester enterTextIntoCurrentFirstResponder:@"Octocat\n"];
[tester waitForViewWithAccessibilityLabel:@"Octocat,"];

// Make sure everything else is still there.
[tester waitForViewWithAccessibilityLabel:@"Ayaka,"];
[tester waitForViewWithAccessibilityLabel:@"Mark,"];

// Delete
[tester enterTextIntoCurrentFirstResponder:@"\b"];
[tester enterTextIntoCurrentFirstResponder:@"\b"];
[tester waitForAbsenceOfViewWithAccessibilityLabel:@"Octocat,"];
}

@end

0 comments on commit ff16540

Please sign in to comment.