Skip to content

Commit 34119d6

Browse files
committed
test(nav-drawer): subtract scroll height from window height
1 parent 437e56c commit 34119d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

projects/igniteui-angular/src/lib/navigation-drawer/navigation-drawer.component.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ describe('Navigation Drawer', () => {
284284
TestBed.overrideComponent(TestComponentPin, { set: { template } });
285285
TestBed.compileComponents()
286286
.then(() => {
287-
document.body.style.overflow = 'hidden';
288287
const fixture = TestBed.createComponent(TestComponentPin);
289288
fixture.detectChanges();
290289
const windowHeight = window.innerHeight;
@@ -293,7 +292,7 @@ describe('Navigation Drawer', () => {
293292

294293
fixture.componentInstance.pin = false;
295294
fixture.detectChanges();
296-
expect(navdrawer.clientHeight).toEqual(windowHeight);
295+
expect(navdrawer.clientHeight).toEqual(windowHeight - document.body.scrollHeight);
297296

298297
fixture.componentInstance.pin = true;
299298
fixture.detectChanges();

0 commit comments

Comments
 (0)