<commit_before>var common = require("../common.js");
var EC = protractor.ExpectedConditions;

describe('overview component', function() {

    beforeEach(function(){
        browser.get('/#/resources');
    });

    it('should find it by its identifier', function() {
        common.createDoc("12")
            .then(typeInIdentifierInSearchField)
            .then(function(){
                expect(element(by.id('object-overview-identifier-0')).getText()).toEqual("12");
            });
    });

    it ('should show only resources of the selected type', function() {
        common.createDoc("1", 0)
            .then(common.createDoc("2", 1))
            .then(setTypeFilter(1))
            .then(function() {
                browser.wait(EC.presenceOf(element(by.id('resource-2'))), 1000);
                expect(element(by.id('resource-1')).isPresent()).toBe(false);
                expect(element(by.id('resource-2')).isPresent()).toBe(true);
            })
            .then(setTypeFilter(0))
            .then(function() {
                browser.wait(EC.presenceOf(element(by.id('resource-1'))), 1000);
                expect(element(by.id('resource-1')).isPresent()).toBe(true);
                expect(element(by.id('resource-2')).isPresent()).toBe(false);
            })<commit_msg>desperate attempt to fix e2e tests on build server<commit_after>var common = require("../common.js");
var EC = protractor.ExpectedConditions;

describe('overview component', function() {

    beforeEach(function(){
        browser.get('/#/resources');
    });

    it('should find it by its identifier', function() {
        common.createDoc("12")
            .then(typeInIdentifierInSearchField)
            .then(function(){
                expect(element(by.id('object-overview-identifier-0')).getText()).toEqual("12");
            });
    });

    it ('should show only resources of the selected type', function() {
        common.createDoc("1", 0)
            .then(common.createDoc("2", 1))
            .then(setTypeFilter(2))
            .then(setTypeFilter(1))
            .then(function() {
                browser.wait(EC.presenceOf(element(by.id('resource-2'))), 1000);
                expect(element(by.id('resource-1')).isPresent()).toBe(false);
                expect(element(by.id('resource-2')).isPresent()).toBe(true);
            })
            .then(setTypeFilter(0))
            .then(function() {
                browser.wait(EC.presenceOf(element(by.id('resource-1'))), 1000);
                expect(element(by.id('resource-1')).isPresent()).toBe(true);
                expect(element(by.id('resource-2')).isPresent()).toBe(false);
            })
{'fraction_non_alphanumeric': 0.17611716109650769, 'fraction_numerical': 0.01952684941794968, 'mean_word_length': 2.342534504391468, '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': '1756760', 'n_tokens_mistral': 776, 'n_tokens_neox': 734, 'n_words': 105}