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 @@ -