diff --git a/src/lib/core/overlay/position/global-position-strategy.spec.ts b/src/lib/core/overlay/position/global-position-strategy.spec.ts index 60508e724b90..acd0dc0f97e9 100644 --- a/src/lib/core/overlay/position/global-position-strategy.spec.ts +++ b/src/lib/core/overlay/position/global-position-strategy.spec.ts @@ -163,8 +163,8 @@ describe('GlobalPositonStrategy', () => { flushMicrotasks(); - expect(element.style.left).toBe('0px'); - expect(element.style.transform).toBe(''); + expect(element.style.marginLeft).toBe('0px'); + expect((element.parentNode as HTMLElement).style.justifyContent).toBe('flex-start'); })); it('should reset the vertical position and offset when the height is 100%', fakeAsync(() => { @@ -172,8 +172,8 @@ describe('GlobalPositonStrategy', () => { flushMicrotasks(); - expect(element.style.top).toBe('0px'); - expect(element.style.transform).toBe(''); + expect(element.style.marginTop).toBe('0px'); + expect((element.parentNode as HTMLElement).style.alignItems).toBe('flex-start'); })); }); diff --git a/src/lib/dialog/dialog.spec.ts b/src/lib/dialog/dialog.spec.ts index 6d2a43466ded..7b797627541e 100644 --- a/src/lib/dialog/dialog.spec.ts +++ b/src/lib/dialog/dialog.spec.ts @@ -169,7 +169,7 @@ describe('MdDialog', () => { let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement; - expect(overlayPane.style.top).toBe('100px'); + expect(overlayPane.style.marginTop).toBe('100px'); }); it('should should override the bottom offset of the overlay pane', () => { @@ -183,7 +183,7 @@ describe('MdDialog', () => { let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement; - expect(overlayPane.style.bottom).toBe('200px'); + expect(overlayPane.style.marginBottom).toBe('200px'); }); it('should should override the left offset of the overlay pane', () => { @@ -197,7 +197,7 @@ describe('MdDialog', () => { let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement; - expect(overlayPane.style.left).toBe('250px'); + expect(overlayPane.style.marginLeft).toBe('250px'); }); it('should should override the right offset of the overlay pane', () => { @@ -211,7 +211,7 @@ describe('MdDialog', () => { let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement; - expect(overlayPane.style.right).toBe('125px'); + expect(overlayPane.style.marginRight).toBe('125px'); }); describe('disableClose option', () => {