1 | const noop = require('lodash/noop');
|
2 | export default class TestBackendImpl {
|
3 | constructor(manager) {
|
4 | this.didCallSetup = false;
|
5 | this.didCallTeardown = false;
|
6 | this.actions = manager.getActions();
|
7 | }
|
8 | setup() {
|
9 | this.didCallSetup = true;
|
10 | }
|
11 | teardown() {
|
12 | this.didCallTeardown = true;
|
13 | }
|
14 | connectDragSource() {
|
15 | return noop;
|
16 | }
|
17 | connectDragPreview() {
|
18 | return noop;
|
19 | }
|
20 | connectDropTarget() {
|
21 | return noop;
|
22 | }
|
23 | simulateBeginDrag(sourceIds, options) {
|
24 | this.actions.beginDrag(sourceIds, options);
|
25 | }
|
26 | simulatePublishDragSource() {
|
27 | this.actions.publishDragSource();
|
28 | }
|
29 | simulateHover(targetIds, options) {
|
30 | this.actions.hover(targetIds, options);
|
31 | }
|
32 | simulateDrop() {
|
33 | this.actions.drop();
|
34 | }
|
35 | simulateEndDrag() {
|
36 | this.actions.endDrag();
|
37 | }
|
38 | }
|