<commit_before>//
//  UITests.swift
//  UITests
//
//  Copyright © 2016 IRCCloud, Ltd. All rights reserved.
//

import Foundation
import XCTest

let SCREENSHOT_DELAY:UInt32 = 2;

class UITests: XCTestCase {


override func setUp() {
    super.setUp()
    XCUIDevice().orientation = UIDeviceOrientation.Portrait
}

func takeScreenshotTheme(theme: String, mono: Bool = false) {
    let app = XCUIApplication()
    app.launchArguments = ["-theme", theme]
    if (mono) {
        app.launchArguments += ["-mono"]
    }
    setupSnapshot(app)
    app.launch()
    
//    let window = app.windows.elementBoundByIndex(0)
//    
//    if (
//        theme == "dawn" ||
//        window.horizontalSizeClass == .Compact
//    ) {
        sleep(SCREENSHOT_DELAY)
        snapshot(String(format: "%@-Portrait", theme), waitForLoadingIndicator: false)
//    }
    XCUIDevice().orientation = UIDeviceOrientation.LandscapeLeft;
//    if (
//        window.horizontalSizeClass == .Regular && (
//            theme == "dawn" ||
//            window.verticalSizeClass == .Regular
//        )
//    ) {
        sleep(SCREENSHOT_DELAY)
        snapshot(String(format: "%@-Landscape", theme), waitForLoadingIndicator: false)
//    }
}

func testAshScreenshots () {
    takeScreenshotTheme("ash", mono: true)
}
func testDawnScreenshots () {
    takeScreenshotTheme("dawn")
}
func testDuskScreenshots () {
    takeScreenshotTheme("dusk")
}

}<commit_msg>Generate less screenshots<commit_after>//
//  UITests.swift
//  UITests
//
//  Copyright © 2016 IRCCloud, Ltd. All rights reserved.
//

import Foundation
import XCTest

let SCREENSHOT_DELAY:UInt32 = 2;

class UITests: XCTestCase {


override func setUp() {
    super.setUp()
    XCUIDevice().orientation = UIDeviceOrientation.Portrait
}

func takeScreenshotTheme(theme: String, mono: Bool = false) {
    let app = XCUIApplication()
    app.launchArguments = ["-theme", theme]
    if (mono) {
        app.launchArguments += ["-mono"]
    }
    setupSnapshot(app)
    app.launch()
    
    if (theme == "dawn" || UIDevice().userInterfaceIdiom != .Pad) {
        sleep(SCREENSHOT_DELAY)
        snapshot(String(format: "%@-Portrait", theme), waitForLoadingIndicator: false)
    }
    if (theme == "dawn" && (UIDevice().userInterfaceIdiom == .Pad || UIScreen().nativeScale > 2.0)) {
        XCUIDevice().orientation = UIDeviceOrientation.LandscapeLeft;
        sleep(SCREENSHOT_DELAY)
        snapshot(String(format: "%@-Landscape", theme), waitForLoadingIndicator: false)
    }
}

func testAshScreenshots () {
    takeScreenshotTheme("ash", mono: true)
}
    
func testDawnScreenshots () {
    takeScreenshotTheme("dawn")
}
    
func testDuskScreenshots () {
    takeScreenshotTheme("dusk")
}

}
{'fraction_non_alphanumeric': 0.14028644876973925, 'fraction_numerical': 0.006243114212265883, 'mean_word_length': 3.0058823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4853109', 'n_tokens_mistral': 973, 'n_tokens_neox': 913, 'n_words': 169}