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

Commit 1ccf727

Browse files
devversionThomasBurleson
authored andcommitted
fix(util): restore scrolling after test executed.
* The current test, was not restoring the scroll mask, which means, that we're not able to remove the scrollbars on the karma site. This broke some positioning tests for `feat/panel`. Closes #8206
1 parent 62c2da1 commit 1ccf727

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/util/util.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,14 @@ describe('util', function() {
214214
var element = angular.element('<div style="height: 2000px">');
215215
document.body.appendChild(element[0]);
216216

217-
$mdUtil.disableScrollAround(element);
217+
var enableScrolling = $mdUtil.disableScrollAround(element);
218218

219219
window.scrollTo(0, 1000);
220220

221221
expect(window.pageYOffset).toBe(0);
222222

223-
// Revert scroll
223+
// Restore the scrolling.
224+
enableScrolling();
224225
window.scrollTo(0, 0);
225226
document.body.removeChild(element[0]);
226227
}));

0 commit comments

Comments
 (0)