follow links for multi-frames in viewport

This commit is contained in:
Shin'ya Ueoka 2017-10-15 21:59:37 +09:00
parent ac5354020e
commit 45b3b0510f
4 changed files with 42 additions and 13 deletions

View file

@ -8,7 +8,10 @@ describe('FollowComponent', () => {
});
it('returns visible links', () => {
let targets = FollowComponent.getTargetElements(window);
let targets = FollowComponent.getTargetElements(
window,
{ width: window.innerWidth, height: window.innerHeight },
{ x: 0, y: 0 });
expect(targets).to.have.lengthOf(3);
let ids = Array.prototype.map.call(targets, (e) => e.id);