<commit_before>import PromiseKit
import UIKit
import XCTest

class UITest_UIImagePickerController_Swift: PMKiOSUITestCase {
    func test_rejects_when_cancelled() {
        let app = XCUIApplication()
        let table = app.tables
        table.cells.staticTexts["1"].tap()
        table.cells.elementBoundByIndex(0).tap()
        app.navigationBars["Moments"].buttons["Cancel"].tap()

        XCTAssertTrue(value)
    }

#if false   // XCUITesting doesn’t tap the Choose button :/
    func test_fulfills_with_edited_image() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["2"].tap()
        tablesQuery.buttons["Moments"].tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 9:52 AM").elementBoundByIndex(0).tap()
        app.windows.childrenMatchingType(.Other).element.tap()

        XCTAssertTrue(value)
    }
#endif

    func test_fulfills_with_image() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["3"].tap()
        tablesQuery.childrenMatchingType(.Cell).elementBoundByIndex(0).childrenMatchingType(.TextField).element.tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 9:52 AM").elementBoundByIndex(0).tap()

        XCTAssertTrue(value)
    }

    func test_fulfills_with_data() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["4"].tap()
        tablesQuery.buttons["Moments"].tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 9:52 AM").elementBoundByIndex(0).tap()

        XCTAssertTrue(value)
    }<commit_msg>Update UIImagePickerController tests for iOS9<commit_after>import PromiseKit
import UIKit
import XCTest

class UITest_UIImagePickerController_Swift: PMKiOSUITestCase {
    func test_rejects_when_cancelled() {
        let app = XCUIApplication()
        let table = app.tables
        table.cells.staticTexts["1"].tap()
        table.cells.elementBoundByIndex(0).tap()
        app.navigationBars["Moments"].buttons["Cancel"].tap()

        XCTAssertTrue(value)
    }

#if false   // XCUITesting doesn’t tap the Choose button :/
    func test_fulfills_with_edited_image() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["2"].tap()
        tablesQuery.buttons["Moments"].tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 9:52 AM").elementBoundByIndex(0).tap()
        app.windows.childrenMatchingType(.Other).element.tap()

        XCTAssertTrue(value)
    }
#endif

    func test_fulfills_with_image() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["3"].tap()
        tablesQuery.childrenMatchingType(.Cell).elementBoundByIndex(0).tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 11:52 AM").elementBoundByIndex(0).tap()

        XCTAssertTrue(value)
    }

    func test_fulfills_with_data() {
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery.staticTexts["4"].tap()
        tablesQuery.buttons["Moments"].tap()
        app.collectionViews.childrenMatchingType(.Cell).matchingIdentifier("Photo, Landscape, August 08, 2012, 11:52 AM").elementBoundByIndex(0).tap()

        XCTAssertTrue(value)
    }
{'fraction_non_alphanumeric': 0.11661564152518787, 'fraction_numerical': 0.020873921514055108, 'mean_word_length': 3.470149253731343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2359597', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1038, 'n_words': 174}