"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const enzyme_1 = require("enzyme");
const enzyme_to_json_1 = require("enzyme-to-json");
const editor_1 = require("../../../editor");
const util_1 = require("../../../util");
const CoreTestActions_1 = require("../../testeditor/CoreTestActions");
const CoreTestContext_1 = require("../../testeditor/CoreTestContext");
const CoreTestProjection_1 = require("../../testeditor/CoreTestProjection");
const CoreTestNumberLiteralExpression_1 = require("../../testmodel/expressions/CoreTestNumberLiteralExpression");
const components_1 = require("../../../editor/components");
describe("ProjectionalEditor", () => {
    let props;
    let context;
    let editor;
    beforeEach(() => {
        util_1.PiLogger.muteAllLogs();
        context = new CoreTestContext_1.CoreTestContext(CoreTestNumberLiteralExpression_1.CoreTestNumberLiteralExpression.create("1"));
        const action = new CoreTestActions_1.CoreTestActions();
        const projection = new CoreTestProjection_1.CoreTestProjection();
        editor = new editor_1.PiEditor(projection, action);
        editor.rootElement = context.rootElement;
        const rootBox = projection.getBox(editor.rootElement);
        props = {
            editor: editor
        };
    });
    it("should render NumberLiteralExpression", () => {
        const component = enzyme_1.mount(React.createElement(components_1.ProjectionalEditor, Object.assign({}, props)));
    });
});
function toJson(component) {
    return enzyme_to_json_1.default(component, {
        noKey: true,
        mode: "deep"
    });
}
exports.toJson = toJson;
//# sourceMappingURL=ProjectionalEditor.spec.js.map