<commit_before>'use strict';

describe('Onix Bots Application', function() {

  describe('botList', function() {

    beforeEach(function() {
      browser.get('index.php');
    });

    it('should filter the bot list as a user types into the search box', function() {
      var botList = element.all(by.repeater('bot in $ctrl.bots'));
      var query = element(by.model('$ctrl.query'));

      expect(botList.count()).toBe(3);

      query.sendKeys('converter');
      expect(phoneList.count()).toBe(2);

      query.clear();
      query.sendKeys('portal');
      expect(phoneList.count()).toBe(1);
    });

  });

});<commit_msg>added functional tests<commit_after>'use strict';

describe('Onix Bots Application', function() {

  describe('botList', function() {

    beforeEach(function() {
      browser.get('index.php');
    });

    it('should filter the bot list as a user types into the search box', function() {
      var botList = element.all(by.repeater('bot in $ctrl.bots'));
      var query = element(by.model('$ctrl.query'));

      expect(botList.count()).toBe(3);

      query.sendKeys('converter');
      expect(botList.count()).toBe(2);

      query.clear();
      query.sendKeys('portal');
      expect(botList.count()).toBe(1);
    });

    it('should be possible to control bots order via the drop-down menu', function() {
        var queryField = element(by.model('$ctrl.query'));
        var orderSelect = element(by.model('$ctrl.orderProp'));
        var nameOption = orderSelect.element(by.css('option[value="name"]'));
        var botNameColumn = element.all(by.repeater('bot in $ctrl.bots').column('bot.name'));

        function getNames() {
            return botNameColumn.map(function(elem){
                return elem.getText();
            });
        }

        queryField.sendKeys('Portal'); // Let's narrow the dataset to make the assertions shorter

        expect(getNames()).toEqual([
            'Portal Cinema Kirovohrad for Telegram'
        ]);


    });

  });

});
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0029850746268656717, 'mean_word_length': 2.943137254901961, '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': '4295425', 'n_tokens_mistral': 602, 'n_tokens_neox': 578, 'n_words': 126}