| 64 | } |
| 65 | |
| 66 | const compareElementsLocation = (intiPositionView, lastPositionView) => { |
| 67 | const initElementPosiion = mapElements.get(intiPositionView); |
| 68 | const elementNewPosition = mapElementsNewPostion.get(lastPositionView); |
| 69 | chai.assert.isTrue(initElementPosiion.x === elementNewPosition.x, `Elements ${intiPositionView} and ${lastPositionView} are not on correct position!`); |
| 70 | chai.assert.isTrue(initElementPosiion.y === elementNewPosition.y, `Elements ${intiPositionView} and ${lastPositionView} are not on correct position!`); |
| 71 | } |
| 72 | |
| 73 | compareElementsLocation("view1", "view4"); |
| 74 | compareElementsLocation("view2", "view1"); |