From 4646e8b18d05e7b97db1857981baef5a23903db6 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 12 Oct 2017 21:18:52 +0900 Subject: fix follow for contenteditable --- test/content/components/follow.html | 5 ++++- test/content/components/follow.test.js | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'test/content/components') diff --git a/test/content/components/follow.html b/test/content/components/follow.html index 6bd8f87..eb0decd 100644 --- a/test/content/components/follow.html +++ b/test/content/components/follow.html @@ -1,9 +1,12 @@ - link + link invisible 1 invisible 2 not link +
link
+
link
+
link
diff --git a/test/content/components/follow.test.js b/test/content/components/follow.test.js index 9c00c79..5c3e1d5 100644 --- a/test/content/components/follow.test.js +++ b/test/content/components/follow.test.js @@ -8,8 +8,11 @@ describe('FollowComponent', () => { }); it('returns visible links', () => { - let links = FollowComponent.getTargetElements(window.document); - expect(links).to.have.lengthOf(1); + let targets = FollowComponent.getTargetElements(window.document); + expect(targets).to.have.lengthOf(3); + + let ids = Array.prototype.map.call(targets, (e) => e.id); + expect(ids).to.include.members(['visible_a', 'editable_div_1', 'editable_div_2']); }); }); }); -- cgit v1.2.3