<commit_before>'use strict';

describe('administration', function () {

    var username = element(by.id('username'));
    var password = element(by.id('password'));
    var accountMenu = element(by.id('account-menu'));
    var login = element(by.id('login'));
    var logout = element(by.id('logout'));

    beforeAll(function () {
        browser.get('/');
        browser.driver.wait(protractor.until.elementIsVisible(element(by.css('h1'))));

        accountMenu.click();
        login.click();

        username.sendKeys('admin');
        password.sendKeys('<PASSWORD>');
        element(by.css('button[type=submit]')).click();
    });

    beforeEach(function () {
        accountMenu.click();
    });

    it('should load user management', function () {
        element(by.css('[ui-sref="user-management"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Users/);
    });

    it('should load metrics', function () {
        element(by.css('[ui-sref="metrics"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Application Metrics/);
    });

    it('should load health', function () {
        element(by.css('[ui-sref="health"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Health Checks/);
    });

    it('should load configuration', function () {
        element(by.css('[ui-sref="configuration"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Configuration/);
    });

    it('should load audits', function () {
        element(by.css('[ui-sref="audits"]')).click();<commit_msg>improve protractor test<commit_after>'use strict';

describe('administration', function () {

    var username = element(by.id('username'));
    var password = element(by.id('password'));
    var accountMenu = element(by.id('account-menu'));
    var adminMenu = element(by.id('admin-menu'));
    var login = element(by.id('login'));
    var logout = element(by.id('logout'));

    beforeAll(function () {
        browser.get('/');
        browser.driver.wait(protractor.until.elementIsVisible(element(by.css('h1'))));

        accountMenu.click();
        login.click();

        username.sendKeys('admin');
        password.sendKeys('<PASSWORD>');
        element(by.css('button[type=submit]')).click();
    });

    beforeEach(function () {
        adminMenu.click();
    });

    it('should load user management', function () {
        element(by.css('[ui-sref="user-management"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Users/);
    });

    it('should load metrics', function () {
        element(by.css('[ui-sref="metrics"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Application Metrics/);
    });

    it('should load health', function () {
        element(by.css('[ui-sref="health"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Health Checks/);
    });

    it('should load configuration', function () {
        element(by.css('[ui-sref="configuration"]')).click();
        expect(element.all(by.css('h2')).first().getText()).toMatch(/Configuration/);
    });

    it('should load audits', function () {
        element(by.css('[ui-sref="audits"]')).click();
{'fraction_non_alphanumeric': 0.2192610539067232, 'fraction_numerical': 0.0030284675953967293, 'mean_word_length': 3.3864541832669324, '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': '5452855', 'n_tokens_mistral': 997, 'n_tokens_neox': 987, 'n_words': 126}