Created
November 15, 2011 03:31
-
-
Save Kevinwlee/1366046 to your computer and use it in GitHub Desktop.
KIF Framework After
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AQTestController.h" | |
#import "KIFTestScenario.h" | |
#import "KIFTestScenario+AQAdditions.h" | |
@implementation AQTestController | |
- (void)initializeScenarios { | |
[self addScenario:[KIFTestScenario scenarioToOpenAndCloseTheLogin]]; | |
[self addScenario:[KIFTestScenario scenarioToOpenAndCloseTheCreateActivityScreen]]; | |
[self addScenario:[KIFTestScenario scenarioToEnterTextIntoTheWhereBox]]; | |
} | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "KIFTestScenario+AQAdditions.h" | |
#import "KIFTestStep.h" | |
#import "KIFTestStep+AQAdditions.h" | |
@implementation KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin { | |
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open and close the login view."]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Login"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"Login Steps"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Close"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "KIFTestScenario.h" | |
@interface KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "KIFTestScenario.h" | |
@interface KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin; | |
+ (id)scenarioToOpenAndCloseTheCreateActivityScreen; | |
+ (id)scenarioToEnterTextIntoTheWhereBox; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "KIFTestScenario+AQAdditions.h" | |
#import "KIFTestStep.h" | |
#import "KIFTestStep+AQAdditions.h" | |
@implementation KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin { | |
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open and close the login view."]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Login"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"Login Steps"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Close"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
+ (id)scenarioToOpenAndCloseTheCreateActivityScreen { | |
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open and close the Create Activity view."]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Add"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Create Activity"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Cancel"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
+ (id)scenarioToEnterTextIntoTheWhereBox { | |
KIFTestScenario * scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open the activiy view and enter data into the where box" ]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Add"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Create Activity"]]; | |
[scenario addStep:[KIFTestStep stepToEnterText:@"This should be in the where" intoViewWithAccessibilityLabel:@"where"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Cancel"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "KIFTestScenario.h" | |
@interface KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin; | |
+ (id)scenarioToOpenAndCloseTheCreateActivityScreen; | |
+ (id)scenarioToEnterTextIntoTheWhereBox; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "KIFTestScenario+AQAdditions.h" | |
#import "KIFTestStep.h" | |
#import "KIFTestStep+AQAdditions.h" | |
@implementation KIFTestScenario (AQAdditions) | |
+ (id)scenarioToOpenAndCloseTheLogin { | |
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open and close the login view."]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Login"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"Login Steps"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Close"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
+ (id)scenarioToOpenAndCloseTheCreateActivityScreen { | |
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open and close the Create Activity view."]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Add"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Create Activity"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Cancel"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
+ (id)scenarioToEnterTextIntoTheWhereBox { | |
KIFTestScenario * scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can open the activiy view and enter data into the where box" ]; | |
[scenario addStep:[KIFTestStep stepToReset]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Add"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Create Activity"]]; | |
[scenario addStep:[KIFTestStep stepToEnterText:@"This should be in the where" intoViewWithAccessibilityLabel:@"where"]]; | |
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Cancel"]]; | |
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Detail"]]; | |
return scenario; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment