<commit_before>//
//  Screenshots.swift
//  Screenshots
//
//  Created by <NAME> on 2017-07-02.
//  Copyright © 2017 breadwallet LLC. All rights reserved.
//

import XCTest

class Screenshots: XCTestCase {
        
    override func setUp() {
        super.setUp()
        
        // In UI tests it is usually best to stop immediately when a failure occurs.
        continueAfterFailure = false
        // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.

        let app = XCUIApplication()
        setupSnapshot(app)
        app.launch()
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // Use recording to get started writing UI tests.
        // Use XCTAssert and related functions to verify your tests produce the correct results.

        snapshot("2LockScreen")
        
        let app = XCUIApplication()
        let staticText = app.collectionViews.staticTexts["5"]
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        
        // go back to home screen if needed
        let backButton = app.navigationBars.buttons.element(boundBy: 0)
        if backButton.exists {
            backButton.tap()
        }
        
        snapshot("0HomeScreen")
        
        // tx list
        let tablesQuery = app.tables
        tablesQuery.staticTexts["Bitcoin"].tap()
        snapshot("1TxList")
        app.navigationBars.buttons.element(boundBy: 0).tap()
        
        // security center
        let currencyRows = 3
        tablesQuery.cells.element(boundBy: currencyRows + 1).tap()
        snapshot("3Security")
        app.scrollViews.otherElements.buttons["Close"].tap()
        
        // support
        tablesQuery.cells.element(boundBy: currencyRows + 2).tap()
        //snapshot("4Support") // TODO: this fails with "error getting main window"
    }
    
}<commit_msg>update screenshot script<commit_after>//
//  Screenshots.swift
//  Screenshots
//
//  Created by <NAME> on 2017-07-02.
//  Copyright © 2017 breadwallet LLC. All rights reserved.
//

import XCTest

class Screenshots: XCTestCase {
        
    override func setUp() {
        super.setUp()
        
        // In UI tests it is usually best to stop immediately when a failure occurs.
        continueAfterFailure = false
        // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.

        let app = XCUIApplication()
        setupSnapshot(app)
        app.launch()
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // Use recording to get started writing UI tests.
        // Use XCTAssert and related functions to verify your tests produce the correct results.

        snapshot("2LockScreen")
        
        let app = XCUIApplication()
        let staticText = app.collectionViews.staticTexts["5"]
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        staticText.tap()
        
        // go back to home screen if needed
        let backButton = app.navigationBars.buttons.element(boundBy: 0)
        if backButton.exists {
            backButton.tap()
        }
        
        snapshot("0HomeScreen")
        
        // tx list
        let tablesQuery = app.tables
        tablesQuery.staticTexts["Bitcoin"].tap()
        snapshot("1TxList")
        app.navigationBars.buttons.element(boundBy: 0).tap()
        
        enum Rows: Int {
            case bitcoin = 0
            case addWallet = 4 // number of currencies
            case settings
            case security
            case support
        }
        
        let security = Rows.security.rawValue
        
        tablesQuery.cells.element(boundBy: Rows.addWallet.rawValue).tap()
        snapshot("5AddWallet")
        app.navigationBars.buttons.element(boundBy: 0).tap()
        
        tablesQuery.cells.element(boundBy: Rows.security.rawValue).tap()
        snapshot("3Security")
        app.scrollViews.otherElements.buttons["Close"].tap()
        
        // support
        tablesQuery.cells.element(boundBy: Rows.support.rawValue).tap()
        //snapshot("4Support") // TODO: this fails with "error getting main window"
    }
    
}
{'fraction_non_alphanumeric': 0.09108402822322001, 'fraction_numerical': 0.010049176822749625, 'mean_word_length': 1.912826899128269, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5498561', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1243, 'n_words': 367}