diff options
author | Lisa Junger <ljunger@thoughtworks.com> | 2015-03-25 09:54:17 +0100 |
---|---|---|
committer | Lisa Junger <ljunger@thoughtworks.com> | 2015-03-25 09:54:17 +0100 |
commit | 835f61a5a78af8a3c6e0431d44b673575d571327 (patch) | |
tree | ffabd59e51d45226515a09641ed7d956b4b1b710 /web-ui/test | |
parent | 520cd217ed34fc541c0234c6add78a093569a082 (diff) | |
parent | d9eaa6b9468dded7813e880291f5e4cc209ad0c6 (diff) |
Merge branch '192' of https://github.com/alabeduarte/pixelated-user-agent into alabeduarte-192
Diffstat (limited to 'web-ui/test')
-rw-r--r-- | web-ui/test/spec/search/results_highlighter.spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/test/spec/search/results_highlighter.spec.js b/web-ui/test/spec/search/results_highlighter.spec.js new file mode 100644 index 00000000..c65a042b --- /dev/null +++ b/web-ui/test/spec/search/results_highlighter.spec.js @@ -0,0 +1,20 @@ +describeComponent('search/results_highlighter', function () { + 'use strict'; + var self; + + beforeEach(function () { + self = this; + }); + + it('highlights only words that matches with the keywords given', function () { + self.setupComponent('<div id="text">Any one seeing too many open bugs</div>'); + + self.component.attr = {keywords: ["any"]}; + self.component.highlightResults(event, {where: '#text'}); + + var highlightedWords = self.component.$node.find('.search-highlight').length; + + expect(highlightedWords).toEqual(1); + }); + +}); |