Created
September 27, 2017 17:13
-
-
Save Serchinastico/a6ff2b85ff48e208caf5b5b1fe424b86 to your computer and use it in GitHub Desktop.
Clase de test que muestra cómo usar KIF para interactuar con todo tipo de vistas
This file contains 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
class SuperHeroesControlsViewControllerTests: AcceptanceTestCase { | |
func testShowsEmptyCaseIfThereAreNoSuperHeroes() { | |
openSuperHeroesViewController() | |
tester().tapView(withAccessibilityLabel: "Button") | |
tester().setValue(0, forSliderWithAccessibilityLabel: "Slider") | |
for _ in (0..<10) { | |
tester().tapStepper(withAccessibilityLabel: "Stepper", increment: .increment) | |
} | |
tester().selectDatePickerValue(["August", "18", "1988"]) | |
tester().clearTextFromView(withAccessibilityLabel: "Text Field") | |
tester().enterText("Hello World!", intoViewWithAccessibilityLabel: "Text Field") | |
} | |
fileprivate func openSuperHeroesViewController() { | |
let superHeroesViewController = ServiceLocator().provideSuperHeroesControlsViewController() | |
let rootViewController = UINavigationController() | |
rootViewController.viewControllers = [superHeroesViewController] | |
present(viewController: rootViewController) | |
tester().waitForAnimationsToFinish() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment