@eclipse-glsp/server 1.1.0-RC08 → 1.1.0-RC10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/launch/worker-server-launcher.js +2 -3
- package/lib/browser/launch/worker-server-launcher.js.map +1 -1
- package/lib/common/actions/action-dispatcher.js +2 -3
- package/lib/common/actions/action-dispatcher.js.map +1 -1
- package/lib/common/actions/action-handler-registry.js +4 -6
- package/lib/common/actions/action-handler-registry.js.map +1 -1
- package/lib/common/actions/client-action-handler.js +2 -3
- package/lib/common/actions/client-action-handler.js.map +1 -1
- package/lib/common/actions/global-action-provider.js +2 -3
- package/lib/common/actions/global-action-provider.js.map +1 -1
- package/lib/common/command/command-stack.js +2 -3
- package/lib/common/command/command-stack.js.map +1 -1
- package/lib/common/command/command.js +1 -1
- package/lib/common/command/command.js.map +1 -1
- package/lib/common/command/undo-redo-action-handler.js +2 -3
- package/lib/common/command/undo-redo-action-handler.js.map +1 -1
- package/lib/common/di/binding-target.d.ts.map +1 -1
- package/lib/common/di/binding-target.js +3 -2
- package/lib/common/di/binding-target.js.map +1 -1
- package/lib/common/di/glsp-module.js +2 -3
- package/lib/common/di/glsp-module.js.map +1 -1
- package/lib/common/di/server-module.js.map +1 -1
- package/lib/common/diagram/diagram-configuration.js +1 -1
- package/lib/common/diagram/diagram-configuration.js.map +1 -1
- package/lib/common/diagram/request-type-hints-action-handler.js +2 -3
- package/lib/common/diagram/request-type-hints-action-handler.js.map +1 -1
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -3
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -1
- package/lib/common/features/contextactions/command-palette-action-provider.js +2 -3
- package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -3
- package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
- package/lib/common/features/contextactions/context-menu-item-provider.js +2 -3
- package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
- package/lib/common/features/contextactions/request-context-actions-handler.js +2 -3
- package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -6
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
- package/lib/common/features/directediting/context-edit-validator-registry.js +2 -3
- package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
- package/lib/common/features/directediting/label-edit-validator.js +2 -3
- package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
- package/lib/common/features/directediting/request-edit-validation-handler.js +2 -3
- package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
- package/lib/common/features/layout/computed-bounds-action-handler.js +2 -3
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
- package/lib/common/features/layout/layout-operation-handler.js +2 -3
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
- package/lib/common/features/model/gmodel-factory.js +2 -3
- package/lib/common/features/model/gmodel-factory.js.map +1 -1
- package/lib/common/features/model/gmodel-index.js +2 -3
- package/lib/common/features/model/gmodel-index.js.map +1 -1
- package/lib/common/features/model/gmodel-serializer.js +2 -3
- package/lib/common/features/model/gmodel-serializer.js.map +1 -1
- package/lib/common/features/model/model-state.js +2 -3
- package/lib/common/features/model/model-state.js.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +2 -3
- package/lib/common/features/model/model-submission-handler.js.map +1 -1
- package/lib/common/features/model/request-model-action-handler.js +2 -3
- package/lib/common/features/model/request-model-action-handler.js.map +1 -1
- package/lib/common/features/model/save-model-action-handler.js +2 -3
- package/lib/common/features/model/save-model-action-handler.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -3
- package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-resolver.js +2 -3
- package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -3
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -1
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +2 -3
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -1
- package/lib/common/features/popup/request-popup-model-action-handler.js +2 -3
- package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -1
- package/lib/common/features/validation/request-markers-handler.js +2 -3
- package/lib/common/features/validation/request-markers-handler.js.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -3
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js +2 -3
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -3
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
- package/lib/common/gmodel/cut-operation-handler.js +2 -3
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.js +2 -3
- package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +2 -3
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js +2 -3
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.js +2 -3
- package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
- package/lib/common/gmodel/gmodel-operation-handler.js +1 -1
- package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.js +2 -3
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -3
- package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
- package/lib/common/launch/glsp-server-launcher.js +2 -3
- package/lib/common/launch/glsp-server-launcher.js.map +1 -1
- package/lib/common/launch/jsonrpc-server-launcher.js +2 -3
- package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -1
- package/lib/common/operations/compound-operation-handler.js +6 -12
- package/lib/common/operations/compound-operation-handler.js.map +1 -1
- package/lib/common/operations/create-operation-handler.js +1 -1
- package/lib/common/operations/create-operation-handler.js.map +1 -1
- package/lib/common/operations/operation-action-handler.js +2 -3
- package/lib/common/operations/operation-action-handler.js.map +1 -1
- package/lib/common/operations/operation-handler-registry.js +4 -6
- package/lib/common/operations/operation-handler-registry.js.map +1 -1
- package/lib/common/operations/operation-handler.js +2 -3
- package/lib/common/operations/operation-handler.js.map +1 -1
- package/lib/common/protocol/glsp-server.js +2 -3
- package/lib/common/protocol/glsp-server.js.map +1 -1
- package/lib/common/session/client-session-factory.js +2 -3
- package/lib/common/session/client-session-factory.js.map +1 -1
- package/lib/common/session/client-session-manager.js +2 -3
- package/lib/common/session/client-session-manager.js.map +1 -1
- package/lib/common/utils/args-util.js +2 -2
- package/lib/common/utils/args-util.js.map +1 -1
- package/lib/common/utils/console-logger.js +2 -3
- package/lib/common/utils/console-logger.js.map +1 -1
- package/lib/common/utils/logger.d.ts.map +1 -1
- package/lib/common/utils/logger.js +5 -5
- package/lib/common/utils/logger.js.map +1 -1
- package/lib/common/utils/registry.js +4 -6
- package/lib/common/utils/registry.js.map +1 -1
- package/lib/node/abstract-json-model-storage.js +2 -3
- package/lib/node/abstract-json-model-storage.js.map +1 -1
- package/lib/node/gmodel/gmodel-storage.js +2 -3
- package/lib/node/gmodel/gmodel-storage.js.map +1 -1
- package/lib/node/launch/socket-server-launcher.js +2 -3
- package/lib/node/launch/socket-server-launcher.js.map +1 -1
- package/lib/node/launch/websocket-server-launcher.js +2 -3
- package/lib/node/launch/websocket-server-launcher.js.map +1 -1
- package/package.json +7 -5
- package/src/common/di/binding-target.ts +1 -0
- package/src/common/utils/args-util.ts +1 -1
- package/src/common/utils/logger.ts +2 -1
- package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
- package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
- package/lib/common/actions/action-dispatcher.spec.js +0 -264
- package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
- package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
- package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
- package/lib/common/actions/action-handler-registry.spec.js +0 -50
- package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
- package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
- package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
- package/lib/common/actions/global-action-provider.spec.js +0 -70
- package/lib/common/actions/global-action-provider.spec.js.map +0 -1
- package/lib/common/command/command-stack.spec.d.ts +0 -2
- package/lib/common/command/command-stack.spec.d.ts.map +0 -1
- package/lib/common/command/command-stack.spec.js +0 -207
- package/lib/common/command/command-stack.spec.js.map +0 -1
- package/lib/common/command/command.spec.d.ts +0 -2
- package/lib/common/command/command.spec.d.ts.map +0 -1
- package/lib/common/command/command.spec.js +0 -86
- package/lib/common/command/command.spec.js.map +0 -1
- package/lib/common/command/recording-command.spec.d.ts +0 -17
- package/lib/common/command/recording-command.spec.d.ts.map +0 -1
- package/lib/common/command/recording-command.spec.js +0 -62
- package/lib/common/command/recording-command.spec.js.map +0 -1
- package/lib/common/di/binding-target.spec.d.ts +0 -2
- package/lib/common/di/binding-target.spec.d.ts.map +0 -1
- package/lib/common/di/binding-target.spec.js +0 -121
- package/lib/common/di/binding-target.spec.js.map +0 -1
- package/lib/common/di/multi-bindings.spec.d.ts +0 -2
- package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
- package/lib/common/di/multi-bindings.spec.js +0 -137
- package/lib/common/di/multi-bindings.spec.js.map +0 -1
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
- package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
- package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
- package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
- package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
- package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
- package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
- package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
- package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
- package/lib/common/operations/operation-handler-registry.spec.js +0 -50
- package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
- package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
- package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
- package/lib/common/protocol/glsp-server.spec.js +0 -132
- package/lib/common/protocol/glsp-server.spec.js.map +0 -1
- package/lib/common/session/client-session-factory.spec.d.ts +0 -2
- package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
- package/lib/common/session/client-session-factory.spec.js +0 -56
- package/lib/common/session/client-session-factory.spec.js.map +0 -1
- package/lib/common/session/client-session-manager.spec.d.ts +0 -2
- package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
- package/lib/common/session/client-session-manager.spec.js +0 -74
- package/lib/common/session/client-session-manager.spec.js.map +0 -1
- package/lib/common/test/mock-util.d.ts +0 -120
- package/lib/common/test/mock-util.d.ts.map +0 -1
- package/lib/common/test/mock-util.js +0 -216
- package/lib/common/test/mock-util.js.map +0 -1
- package/lib/common/utils/promise-queue.spec.d.ts +0 -2
- package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
- package/lib/common/utils/promise-queue.spec.js +0 -117
- package/lib/common/utils/promise-queue.spec.js.map +0 -1
- package/lib/common/utils/registry.spec.d.ts +0 -2
- package/lib/common/utils/registry.spec.d.ts.map +0 -1
- package/lib/common/utils/registry.spec.js +0 -199
- package/lib/common/utils/registry.spec.js.map +0 -1
- package/lib/node/launch/cli-parser.spec.d.ts +0 -2
- package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
- package/lib/node/launch/cli-parser.spec.js +0 -56
- package/lib/node/launch/cli-parser.spec.js.map +0 -1
- package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
- package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
- package/lib/node/launch/socket-cli-parser.spec.js +0 -66
- package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
- package/lib/node/launch/socket-server-launcher.spec.d.ts +0 -17
- package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
- package/lib/node/launch/socket-server-launcher.spec.js +0 -75
- package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
5
|
-
*
|
|
6
|
-
* This program and the accompanying materials are made available under the
|
|
7
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
-
*
|
|
10
|
-
* This Source Code may also be made available under the following Secondary
|
|
11
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
-
* with the GNU Classpath Exception which is available at
|
|
14
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
15
|
-
*
|
|
16
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
|
-
********************************************************************************/
|
|
18
|
-
const chai_1 = require("chai");
|
|
19
|
-
const inversify_1 = require("inversify");
|
|
20
|
-
const sinon = require("sinon");
|
|
21
|
-
const mock_util_1 = require("../test/mock-util");
|
|
22
|
-
const logger_1 = require("../utils/logger");
|
|
23
|
-
const command_stack_1 = require("./command-stack");
|
|
24
|
-
describe('test DefaultCommandStack', () => {
|
|
25
|
-
const sandbox = sinon.createSandbox();
|
|
26
|
-
const container = new inversify_1.Container();
|
|
27
|
-
const command1 = sandbox.stub(new mock_util_1.StubCommand());
|
|
28
|
-
const command2 = sandbox.stub(new mock_util_1.StubCommand());
|
|
29
|
-
let commandStack;
|
|
30
|
-
container.load(new inversify_1.ContainerModule(bind => {
|
|
31
|
-
bind(logger_1.Logger).toConstantValue(new mock_util_1.StubLogger());
|
|
32
|
-
}));
|
|
33
|
-
commandStack = container.resolve(command_stack_1.DefaultCommandStack);
|
|
34
|
-
afterEach(() => {
|
|
35
|
-
sandbox.reset();
|
|
36
|
-
commandStack = container.resolve(command_stack_1.DefaultCommandStack);
|
|
37
|
-
});
|
|
38
|
-
describe('execute', () => {
|
|
39
|
-
it('should execute the given command and become dirty', async () => {
|
|
40
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
41
|
-
await commandStack.execute(command1);
|
|
42
|
-
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
43
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
44
|
-
});
|
|
45
|
-
it('should execute the given commands in order and become dirty', async () => {
|
|
46
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
47
|
-
await commandStack.execute(command1);
|
|
48
|
-
await commandStack.execute(command2);
|
|
49
|
-
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
50
|
-
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
51
|
-
(0, chai_1.expect)(command2.execute.calledAfter(command1.execute)).to.be.true;
|
|
52
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
53
|
-
});
|
|
54
|
-
it('should be able to undo after execute', async () => {
|
|
55
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
56
|
-
await commandStack.execute(command1);
|
|
57
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
58
|
-
});
|
|
59
|
-
it('should clear the redo stack after execution', async () => {
|
|
60
|
-
commandStack['commands'].push(command2);
|
|
61
|
-
commandStack['top'] = -1;
|
|
62
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
63
|
-
await commandStack.execute(command1);
|
|
64
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
65
|
-
});
|
|
66
|
-
it('should flush the stack in case of an execution error', async () => {
|
|
67
|
-
command2.execute.throwsException();
|
|
68
|
-
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
69
|
-
await (0, mock_util_1.expectToThrowAsync)(() => commandStack.execute(command2));
|
|
70
|
-
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
71
|
-
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('undo', () => {
|
|
75
|
-
it('should do nothing if the command stack is empty', async () => {
|
|
76
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
77
|
-
await commandStack.undo();
|
|
78
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
79
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
80
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
81
|
-
});
|
|
82
|
-
it('should undo the command and become non-dirty again', async () => {
|
|
83
|
-
commandStack['commands'].push(command1);
|
|
84
|
-
commandStack['top'] = 0;
|
|
85
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
86
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
87
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
88
|
-
await commandStack.undo();
|
|
89
|
-
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
90
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
91
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
92
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
93
|
-
});
|
|
94
|
-
it('should undo multiple command and become non-dirty again', async () => {
|
|
95
|
-
commandStack['commands'].push(command1, command2);
|
|
96
|
-
commandStack['top'] = 1;
|
|
97
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
98
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
99
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
100
|
-
await commandStack.undo();
|
|
101
|
-
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
102
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
103
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
104
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
105
|
-
await commandStack.undo();
|
|
106
|
-
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
107
|
-
(0, chai_1.expect)(command1.undo.calledAfter(command2.undo)).to.be.true;
|
|
108
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
109
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
110
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
111
|
-
});
|
|
112
|
-
it('should flush the stack in case of an execution error', async () => {
|
|
113
|
-
command2.undo.throwsException();
|
|
114
|
-
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
115
|
-
commandStack['commands'].push(command2);
|
|
116
|
-
commandStack['top'] = 0;
|
|
117
|
-
await (0, mock_util_1.expectToThrowAsync)(() => commandStack.undo());
|
|
118
|
-
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
119
|
-
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
describe('redo', () => {
|
|
123
|
-
it('should do nothing if the command stack is empty', async () => {
|
|
124
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
125
|
-
await commandStack.redo();
|
|
126
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
127
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
128
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
129
|
-
});
|
|
130
|
-
it('should redo the command and become dirty again', async () => {
|
|
131
|
-
commandStack['commands'].push(command1);
|
|
132
|
-
commandStack['top'] = -1;
|
|
133
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
134
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
135
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
136
|
-
await commandStack.redo();
|
|
137
|
-
(0, chai_1.expect)(command1.redo.calledOnce).to.be.true;
|
|
138
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
139
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
140
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
141
|
-
});
|
|
142
|
-
it('should undo multiple command and become non-dirty again', async () => {
|
|
143
|
-
commandStack['commands'].push(command2, command1);
|
|
144
|
-
commandStack['top'] = -1;
|
|
145
|
-
commandStack['saveIndex'] = -1;
|
|
146
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
147
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
148
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
149
|
-
await commandStack.redo();
|
|
150
|
-
(0, chai_1.expect)(command2.redo.calledOnce).to.be.true;
|
|
151
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
152
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
153
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
154
|
-
await commandStack.redo();
|
|
155
|
-
(0, chai_1.expect)(command1.redo.calledOnce).to.be.true;
|
|
156
|
-
(0, chai_1.expect)(command1.redo.calledAfter(command2.redo)).to.be.true;
|
|
157
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
158
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
159
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
160
|
-
});
|
|
161
|
-
it('should flush the stack in case of an execution error', async () => {
|
|
162
|
-
command2.redo.throwsException();
|
|
163
|
-
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
164
|
-
commandStack['commands'].push(command2);
|
|
165
|
-
commandStack['top'] = -1;
|
|
166
|
-
await (0, mock_util_1.expectToThrowAsync)(() => commandStack.redo());
|
|
167
|
-
(0, chai_1.expect)(command2.redo.calledOnce).to.be.true;
|
|
168
|
-
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
169
|
-
});
|
|
170
|
-
it('should be able to undo after redo', async () => {
|
|
171
|
-
commandStack['commands'].push(command1);
|
|
172
|
-
commandStack['top'] = -1;
|
|
173
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
174
|
-
await commandStack.redo();
|
|
175
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
describe('flush', () => {
|
|
179
|
-
it('should reset the internal state of the command stack', () => {
|
|
180
|
-
commandStack['commands'].push(command1, command1);
|
|
181
|
-
commandStack['top'] = 0;
|
|
182
|
-
commandStack.flush();
|
|
183
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
184
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
185
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
describe('isSaveDone', () => {
|
|
189
|
-
it('should become non-dirty after execution', () => {
|
|
190
|
-
commandStack['commands'].push(command1);
|
|
191
|
-
commandStack['top'] = 0;
|
|
192
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
193
|
-
commandStack.saveIsDone();
|
|
194
|
-
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
195
|
-
});
|
|
196
|
-
it('should maintain undo/redo history after execution', () => {
|
|
197
|
-
commandStack['commands'].push(command1, command2);
|
|
198
|
-
commandStack['top'] = 0;
|
|
199
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
200
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
201
|
-
commandStack.saveIsDone();
|
|
202
|
-
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
203
|
-
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
//# sourceMappingURL=command-stack.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-stack.spec.js","sourceRoot":"","sources":["../../../src/common/command/command-stack.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,yCAAuD;AACvD,+BAA+B;AAC/B,iDAAgF;AAChF,4CAAyC;AACzC,mDAAsD;AAEtD,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAElC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAW,EAAE,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAW,EAAE,CAAC,CAAC;IACjD,IAAI,YAAiC,CAAC;IAEtC,SAAS,CAAC,IAAI,CACV,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;QACvB,IAAI,CAAC,eAAM,CAAC,CAAC,eAAe,CAAC,IAAI,sBAAU,EAAE,CAAC,CAAC;IACnD,CAAC,CAAC,CACL,CAAC;IACF,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,mCAAmB,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,mCAAmB,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;YAC/D,IAAA,aAAM,EAAC,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CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAClD,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,IAAA,aAAM,EAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC1C,IAAA,aAAM,EAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAE1C,YAAY,CAAC,UAAU,EAAE,CAAC;YAC1B,IAAA,aAAM,EAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC1C,IAAA,aAAM,EAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.spec.d.ts","sourceRoot":"","sources":["../../../src/common/command/command.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
5
|
-
*
|
|
6
|
-
* This program and the accompanying materials are made available under the
|
|
7
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
-
*
|
|
10
|
-
* This Source Code may also be made available under the following Secondary
|
|
11
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
-
* with the GNU Classpath Exception which is available at
|
|
14
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
15
|
-
*
|
|
16
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
|
-
********************************************************************************/
|
|
18
|
-
const chai_1 = require("chai");
|
|
19
|
-
const sinon = require("sinon");
|
|
20
|
-
const mock_util_1 = require("../test/mock-util");
|
|
21
|
-
const command_1 = require("./command");
|
|
22
|
-
describe('CompoundCommand', () => {
|
|
23
|
-
const sandbox = sinon.createSandbox();
|
|
24
|
-
const command1 = sandbox.stub(new mock_util_1.StubCommand());
|
|
25
|
-
const command2 = sandbox.stub(new mock_util_1.StubCommand());
|
|
26
|
-
const command3 = sandbox.stub(new mock_util_1.StubCommand());
|
|
27
|
-
const compoundCommand = new command_1.CompoundCommand(command1, command2, command3);
|
|
28
|
-
afterEach(() => {
|
|
29
|
-
sandbox.reset();
|
|
30
|
-
});
|
|
31
|
-
describe('execute', () => {
|
|
32
|
-
it('Should execute the subcommands in order', async () => {
|
|
33
|
-
await compoundCommand.execute();
|
|
34
|
-
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
35
|
-
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
36
|
-
(0, chai_1.expect)(command3.execute.calledOnce).to.be.true;
|
|
37
|
-
(0, chai_1.expect)(command1.execute.calledBefore(command2.execute)).to.be.true;
|
|
38
|
-
(0, chai_1.expect)(command2.execute.calledBefore(command3.execute)).to.be.true;
|
|
39
|
-
});
|
|
40
|
-
it('Should undo partially executed subcommands in case of an error', async () => {
|
|
41
|
-
command3.execute.throwsException();
|
|
42
|
-
await (0, mock_util_1.expectToThrowAsync)(() => compoundCommand.execute());
|
|
43
|
-
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
44
|
-
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
45
|
-
(0, chai_1.expect)(command3.execute.calledOnce).to.be.true;
|
|
46
|
-
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
47
|
-
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
describe('undo', () => {
|
|
51
|
-
it('Should undo the subcommands in reverse order', async () => {
|
|
52
|
-
await compoundCommand.undo();
|
|
53
|
-
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
54
|
-
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
55
|
-
(0, chai_1.expect)(command3.undo.calledOnce).to.be.true;
|
|
56
|
-
(0, chai_1.expect)(command1.undo.calledAfter(command2.undo)).to.be.true;
|
|
57
|
-
(0, chai_1.expect)(command2.undo.calledAfter(command3.undo)).to.be.true;
|
|
58
|
-
});
|
|
59
|
-
it('Should redo partially undone subcommands in case of an error', async () => {
|
|
60
|
-
command1.undo.throwsException();
|
|
61
|
-
await (0, mock_util_1.expectToThrowAsync)(() => compoundCommand.undo());
|
|
62
|
-
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
63
|
-
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
64
|
-
(0, chai_1.expect)(command3.undo.calledOnce).to.be.true;
|
|
65
|
-
(0, chai_1.expect)(command3.redo.calledOnce).to.be.true;
|
|
66
|
-
(0, chai_1.expect)(command2.redo.calledOnce).to.be.true;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
describe('canUndo', () => {
|
|
70
|
-
it('should return true if all subcommands can be undone', () => {
|
|
71
|
-
var _a, _b, _c;
|
|
72
|
-
(_a = command1.canUndo) === null || _a === void 0 ? void 0 : _a.returns(true);
|
|
73
|
-
(_b = command2.canUndo) === null || _b === void 0 ? void 0 : _b.returns(true);
|
|
74
|
-
(_c = command3.canUndo) === null || _c === void 0 ? void 0 : _c.returns(true);
|
|
75
|
-
(0, chai_1.expect)(compoundCommand.canUndo()).to.be.true;
|
|
76
|
-
});
|
|
77
|
-
it('should return true if anyof the subcommands cannot be undone', () => {
|
|
78
|
-
var _a, _b, _c;
|
|
79
|
-
(_a = command1.canUndo) === null || _a === void 0 ? void 0 : _a.returns(true);
|
|
80
|
-
(_b = command2.canUndo) === null || _b === void 0 ? void 0 : _b.returns(false);
|
|
81
|
-
(_c = command3.canUndo) === null || _c === void 0 ? void 0 : _c.returns(true);
|
|
82
|
-
(0, chai_1.expect)(compoundCommand.canUndo()).to.be.true;
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
//# sourceMappingURL=command.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.spec.js","sourceRoot":"","sources":["../../../src/common/command/command.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,+BAA+B;AAC/B,iDAAoE;AACpE,uCAA4C;AAE5C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IAEtC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAW,EAAE,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAW,EAAE,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAW,EAAE,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,IAAI,yBAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAE1E,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,eAAe,CAAC,OAAO,EAAE,CAAC;YAChC,IAAA,aAAM,EAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC/C,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AC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC5C,IAAA,aAAM,EAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC5C,IAAA,aAAM,EAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAChD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;;YAC3D,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,IAAA,aAAM,EAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;;YACrE,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,KAAK,CAAC,CAAC;YACjC,MAAA,QAAQ,CAAC,OAAO,0CAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,IAAA,aAAM,EAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=recording-command.spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recording-command.spec.d.ts","sourceRoot":"","sources":["../../../src/common/command/recording-command.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
4
|
-
*
|
|
5
|
-
* This program and the accompanying materials are made available under the
|
|
6
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
*
|
|
9
|
-
* This Source Code may also be made available under the following Secondary
|
|
10
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
* with the GNU Classpath Exception which is available at
|
|
13
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
*
|
|
15
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
-
********************************************************************************/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const chai_1 = require("chai");
|
|
19
|
-
const recording_command_1 = require("./recording-command");
|
|
20
|
-
let jsonObject;
|
|
21
|
-
describe('RecordingCommand', () => {
|
|
22
|
-
let beforeState;
|
|
23
|
-
beforeEach(() => {
|
|
24
|
-
jsonObject = {
|
|
25
|
-
string: 'foo',
|
|
26
|
-
number: 0,
|
|
27
|
-
flag: true
|
|
28
|
-
};
|
|
29
|
-
beforeState = JSON.parse(JSON.stringify(jsonObject));
|
|
30
|
-
});
|
|
31
|
-
it('should be undoable after execution', async () => {
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
33
|
-
const command = new recording_command_1.RecordingCommand(jsonObject, () => { });
|
|
34
|
-
(0, chai_1.expect)(command.canUndo()).to.be.false;
|
|
35
|
-
await command.execute();
|
|
36
|
-
(0, chai_1.expect)(command.canUndo()).to.be.true;
|
|
37
|
-
});
|
|
38
|
-
it('should restore the pre execution state when undo is called', async () => {
|
|
39
|
-
const command = new recording_command_1.RecordingCommand(jsonObject, () => {
|
|
40
|
-
jsonObject.string = 'bar';
|
|
41
|
-
jsonObject.flag = false;
|
|
42
|
-
jsonObject.maybe = { hello: 'world' };
|
|
43
|
-
});
|
|
44
|
-
await command.execute();
|
|
45
|
-
(0, chai_1.expect)(jsonObject).to.not.be.deep.equals(beforeState);
|
|
46
|
-
await command.undo();
|
|
47
|
-
(0, chai_1.expect)(jsonObject).to.be.deep.equals(beforeState);
|
|
48
|
-
});
|
|
49
|
-
it('should restore the post execution state when redo is called', async () => {
|
|
50
|
-
const command = new recording_command_1.RecordingCommand(jsonObject, () => {
|
|
51
|
-
jsonObject.string = 'bar';
|
|
52
|
-
jsonObject.flag = false;
|
|
53
|
-
jsonObject.maybe = { hello: 'world' };
|
|
54
|
-
});
|
|
55
|
-
await command.execute();
|
|
56
|
-
const afterState = JSON.parse(JSON.stringify(jsonObject));
|
|
57
|
-
jsonObject = JSON.parse(JSON.stringify(afterState));
|
|
58
|
-
await command.redo();
|
|
59
|
-
(0, chai_1.expect)(jsonObject).to.be.deep.equals(afterState);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=recording-command.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recording-command.spec.js","sourceRoot":"","sources":["../../../src/common/command/recording-command.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAGlF,+BAA8B;AAC9B,2DAAuD;AASvD,IAAI,UAAqB,CAAC;AAE1B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,IAAI,WAAsB,CAAC;IAE3B,UAAU,CAAC,GAAG,EAAE;QACZ,UAAU,GAAG;YACT,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,IAAI;SACb,CAAC;QACF,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAChD,gEAAgE;QAChE,MAAM,OAAO,GAAG,IAAI,oCAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC3D,IAAA,aAAM,EAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QACtC,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,IAAA,aAAM,EAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QACxE,MAAM,OAAO,GAAG,IAAI,oCAAgB,CAAC,UAAU,EAAE,GAAG,EAAE;YAClD,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;YAC1B,UAAU,CA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.spec.d.ts","sourceRoot":"","sources":["../../../src/common/di/binding-target.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
5
|
-
*
|
|
6
|
-
* This program and the accompanying materials are made available under the
|
|
7
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
-
*
|
|
10
|
-
* This Source Code may also be made available under the following Secondary
|
|
11
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
-
* with the GNU Classpath Exception which is available at
|
|
14
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
15
|
-
*
|
|
16
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
|
-
********************************************************************************/
|
|
18
|
-
const chai_1 = require("chai");
|
|
19
|
-
const inversify_1 = require("inversify");
|
|
20
|
-
const sinon = require("sinon");
|
|
21
|
-
const binding_target_1 = require("./binding-target");
|
|
22
|
-
// Simple no op classes to construct inversify binding syntaxes.
|
|
23
|
-
class Target {
|
|
24
|
-
}
|
|
25
|
-
class SubTarget extends Target {
|
|
26
|
-
}
|
|
27
|
-
describe('BindingTarget', () => {
|
|
28
|
-
describe('bindTarget()', () => {
|
|
29
|
-
// Setup nested spies for the fluent inversify binding API
|
|
30
|
-
let context;
|
|
31
|
-
let toSyntax;
|
|
32
|
-
let whenOnSyntax;
|
|
33
|
-
const setupStubs = () => {
|
|
34
|
-
const container = new inversify_1.Container();
|
|
35
|
-
const bind = sinon.stub();
|
|
36
|
-
const isBound = sinon.stub();
|
|
37
|
-
let toSyntax = {};
|
|
38
|
-
let inWhenOnSyntax = {};
|
|
39
|
-
container.load(new inversify_1.ContainerModule(_bind => {
|
|
40
|
-
const toStub = _bind('StubMe');
|
|
41
|
-
inWhenOnSyntax = sinon.stub(toStub.to(Target));
|
|
42
|
-
whenOnSyntax = sinon.stub(toStub.toConstantValue(''));
|
|
43
|
-
toSyntax = sinon.stub(toStub);
|
|
44
|
-
bind.returns(toSyntax);
|
|
45
|
-
toSyntax.to.returns(inWhenOnSyntax);
|
|
46
|
-
toSyntax.toSelf.returns(inWhenOnSyntax);
|
|
47
|
-
toSyntax.toDynamicValue.returns(inWhenOnSyntax);
|
|
48
|
-
toSyntax.toService.returns();
|
|
49
|
-
}));
|
|
50
|
-
return {
|
|
51
|
-
context: { bind, isBound },
|
|
52
|
-
toSyntax,
|
|
53
|
-
inWhenOnSyntax,
|
|
54
|
-
whenOnSyntax
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
beforeEach(() => {
|
|
58
|
-
const stubs = setupStubs();
|
|
59
|
-
context = stubs.context;
|
|
60
|
-
toSyntax = stubs.toSyntax;
|
|
61
|
-
whenOnSyntax = stubs.whenOnSyntax;
|
|
62
|
-
});
|
|
63
|
-
describe('Bind to constructor', () => {
|
|
64
|
-
it('Should bind the service identifier `to` the given target with no scope', () => {
|
|
65
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, SubTarget);
|
|
66
|
-
(0, chai_1.expect)(toSyntax.to.calledOnceWith(SubTarget)).to.be.true;
|
|
67
|
-
});
|
|
68
|
-
it('Should bind the service identifier `toSelf` with no scope', () => {
|
|
69
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, Target);
|
|
70
|
-
(0, chai_1.expect)(toSyntax.toSelf.calledOnce).to.be.true;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
describe('Bind to service', () => {
|
|
74
|
-
it('Should bind the service identifier `service` using the given target service with no scope', () => {
|
|
75
|
-
context.isBound.returns(true);
|
|
76
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, { service: SubTarget });
|
|
77
|
-
(0, chai_1.expect)(toSyntax.toService.calledOnceWith(SubTarget)).to.be.true;
|
|
78
|
-
});
|
|
79
|
-
it('Should throw an error because the given target service is not bound', () => {
|
|
80
|
-
context.isBound.returns(false);
|
|
81
|
-
(0, chai_1.expect)(() => (0, binding_target_1.applyBindingTarget)(context, Target, { service: SubTarget, autoBind: false })).to.throw();
|
|
82
|
-
});
|
|
83
|
-
it('Should bind the unbound target service to itself before applying the toService binding', () => {
|
|
84
|
-
context.isBound.returns(false);
|
|
85
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, { service: SubTarget });
|
|
86
|
-
(0, chai_1.expect)(context.bind.calledWith(Target)).to.be.true;
|
|
87
|
-
});
|
|
88
|
-
it('The return syntax should be no op and invocation of a syntax function should throw an error', () => {
|
|
89
|
-
context.isBound.returns(true);
|
|
90
|
-
const syntax = (0, binding_target_1.applyBindingTarget)(context, Target, { service: SubTarget });
|
|
91
|
-
(0, chai_1.expect)(() => {
|
|
92
|
-
syntax.inRequestScope();
|
|
93
|
-
}).to.throw(`${Target.toString()} has been bound to 'service'.` +
|
|
94
|
-
"Using 'in','when' or 'on' bindings after" +
|
|
95
|
-
"a 'toService' binding is not possible.");
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
describe('Bind to constant value', () => {
|
|
99
|
-
it('Should bind the service identifier `toConstantValue` using the given target with no scope', () => {
|
|
100
|
-
const subTarget = new SubTarget();
|
|
101
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, { constantValue: subTarget });
|
|
102
|
-
(0, chai_1.expect)(toSyntax.toConstantValue.calledOnceWith(subTarget)).to.be.true;
|
|
103
|
-
});
|
|
104
|
-
it("The return syntax's in functions should be no op and invocation should log a warning", () => {
|
|
105
|
-
const spy = sinon.spy(console, 'warn');
|
|
106
|
-
const subTarget = new SubTarget();
|
|
107
|
-
const syntax = (0, binding_target_1.applyBindingTarget)(context, Target, { constantValue: subTarget });
|
|
108
|
-
syntax.inSingletonScope();
|
|
109
|
-
(0, chai_1.expect)(spy.calledWith(`${Target.toString()} has been bound to 'constantValue'. Binding in Singleton scope has no effect.` +
|
|
110
|
-
'Constant value bindings are effectively Singleton bindings.')).to.be.true;
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
describe('Bind to dynamic value', () => {
|
|
114
|
-
it('Should bind the service identifier `toDynamicValue` using the given factory function with no scope', () => {
|
|
115
|
-
(0, binding_target_1.applyBindingTarget)(context, Target, { dynamicValue: context => new SubTarget() });
|
|
116
|
-
(0, chai_1.expect)(toSyntax.toDynamicValue.calledOnce);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
//# sourceMappingURL=binding-target.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding-target.spec.js","sourceRoot":"","sources":["../../../src/common/di/binding-target.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,yCAAmE;AACnE,+BAA+B;AAC/B,qDAAsD;AACtD,gEAAgE;AAChE,MAAM,MAAM;CAAG;AAEf,MAAM,SAAU,SAAQ,MAAM;CAAG;AAEjC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;QAC1B,0DAA0D;QAC1D,IAAI,OAGH,CAAC;QACF,IAAI,QAAqE,CAAC;QAC1E,IAAI,YAA6E,CAAC;QAElF,MAAM,UAAU,GAAG,GAQjB,EAAE;YACA,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;YAClC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAA2F,CAAC;YACnH,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAmE,CAAC;YAE9F,IAAI,QAAQ,GAAgE,EAAS,CAAC;YACtF,IAAI,cAAc,GAAsE,EAAS,CAAC;YAClG,SAAS,CAAC,IAAI,CACV,IAAI,2BAAe,CAAC,KAAK,CAAC,EAAE;g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