<commit_before>/*global describe,it,expect,$$,element,browser,by*/
describe('List filter', function () {
    'use strict';

    var hasToLoad = true;
    beforeEach(function() {
        if (hasToLoad) {
            browser.get(browser.baseUrl + '#/comments/list');
        }
        hasToLoad = true;
    });

    describe('layout', function() {
        it('should display pinned filters by default in the listview', function() {
            $$('.filters .filter input').then(function(inputs) {
                expect(inputs.length).toBe(1); // Only text filter is pinned
                expect(inputs[0].getAttribute('placeholder')).toBe('Search');
            });
            hasToLoad = false;
        });
        it('should display a filter button for adding new filters', function() {
            return $$('ma-view-actions button').then(function(buttons) {
                expect(buttons[0].getText()).toBe(' Add filter');
            });
        });
    });

    describe('filter button', function() {
        it('should display a list of filters when clicked', function() {
            element(by.css('ma-filter-button button')).click();
            $$('ma-filter-button ul').then(function(element) {
                expect(element[0].getCssValue('display')).toBe('block');
            });
            $$('ma-filter-button ul li').then(function(elements) {
                expect(elements.length).toBe(2);
                expect(elements[0].getText()).toBe('Posted');
                expect(elements[1].getText()).toBe('Post');
            });<commit_msg>Fix e2e tests<commit_after>/*global describe,it,expect,$$,element,browser,by*/
describe('List filter', function () {
    'use strict';

    var hasToLoad = true;
    beforeEach(function() {
        if (hasToLoad) {
            browser.get(browser.baseUrl + '#/comments/list');
        }
        hasToLoad = true;
    });

    describe('layout', function() {
        it('should display pinned filters by default in the listview', function() {
            $$('.filters .filter input').then(function(inputs) {
                expect(inputs.length).toBe(1); // Only text filter is pinned
                expect(inputs[0].getAttribute('placeholder')).toBe('Search');
            });
            hasToLoad = false;
        });
        it('should display a filter button for adding new filters', function() {
            return $$('ma-view-actions button').then(function(buttons) {
                expect(buttons[0].getText()).toBe(' Add filter ');
            });
        });
    });

    describe('filter button', function() {
        it('should display a list of filters when clicked', function() {
            element(by.css('ma-filter-button button')).click();
            $$('ma-filter-button ul').then(function(element) {
                expect(element[0].getCssValue('display')).toBe('block');
            });
            $$('ma-filter-button ul li').then(function(elements) {
                expect(elements.length).toBe(2);
                expect(elements[0].getText()).toBe('Posted');
                expect(elements[1].getText()).toBe('Post');
            });
{'fraction_non_alphanumeric': 0.1656539814518708, 'fraction_numerical': 0.004796929964822514, 'mean_word_length': 2.224742268041237, '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': '3389207', 'n_tokens_mistral': 814, 'n_tokens_neox': 795, 'n_words': 162}