Skip to content

Commit

Permalink
getting tests ready
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed Jun 7, 2018
1 parent e6b1a64 commit d57cfd4
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions test/unit/state/bulk-replace/with-critical-replacement.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit d57cfd4

Please sign in to comment.