Browse Source

remove old tests

pull/563/head
David DeSandro 11 years ago
parent
commit
d5a663a3c0
  1. 133
      test/basic-layout.js
  2. 16
      test/gutter.js
  3. 14
      test/helpers.js
  4. 58
      test/stamp.js

133
test/basic-layout.js

@ -1,133 +0,0 @@
( function() {
'use strict';
test( 'basic layout top left', function() {
var container = document.querySelector('#basic-layout-top-left');
var msnry = new Masonry( container, {
columnWidth: 60
});
checkItemPositions( msnry, {
0: {
left: 0,
top: 0
},
1: {
left: 60,
top: 0
},
2: {
left: 120,
top: 0
},
3: {
left: 0,
top: 30
},
4: {
left: 60,
top: 90
}
});
});
test( 'basic layout top right', function() {
var container = document.querySelector('#basic-layout-top-right');
var msnry = new Masonry( container, {
isOriginLeft: false,
columnWidth: 60
});
checkItemPositions( msnry, {
0: {
right: 0,
top: 0
},
1: {
right: 60,
top: 0
},
2: {
right: 120,
top: 0
},
3: {
right: 0,
top: 30
},
4: {
right: 60,
top: 90
}
});
});
test( 'basic layout bottom left', function() {
var container = document.querySelector('#basic-layout-bottom-left');
var msnry = new Masonry( container, {
isOriginTop: false,
columnWidth: 60
});
checkItemPositions( msnry, {
0: {
left: 0,
bottom: 0
},
1: {
left: 60,
bottom: 0
},
2: {
left: 120,
bottom: 0
},
3: {
left: 0,
bottom: 30
},
4: {
left: 60,
bottom: 90
}
});
});
test( 'basic layout bottom right', function() {
var container = document.querySelector('#basic-layout-bottom-right');
var msnry = new Masonry( container, {
isOriginLeft: false,
isOriginTop: false,
columnWidth: 60
});
checkItemPositions( msnry, {
0: {
right: 0,
bottom: 0
},
1: {
right: 60,
bottom: 0
},
2: {
right: 120,
bottom: 0
},
3: {
right: 0,
bottom: 30
},
4: {
right: 60,
bottom: 90
}
});
});
})();

16
test/gutter.js

@ -1,16 +0,0 @@
test( 'gutter', function() {
var container = document.querySelector('#gutter');
var msnry = new Masonry( container, {
columnWidth: 60,
gutter: 20
});
checkItemPositions( msnry, {
0: { left: 0, top: 0 },
1: { left: 80, top: 0 },
2: { left: 160, top: 0 },
3: { left: 0, top: 30 }
});
});

14
test/helpers.js

@ -1,14 +0,0 @@
window.checkItemPositions = function( msnry, positions ) {
var i = 0;
var position = positions[i];
while ( position ) {
var style = msnry.items[i].element.style;
for ( var prop in position ) {
var value = position[ prop ] + 'px';
var message = 'item ' + i + ' ' + prop + ' = ' + value;
equal( style[ prop ], value, message );
}
i++;
position = positions[i];
}
};

58
test/stamp.js

@ -1,58 +0,0 @@
( function() {
'use strict';
test( 'stamp top left', function() {
var container = document.querySelector('#stamp-top-left');
var msnry = new Masonry( container, {
itemSelector: '.item',
stamp: '.stamp'
});
checkItemPositions( msnry, {
0: { left: 0, top: 20 },
1: { left: 135, top: 20 },
2: { left: 45, top: 40 },
3: { left: 90, top: 40 }
});
});
test( 'stamp top left', function() {
var container = document.querySelector('#stamp-top-left');
var msnry = new Masonry( container, {
itemSelector: '.item',
stamp: '.stamp'
});
checkItemPositions( msnry, {
0: { left: 0, top: 20 },
1: { left: 135, top: 20 },
2: { left: 45, top: 40 },
3: { left: 90, top: 40 }
});
});
test( 'stamp bottom right', function() {
var container = document.querySelector('#stamp-bottom-right');
var msnry = new Masonry( container, {
itemSelector: '.item',
stamp: '.stamp',
isOriginLeft: false,
isOriginTop: false
});
checkItemPositions( msnry, {
0: { right: 0, bottom: 20 },
1: { right: 135, bottom: 20 },
2: { right: 45, bottom: 40 },
3: { right: 90, bottom: 40 }
});
});
})();
Loading…
Cancel
Save