Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions KIF.xcodeproj/xcshareddata/xcschemes/KIFTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
ReferencedContainer = "container:KIF.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "KIF_PRINTVIEWTREEONFAILURE"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 2 additions & 2 deletions TestHost/Sources/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Uncomment the following line to run the tests with animations 100x faster
//UIApplication.sharedApplication.keyWindow.layer.speed = 100;
// Speed up animations to improve test times
application.keyWindow.layer.speed = 3;
}

@end
13 changes: 7 additions & 6 deletions Tests/KIFTests/LandscapeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ @implementation LandscapeTests
- (void)beforeAll
{
[system simulateDeviceRotationToOrientation:UIDeviceOrientationLandscapeLeft];
[tester waitForTimeInterval:0.5];

// only scroll if we are on iphone
if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
[tester scrollViewWithAccessibilityIdentifier:@"Test Suite TableView" byFractionOfSizeHorizontal:0 vertical:-0.2];
}
[tester waitForAnimationsToFinish];

[tester scrollViewWithAccessibilityIdentifier:@"Test Suite TableView" byFractionOfSizeHorizontal:0 vertical:-0.2];

[tester waitForAnimationsToFinish];
}

- (void)afterAll
Expand All @@ -32,6 +31,8 @@ - (void)afterAll

- (void)testThatAlertViewsCanBeTappedInLandscape
{
// The tap can fail if the initial scroll is still happening scroll
[tester waitForTimeInterval:0.5];
[tester tapViewWithAccessibilityLabel:@"UIAlertController"];
if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
[tester tapViewWithAccessibilityLabel:@"Cancel"];
Expand Down
Loading