<commit_before>/*jslint indent: 2, nomen: true, maxlen: 100, white: true  plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect, jQuery, _, jqconsole, $*/
/*global arangoHelper, ace*/


(function() {
  "use strict";

  describe("The query view", function() {

    var view, div, div2, jQueryDummy;

    beforeEach(function() {
      window.App = {
        notificationList: {
          add: function() {
            throw "Should be a spy";
          }
        }
      };

      spyOn(window.App.notificationList, "add");
      
      div = document.createElement("div");
      div.id = "content";
      document.body.appendChild(div);

      view = new window.queryView({
      });

      window.modalView = new window.ModalView();

      spyOn(view, "getSystemQueries");

      view.render();
    });

    afterEach(function() {
      delete window.App;
      document.body.removeChild(div);
    });

    it("assert the basics", function () {
      var events = {
        "click #result-switch": "switchTab",
        "click #query-switch": "switchTab",
        'click #customs-switch': "switchTab",
        'click #submitQueryIcon': 'submitQuery',
        'click #submitQueryButton': 'submitQuery',
        'click #commentText': 'commentText',
        'click #uncommentText': 'uncommentText',
        'click #undoText': 'undoText',
        'click #redoText': 'redoText',
        'click #smallOutput': 'smallOutput',
        'click #bigOutput': 'bigOutput',
        'click #clearOutput': 'clearOutput',
        'click #clearInput': 'clearInput',
        'click #clearQueryButton': 'clearInput',
        'click #addAQL': 'addAQL',
        'change #querySelect': 'importSelected',
        'change #querySize': 'changeSize',
        'keypress #aqlEditor': 'aqlShortcuts',
        'click #arangoQueryTable .table-cell0': 'editCustomQuery',
        'click #arangoQueryTable .table-cell1': 'editCustomQuery',
        'click #arangoQueryTable .table-cell2 a': 'deleteAQL',
        'click #queryDiv .showHotkeyHelp' : 'shortcutModal'
      };
      expect(events).toEqual(view.events);
    });

    it("should execute all functions when view initializes", function () {
      spyOn(view, "getAQL");<commit_msg>fixed test spec<commit_after>/*jslint indent: 2, nomen: true, maxlen: 100, white: true  plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect, jQuery, _, jqconsole, $*/
/*global arangoHelper, ace*/


(function() {
  "use strict";

  describe("The query view", function() {

    var view, div, div2, jQueryDummy;

    beforeEach(function() {
      window.App = {
        notificationList: {
          add: function() {
            throw "Should be a spy";
          }
        }
      };

      spyOn(window.App.notificationList, "add");
      
      div = document.createElement("div");
      div.id = "content";
      document.body.appendChild(div);

      view = new window.queryView({
      });

      window.modalView = new window.ModalView();

      spyOn(view, "getSystemQueries");

      view.render();
    });

    afterEach(function() {
      delete window.App;
      document.body.removeChild(div);
    });

    it("assert the basics", function () {
      var events = {
        "click #result-switch": "switchTab",
        "click #query-switch": "switchTab",
        'click #customs-switch': "switchTab",
        'click #submitQueryIcon': 'submitQuery',
        'click #submitQueryButton': 'submitQuery',
        'click #commentText': 'commentText',
        'click #uncommentText': 'uncommentText',
        'click #undoText': 'undoText',
        'click #redoText': 'redoText',
        'click #smallOutput': 'smallOutput',
        'click #bigOutput': 'bigOutput',
        'click #clearOutput': 'clearOutput',
        'click #clearInput': 'clearInput',
        'click #clearQueryButton': 'clearInput',
        'click #addAQL': 'addAQL',
        'change #querySelect': 'importSelected',
        'change #querySize': 'changeSize',
        'keypress #aqlEditor': 'aqlShortcuts',
        'click #arangoQueryTable .table-cell0': 'editCustomQuery',
        'click #arangoQueryTable .table-cell1': 'editCustomQuery',
        'click #arangoQueryTable .table-cell2 a': 'deleteAQL'
      };
      expect(events).toEqual(view.events);
    });

    it("should execute all functions when view initializes", function () {
      spyOn(view, "getAQL");
{'fraction_non_alphanumeric': 0.15012434998869545, 'fraction_numerical': 0.0036174542165950713, 'mean_word_length': 2.7333333333333334, 'pattern_counts': {'":': 4, '<': 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': '933797', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1305, 'n_words': 307}