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
# Created by https://www.gitignore.io/api/xcode | |
### Xcode ### | |
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ |
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
stage('ios') { | |
} |
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 UIKit | |
let appDelegateClass: AnyClass? = NSClassFromString("TEST_TARGET.TestingAppDelegate") ? AppDelegate.self | |
let args = UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(to: UnsafeMutablePointer<Int8>.self, capacity: Int(CommandLine.argc)) | |
UIApplicationMain(CommandLine.argc, args, nil, NSStringFromClass(appDelegateClass!)) |
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 UIKit | |
class TestingAppDelegate: NSObject { | |
var window: UIWindow? | |
} |
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 OHHTTPStubs | |
public func isURL(_ url: URL) -> OHHTTPStubsTestBlock { | |
return { $0.url == url } | |
} | |
extension OHHTTPStubs { | |
class func setupAuth() { | |
let response: [String: Any] = ["key": "value"] | |
stub(condition: isURL("auth.testxyz.com")) { _ in |
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
class LoginScreen { | |
var app: XCUIApplication | |
let identifier = "german-icon" | |
var usernameTextField: XCUIElement { return app.textFields["usernameTextField"] } | |
var passwordTextField: XCUIElement { return app.secureTextFields["passwordTextField"] } | |
var loginButton: XCUIElement { return app.buttons["loginButton"] } | |
init(app: XCUIApplication) { |
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
extension XCUIElement { | |
func write(string: String) { | |
guard let stringValue = self.value as? String else { | |
XCTFail("Tried to clear and enter text into a non string value") | |
return | |
} | |
self.tap() | |
// clear element before writing new text |
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 FBSnapshotTestCase | |
class SnapshotTestingTests: FBSnapshotTestCase { | |
override func setUp() { | |
super.setUp() | |
//recordMode = true | |
} | |
func testWelcomeView_WithName() { | |
let welcomeVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Test") as! ViewController | |
_ = welcomeVC.view |
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
let lowerCaseLetters : Gen<Character> = Gen<Character>.fromElements(in: "a"..."z") | |
let upperCaseLetters : Gen<Character> = Gen<Character>.fromElements(in: "A"..."Z") | |
let numeric : Gen<Character> = Gen<Character>.fromElements(in: "0"..."9") | |
let special : Gen<Character> = Gen<Character>.fromElements(of: ["!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~", "."]) |
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
let allowedLocalCharacters : Gen<Character> = Gen<Character>.one(of: [ | |
upperCaseLetters, | |
lowerCaseLetters, | |
numeric, | |
special, | |
]) |