Skip to content

Commit

Permalink
Improved tests of offsetTrigger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Zak committed Nov 30, 2015
1 parent 3e6407e commit 99da005
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/acceptance/infinity-route-offset-trigger-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ module('Acceptance: Infinity Route - offset trigger', {

test('it should start loading more items when the scroll is on the very bottom ' +
'when triggerOffset is not set', assert => {
assert.expect(8);
visit('/test-scrollable');

andThen(() => {
var postList = find('ul');
var postList = find('ul');
var infinityLoader = find('.infinity-loader');

assert.equal(postList.find('li').length, 25, "Two items should be in the list");
Expand All @@ -73,13 +74,15 @@ test('it should start loading more items when the scroll is on the very bottom '
});
});
});
});

test('it should start loading more items before the scroll is on the very bottom ' +
'when triggerOffset is set', assert => {
assert.expect(8);
visit('/test-scrollable?triggerOffset=200');

andThen(() => {
var postList = find('ul');
var postList = find('ul');
var infinityLoader = find('.infinity-loader');

assert.equal(postList.find('li').length, 25, "Two items should be in the list");
Expand All @@ -101,5 +104,4 @@ test('it should start loading more items before the scroll is on the very bottom
});
});
});

});

0 comments on commit 99da005

Please sign in to comment.