From d57cfd4d5a5f70b1f3e322c0f550c1d9b0bb7808 Mon Sep 17 00:00:00 2001 From: Alex Reardon Date: Thu, 7 Jun 2018 14:00:30 +1000 Subject: [PATCH] getting tests ready --- .../with-critical-replacement.spec.js | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/test/unit/state/bulk-replace/with-critical-replacement.spec.js b/test/unit/state/bulk-replace/with-critical-replacement.spec.js index fb00185a24..84400981e2 100644 --- a/test/unit/state/bulk-replace/with-critical-replacement.spec.js +++ b/test/unit/state/bulk-replace/with-critical-replacement.spec.js @@ -4,11 +4,42 @@ import type { } from '../../../../src/types'; import * as state from '../../../utils/state-preset'; -it('should adjust the positions based on any change between starting center positions', () => { - // - dragging inHome2 - // - removing inHome1 - // The absolute x/y client position of the dragging item should not change - const original: BulkCollectionState = state.bulkCollecting(); +describe('addition before dragging item', () => { + it('should adjust the positions based on any change between starting center positions', () => { + // Setup + // - dragging inHome1 + // - item added before inHome1 + // Result + // - inHome1 stays in the same visual spot + // - inHome1 stays in index 0 + // - the addition is displaced + // The absolute x/y client position of the dragging item should not change + const original: BulkCollectionState = state.bulkCollecting(); + }); + + it('should adjust the home impact', () => { + // Setup + // - dragging inHome1 and still in home position + // - an item is added to the start of the list + // Result: + // - inHome1 will still be at index 0 + // - the added item needs to move forward + }); + + it('should adjust an impact with displacement', () => { + // Setup + // - dragging inHome1 + // - inHome1 moved forward into index 1. inHome2 has moved backwards + // - an item is added to the start of the list + // Result: + // - inHome1 will still be at index 1 + // - the added item will be in index 0 and not displaced + // - inHome2 will be at index 2 and will no longer be displaced + }); +}); + +describe('removal before dragging item', () => { + }); it('should adjust the impact based on additions', () => {