Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
test(typeahead): clean-up after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Dec 26, 2013
1 parent beea4d0 commit 2f67550
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/typeahead/test/typeahead.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@ describe('typeahead tests', function () {
var liEls = findMatches(this.actual);

this.message = function () {
return "Expected '" + angular.mock.dump(this.actual) + "' to be opened.";
return "Expected '" + this.actual + "' to be opened.";
};
return typeaheadEl.css('display') === 'block' && liEls.length === noOfMatches && $(liEls[activeIdx]).hasClass('active');
}
});
});

afterEach(function () {
findDropDown($document.find('body')).remove();
});

//coarse grained, "integration" tests
describe('initial state and model changes', function () {

Expand Down Expand Up @@ -582,12 +586,11 @@ describe('typeahead tests', function () {

});

xdescribe('append to body', function () {
describe('append to body', function () {
it('append typeahead results to body', function () {
var element = prepareInputEl("<div><input ng-model='result' typeahead='item for item in source | filter:$viewValue' typeahead-append-to-body='true'></div>");
changeInputValueTo(element, 'ba');
expect($document.find('body')).toBeOpenWithActive(2, 0);

});
});

Expand Down

0 comments on commit 2f67550

Please sign in to comment.