<commit_before>/* global protractor, describe, beforeEach, it, expect, browser, element, by */
'use strict';

describe('frontPage', function() {
    var ptor;

    beforeEach(function() {
        // Tell backend to reload the fixtures
        browser.get('test/e2e/bridge.html#/basic');

        // Go to the app
        // TODO: this completely reloads the angular app before every test, takes forever
        browser.get('app/index.html');
        ptor = protractor.getInstance();
    });

    it('should show the match score on the front page', function() {
        expect(element(by.css('.matchScoreDisplay')).isPresent()).toBe(true, 'has match score display');

        expect(element.all(by.css('.matchScoreDisplay .blueScore')).count()).toBe(4, 'four blue scores');
        expect(element.all(by.css('.matchScoreDisplay .greenScore')).count()).toBe(4, 'four green scores');

        // TODO: extend this
    });

    it('should show the intro tour on the front page', function() {
        ptor.sleep(500);
        expect(element(by.css('.tour-intro')).isPresent()).toBe(true, 'has tour-intro');
    });
});
<commit_msg>Adding e2e test for a proper front page.<commit_after>/* global protractor, describe, beforeEach, it, expect, browser, element, by */
'use strict';

describe('frontPage', function() {
    var ptor;

    beforeEach(function() {
        // Tell backend to reload the fixtures
        browser.get('test/e2e/bridge.html#/basic');

        // Go to the app
        // TODO: this completely reloads the angular app before every test, takes forever
        browser.get('app/index.html');
        ptor = protractor.getInstance();
    });

    it('should redirect to / when location hash is empty', function() {
        expect(ptor.getCurrentUrl()).toMatch(/#\/$/);
    });

    it('should have a register and login button', function() {
        expect(element(by.css('button.frontRegisterBtn')).isPresent()).toBe(true, 'has a register button');
        expect(element(by.css('button.frontLoginBtn')).isPresent()).toBe(true, 'has a login button');
    });

    it('should show the match score on the front page', function() {
        expect(element(by.css('.matchScoreDisplay')).isPresent()).toBe(true, 'has match score display');

        expect(element.all(by.css('.matchScoreDisplay .blueScore')).count()).toBe(4, 'four blue scores');
        expect(element.all(by.css('.matchScoreDisplay .greenScore')).count()).toBe(4, 'four green scores');

        // TODO: extend this
    });

    it('should show the intro tour on the front page', function() {
        ptor.sleep(500);
        expect(element(by.css('.tour-intro')).isPresent()).toBe(true, 'has tour-intro');
    });
});

{'fraction_non_alphanumeric': 0.1620919881305638, 'fraction_numerical': 0.004821958456973294, 'mean_word_length': 3.194401244167963, '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': '3681986', 'n_tokens_mistral': 775, 'n_tokens_neox': 749, 'n_words': 205}