Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit a95d76d

Browse files
devversionThomasBurleson
authored andcommitted
fix(autocomplete): two specs leak the scroll mask element (#9568)
* chore(panel): fix failing unit test When running the panel tests separately from all the others, the one about disabling scrolling was failing. This wasn't happening when running it together with all the other components, because some other component (not sure exactly which one, but it seemed like either dialog or autocomplete) wasn't cleaning up the DOM properly and was leaving a scroll mask lying around. This change removes the DOM lookup for the scroll mask, because it looks like it got disabled in PR #8901, however the test didn't get updated. * fix(autocomplete): two specs leak the scroll mask element * The scroll mask was not removed by two specs of the autocomplete and could cause unexpected issues in other suites, when setting focus on those.
1 parent 857d3b8 commit a95d76d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/autocomplete/autocomplete.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ describe('<md-autocomplete>', function() {
914914
}));
915915

916916
it('removes the md-scroll-mask on cleanup', inject(function($mdUtil, $timeout, $material) {
917-
spyOn($mdUtil, 'enableScrolling');
917+
spyOn($mdUtil, 'enableScrolling').and.callThrough();
918918

919919
var scope = createScope();
920920
var template =
@@ -957,7 +957,7 @@ describe('<md-autocomplete>', function() {
957957
}));
958958

959959
it('removes the md-scroll-mask when md-autocomplete removed on change', inject(function($mdUtil, $timeout, $material) {
960-
spyOn($mdUtil, 'enableScrolling');
960+
spyOn($mdUtil, 'enableScrolling').and.callThrough();
961961

962962
var scope = createScope();
963963
var template =

0 commit comments

Comments
 (0)