<commit_before>    import XCTest

public struct elementStringIDs {
    // Demo Menu
    static var emptyDemo = "Empty Editor Demo"
    static var demo = "Editor Demo"

    // Text Fields
    static var titleTextField = "Title"
    static var richTextField = "richContentView"
    static var htmlTextField = "HTMLContentView"

    // Alerts
    static var insertLinkConfirmButton = "insertLinkButton"
    
    // Table cells
    static var unorderedListOption = "Unordered List"
    static var orderedListOption = "Ordered List"

    // Toolbar
    static var mediaButton = "formatToolbarInsertMedia"
    static var headerButton = "formatToolbarSelectParagraphStyle"
    static var boldButton = "formatToolbarToggleBold"
    static var italicButton = "formatToolbarToggleItalic"
    static var underlineButton = "formatToolbarToggleUnderline"
    static var strikethroughButton = "formatToolbarToggleStrikethrough"
    static var blockquoteButton = "formatToolbarToggleBlockquote"
    static var orderedlistButton = "formatToolbarToggleListOrdered"
    static var unorderedlistButton = "formatToolbarToggleListUnordered"
    static var linkButton = "formatToolbarInsertLink"
    static var horizontalrulerButton = "formatToolbarInsertHorizontalRuler"
    static var sourcecodeButton = "formatToolbarToggleHtmlView"
    static var moreButton = "formatToolbarInsertMore"
    static var header1Button = "Heading 1"
    static var header2Button = "Heading 2"
    static var header3Button = "Heading 3"
    static var header4Button = "Heading 4"
    static var header5Button = "Heading 5"
    static var header6Button = "Heading 6"
    
    // Menu items
    static var copyButton = "Copy"
    static var pasteButton = "Paste"
    
}

extension XCTest {
    /**
     Common method to type in different text fields
     */
    func typeToTextField(text: String, to: String) -> Void {
        let app = XCUIApplication()
        let textField = app.textViews[to]
        
        textField.typeText(text)
    }
    
    /**
     Enters text in the rich text field with auto-correction disabled
     - Parameter text: the test to enter into the field<commit_msg>XCTest+Extensions: Switching constants to let<commit_after>    import XCTest

public struct elementStringIDs {
    // Demo Menu
    static let emptyDemo = "Empty Editor Demo"
    static let demo = "Editor Demo"

    // Text Fields
    static let titleTextField = "Title"
    static let richTextField = "richContentView"
    static let htmlTextField = "HTMLContentView"

    // Alerts
    static let insertLinkConfirmButton = "insertLinkButton"
    
    // Table cells
    static let unorderedListOption = "Unordered List"
    static let orderedListOption = "Ordered List"

    // Toolbar
    static let mediaButton = "formatToolbarInsertMedia"
    static let headerButton = "formatToolbarSelectParagraphStyle"
    static let boldButton = "formatToolbarToggleBold"
    static let italicButton = "formatToolbarToggleItalic"
    static let underlineButton = "formatToolbarToggleUnderline"
    static let strikethroughButton = "formatToolbarToggleStrikethrough"
    static let blockquoteButton = "formatToolbarToggleBlockquote"
    static let orderedlistButton = "formatToolbarToggleListOrdered"
    static let unorderedlistButton = "formatToolbarToggleListUnordered"
    static let linkButton = "formatToolbarInsertLink"
    static let horizontalrulerButton = "formatToolbarInsertHorizontalRuler"
    static let sourcecodeButton = "formatToolbarToggleHtmlView"
    static let moreButton = "formatToolbarInsertMore"
    static let header1Button = "Heading 1"
    static let header2Button = "Heading 2"
    static let header3Button = "Heading 3"
    static let header4Button = "Heading 4"
    static let header5Button = "Heading 5"
    static let header6Button = "Heading 6"
    
    // Menu items
    static let copyButton = "Copy"
    static let pasteButton = "Paste"
    static let selectButton = "Select"
}

extension XCTest {
    /**
     Common method to type in different text fields
     */
    func typeToTextField(text: String, to: String) -> Void {
        let app = XCUIApplication()
        let textField = app.textViews[to]
        
        textField.typeText(text)
    }
    
    /**
     Enters text in the rich text field with auto-correction disabled
     - Parameter text: the test to enter into the field
{'fraction_non_alphanumeric': 0.06290027447392497, 'fraction_numerical': 0.0054894784995425435, 'mean_word_length': 3.439593908629442, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1876983', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1182, 'n_words': 377}