Skip to content

Commit 102356e

Browse files
committed
test(igxOverlay): adjust more failing test, #1685
1 parent a0f6d19 commit 102356e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/igniteui-angular/src/lib/services/overlay/overlay.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,10 @@ describe('igxOverlay', () => {
695695
const componentEl = overlayWrapper.children[0].children[0];
696696
const wrapperRect = overlayWrapper.getBoundingClientRect();
697697
const componentRect = componentEl.getBoundingClientRect();
698-
expect(wrapperRect.width / 2).toEqual(componentRect.left);
699-
expect(wrapperRect.height / 2).toEqual(componentRect.top);
698+
expect(componentRect.left).toBeLessThan(0);
699+
expect(wrapperRect.width / 2).toEqual(componentRect.left + componentRect.width / 2);
700+
expect(componentRect.top).toBeLessThan(0);
701+
expect(wrapperRect.height / 2).toEqual(componentRect.top + componentRect.height / 2);
700702
hasScrollbar = document.body.scrollHeight > document.body.clientHeight;
701703
expect(hasScrollbar).toBeTruthy();
702704
});

0 commit comments

Comments
 (0)