Sha256: b78b75414b14064771f2e92d80b1f4001a8ecc671aa98c2a4010568d05c6d6d8

Contents?: true

Size: 1.09 KB

Versions: 8

Compression:

Stored size: 1.09 KB

Contents

//
//
//  Created by XcodeBDDfire.
//  Copyright © 2016 XcodeBDDfire. All rights reserved.
//

import Foundation
import XCTest
class XCFitDemoCucumberishTests: NSObject {
    class func CucumberishSwiftInit()
    {
        var application : XCUIApplication!
        //A closure that will be executed just before executing any of your features
        beforeStart { () -> Void in
            application = XCUIApplication()
        }
        //A Given step definition
        Given("the app is running") { (args, userInfo) -> Void in
            application.launch()
            
        }
        
        When("I click on the hello button") { (args, userInfo) in
            let helloButton = XCUIApplication().buttons["ClickMe"]
            helloButton.tap()
            
        }
        
        Then("I should see \"([^\\\"]*)\"") { (args, userInfo) in
            XCTAssert(application.staticTexts[args[0]].exists)
        }
        //Tell Cucumberish the name of your features folder and let it execute them for you...
        Cucumberish.executeFeaturesInDirectory("Features", featureTags: nil)
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xcfit-0.9.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.8.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.7.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.6.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.5.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.4.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.3.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift
xcfit-0.2.0 XCFitDemo/XCFitDemoCucumberishTests/XCFitDemoCucumberishTests.swift