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

(function () {
    "use strict";

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

        var model, view, div;

        beforeEach(function () {
            div = document.createElement("div");
            div.id = "content";
            document.body.appendChild(div);

            model = new window.arangoDocument({
                _key: "123",
                _id: "v/123",
                _rev: "123",
                name: "alice"
            });

            view = new window.DocumentView({
                collection: new window.arangoDocument()
            });

            view.collection.add(model);
            view.render();
        });

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

        it("assert the basics", function () {
            expect(view.colid).toEqual(0);
            expect(view.colid).toEqual(0);
            expect(view.events).toEqual({
                "click #saveDocumentButton": "saveDocument",
                "dblclick #documentEditor tr" : "addProperty"
            });
        });

        it("should copy a model into editor", function () {
            spyOn(view.editor, "set");
            view.fillEditor();
            expect(view.editor.set).toHaveBeenCalled();
        });

        it("should save type document", function () {<commit_msg>karma<commit_after>/*jslint indent: 2, nomen: true, maxlen: 100, white: true  plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global arangoHelper*/

(function () {
    "use strict";

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

        var model, view, div;

        beforeEach(function () {
            div = document.createElement("div");
            div.id = "content";
            document.body.appendChild(div);

            model = new window.arangoDocument({
                _key: "123",
                _id: "v/123",
                _rev: "123",
                name: "alice"
            });

            view = new window.DocumentView({
                collection: new window.arangoDocument()
            });

            view.collection.add(model);
            view.render();
        });

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

        it("assert the basics", function () {
            expect(view.colid).toEqual(0);
            expect(view.colid).toEqual(0);
            expect(view.events).toEqual({
                "click #saveDocumentButton": "saveDocument",
                "dblclick #documentEditor tr" : "addProperty",
                "click #tableDiv .showHotkeyHelp" : "shortcutModal"
            });
        });

        it("should copy a model into editor", function () {
            spyOn(view.editor, "set");
            view.fillEditor();
            expect(view.editor.set).toHaveBeenCalled();
        });

        it("should save type document", function () {
{'fraction_non_alphanumeric': 0.13620301959524575, 'fraction_numerical': 0.009637006103437198, 'mean_word_length': 1.719650655021834, 'pattern_counts': {'":': 2, '<': 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': '3313551', 'n_tokens_mistral': 860, 'n_tokens_neox': 812, 'n_words': 184}