From 3be3409496aa69375a177d0fbb7e72010ab5c8b4 Mon Sep 17 00:00:00 2001 From: chapplez Date: Thu, 7 Aug 2014 11:36:46 -0400 Subject: [PATCH] fix(typeahead): corrections for bugs #2293, #2535 --- src/typeahead/test/typeahead.spec.js | 6 +++--- template/typeahead/typeahead-popup.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/typeahead/test/typeahead.spec.js b/src/typeahead/test/typeahead.spec.js index efd02f552d..de9a385d3f 100644 --- a/src/typeahead/test/typeahead.spec.js +++ b/src/typeahead/test/typeahead.spec.js @@ -70,7 +70,7 @@ describe('typeahead tests', function () { this.message = function () { return 'Expected "' + angular.mock.dump(typeaheadEl) + '" to be closed.'; }; - return typeaheadEl.length === 0; + return typeaheadEl.hasClass('ng-hide') === true; }, toBeOpenWithActive: function (noOfMatches, activeIdx) { @@ -80,7 +80,7 @@ describe('typeahead tests', function () { this.message = function () { return 'Expected "' + this.actual + '" to be opened.'; }; - return typeaheadEl.length === 1 && liEls.length === noOfMatches && $(liEls[activeIdx]).hasClass('active'); + return typeaheadEl.length === 1 && typeaheadEl.hasClass('ng-hide') === false && liEls.length === noOfMatches && $(liEls[activeIdx]).hasClass('active'); } }); }); @@ -670,4 +670,4 @@ describe('typeahead tests', function () { }); }); -}); \ No newline at end of file +}); diff --git a/template/typeahead/typeahead-popup.html b/template/typeahead/typeahead-popup.html index 3ebce5b3f9..e1bd0c1c47 100644 --- a/template/typeahead/typeahead-popup.html +++ b/template/typeahead/typeahead-popup.html @@ -1,5 +1,5 @@ -