<commit_before>var specHelper = {};

specHelper.getDataLoadedFunction = function(page) {
    return function() {
        var reactElement = 'div[data-reactid=".0"]';

        // Wait for the first react element to render
        return page.find(reactElement).length;
    }
};

specHelper.expectToBeOnHomepage = function(page) {
    var actualText, actualTitle, expectedText, expectedTitle, headerSelector;

    headerSelector = 'p[data-reactid=".0.0.0"]';
    expectedText   = 'Please log in or register.';
    expectedTitle  = '@todo update with page title';
    actualText     = page.find(headerSelector).text();
    actualTitle    = page.find('title').text();

    expect(actualTitle).toEqual(expectedTitle);
    expect(actualText).toEqual(expectedText);
};

specHelper.clearLocalStorage = function() {
    if (localStorage) {
        localStorage.clear();
    }
};

specHelper.originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;

specHelper.resetJasmineTimeout = function() {
    jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
};

specHelper.setJasmineTimeout = function(timeout) {
    originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
    jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout;
};

window.specHelper = specHelper;<commit_msg>#52 | Updating spec helper<commit_after>var specHelper = {};

specHelper.getDataLoadedFunction = function(page) {
    return function() {
        var reactElement = 'div[data-reactid=".0"]';

        // Wait for the first react element to render
        return page.find(reactElement).length;
    }
};

specHelper.expectToBeOnHomepage = function(page) {
    var actualHeader, actualTitle, expectedHeader, expectedTitle, headerSelector;

    headerSelector = 'h1[data-reactid=".0.1.0"]';
    expectedHeader = 'Frontend Template';
    expectedTitle  = '@todo update with page title';
    actualHeader   = page.find(headerSelector).text();
    actualTitle    = page.find('title').text();

    expect(actualTitle).toEqual(expectedTitle);
    expect(actualHeader).toEqual(expectedHeader);
};

specHelper.clearLocalStorage = function() {
    if (localStorage) {
        localStorage.clear();
    }
};

specHelper.originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;

specHelper.resetJasmineTimeout = function() {
    jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
};

specHelper.setJasmineTimeout = function(timeout) {
    originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
    jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout;
};

window.specHelper = specHelper;
{'fraction_non_alphanumeric': 0.1172468987595038, 'fraction_numerical': 0.004401760704281713, 'mean_word_length': 4.2631578947368425, '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': '4304152', 'n_tokens_mistral': 731, 'n_tokens_neox': 720, 'n_words': 131}