diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-16 21:48:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 21:48:41 +0900 |
commit | 33a97a0e8c18c099b23cd50a832242985837edca (patch) | |
tree | 73a15a1a39b41e0c42ea79a2d521d63865f83f06 /test | |
parent | 7ced514f83a69f557c19c1eb24ad792b3f2ace89 (diff) | |
parent | cf3a1eaf16d7dd5c71de57901415fb147793aa56 (diff) |
Merge pull request #61 from ueokande/multi-frame-following
Multi frame following
Diffstat (limited to 'test')
-rw-r--r-- | test/content/components/common/follow.html (renamed from test/content/components/follow.html) | 0 | ||||
-rw-r--r-- | test/content/components/common/follow.test.js (renamed from test/content/components/follow.test.js) | 9 | ||||
-rw-r--r-- | test/content/components/common/hint.html (renamed from test/content/hint.html) | 0 | ||||
-rw-r--r-- | test/content/components/common/hint.test.js (renamed from test/content/hint.test.js) | 4 |
4 files changed, 8 insertions, 5 deletions
diff --git a/test/content/components/follow.html b/test/content/components/common/follow.html index eb0decd..eb0decd 100644 --- a/test/content/components/follow.html +++ b/test/content/components/common/follow.html diff --git a/test/content/components/follow.test.js b/test/content/components/common/follow.test.js index 5c3e1d5..1fc935e 100644 --- a/test/content/components/follow.test.js +++ b/test/content/components/common/follow.test.js @@ -1,14 +1,17 @@ import { expect } from "chai"; -import FollowComponent from 'content/components/follow'; +import FollowComponent from 'content/components/common/follow'; describe('FollowComponent', () => { describe('#getTargetElements', () => { beforeEach(() => { - document.body.innerHTML = __html__['test/content/components/follow.html']; + document.body.innerHTML = __html__['test/content/components/common/follow.html']; }); it('returns visible links', () => { - let targets = FollowComponent.getTargetElements(window.document); + 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); diff --git a/test/content/hint.html b/test/content/components/common/hint.html index b50c5fe..b50c5fe 100644 --- a/test/content/hint.html +++ b/test/content/components/common/hint.html diff --git a/test/content/hint.test.js b/test/content/components/common/hint.test.js index 1547971..ced2fde 100644 --- a/test/content/hint.test.js +++ b/test/content/components/common/hint.test.js @@ -1,9 +1,9 @@ import { expect } from "chai"; -import Hint from 'content/hint'; +import Hint from 'content/components/common/hint'; describe('Hint class', () => { beforeEach(() => { - document.body.innerHTML = __html__['test/content/hint.html']; + document.body.innerHTML = __html__['test/content/components/common/hint.html']; }); describe('#constructor', () => { |