|
2 | 2 | // manual testing before going into production is still advised!
|
3 | 3 | // the following features are implemented, but do not have specs yet:
|
4 | 4 |
|
5 |
| -// TODO: spec for $(elements).matchHeight({ property: 'min-height' }) |
6 | 5 | // TODO: spec for $(elements).matchHeight({ remove: true })
|
7 | 6 | // TODO: spec for events: ready, load, resize, orientationchange
|
8 | 7 | // TODO: spec for $.fn.matchHeight._groups
|
@@ -252,6 +251,27 @@ describe('matchHeight', function() {
|
252 | 251 | done();
|
253 | 252 | });
|
254 | 253 |
|
| 254 | + it('has applied the property option', function(done) { |
| 255 | + var $items = $('.property-items'), |
| 256 | + currentBreakpoint = testHelper.getCurrentBreakpoint(), |
| 257 | + _parse = $.fn.matchHeight._parse, |
| 258 | + item0Value = _parse($items.find('.item-0').css('min-height')), |
| 259 | + item1Value = _parse($items.find('.item-1').css('min-height')), |
| 260 | + item2Value = _parse($items.find('.item-2').css('min-height')), |
| 261 | + item3Value = _parse($items.find('.item-3').css('min-height')); |
| 262 | + |
| 263 | + if (currentBreakpoint === 'tablet') { |
| 264 | + expect(item0Value).toBeWithinTolerance(item1Value); |
| 265 | + expect(item3Value).toBeWithinTolerance(item2Value); |
| 266 | + } else if (currentBreakpoint === 'desktop') { |
| 267 | + expect(item0Value).toBeWithinTolerance(item1Value); |
| 268 | + expect(item2Value).toBeWithinTolerance(item1Value); |
| 269 | + expect(item3Value).toBeWithinTolerance(item1Value); |
| 270 | + } |
| 271 | + |
| 272 | + done(); |
| 273 | + }); |
| 274 | + |
255 | 275 | it('can manually update heights and fires global callbacks', function(done) {
|
256 | 276 | var currentBreakpoint = testHelper.getCurrentBreakpoint(),
|
257 | 277 | calledBefore = false,
|
|
0 commit comments