Skip to content

Instantly share code, notes, and snippets.

View marciok's full-sized avatar
🎯
Focusing

Marcio Klepacz marciok

🎯
Focusing
View GitHub Profile
import Quick
import Nimble
import Pony
class PonyTabBarControllerSpec: QuickSpec {
override func spec() {
var tabBarController: PonyTabController!
describe(".viewDidAppear"){
import UIKit
public class AppIntroViewController: UIViewController {
public var dismissButtonTapHandler: (() -> Void)?
@IBAction public func dismissButtonTapped() {
if let dismissButtonTapHandler = self.dismissButtonTapHandler {
dismissButtonTapHandler()
import Quick
import Nimble
import Pony
class PonyTabBarControllerSpec: QuickSpec {
override func spec() {
var tabBarController: PonyTabController!
describe(".viewDidAppear"){
describe("When app intro had not been presented"){
import Quick
import Nimble
import Pony
class AppIntroViewControllerSpec: QuickSpec {
override func spec() {
var viewController: AppIntroViewController!
let userDefaults = NSUserDefaults.standardUserDefaults()
import Quick
import Nimble
import Pony
class PonyTabBarControllerSpec: QuickSpec {
override func spec() {
var tabBarController: PonyTabController!
describe(".viewDidAppear"){
waitUntil{ done in
tabBarController.presentViewController(viewController, animated: false){
done()
}
}
//...
FBSDKTestUsersManager *testUserManager = [FBSDKTestUsersManager sharedInstanceForAppID:@"MY_APP_ID" appSecret:@"MY_APP_SECRET"];
[testUserManager requestTestAccountTokensWithArraysOfPermissions:nil
createIfNotFound:YES
completionHandler:^(NSArray *tokens, NSError *error) {
}];
info: Welcome to Appium v1.4.10 (REV 529c28c40bae32da96b5fcf32d32022ab248eaf7)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/Marciok/projects/Appium/appium/UICatalog.app","deviceName":"iPhone 6","platformName":"iOS","platformVersion":"8.4","showIOSLog":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.10","revision":"529c28c40bae32da96b5fcf32d32022ab248eaf7"}}}

Testing the App with Cucumber + Appium

Setup

In order to run Appium and Cucumber on computer please follow the instructions: 0. Install Homebrew

  1. To manage the ruby versions on the OS install rbenv
  2. Intall ruby 2.0.0 with rbenv
  3. Install bundler to manage the project ruby gems (dependecies) by typing: gem install bundler on the terminal
  4. Run bundle install on the root of the project to intall dependecies:bundle install
  5. Install Appium.
#!/bin/sh
key_chain=ios-build.keychain
security create-keychain -p travis $key_chain
# Make the keychain the default so identities are found
security default-keychain -s $key_chain
# Unlock the keychain
security unlock-keychain -p travis $key_chain
# Set keychain locking timeout to 3600 seconds