Skip to content

Commit eab458f

Browse files
committed
Fix the unit tests after the recent changes.
1 parent 189c03e commit eab458f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/lib/core/overlay/position/global-position-strategy.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,17 @@ describe('GlobalPositonStrategy', () => {
163163

164164
flushMicrotasks();
165165

166-
expect(element.style.left).toBe('0px');
167-
expect(element.style.transform).toBe('');
166+
expect(element.style.marginLeft).toBe('0px');
167+
expect((element.parentNode as HTMLElement).style.justifyContent).toBe('flex-start');
168168
}));
169169

170170
it('should reset the vertical position and offset when the height is 100%', fakeAsync(() => {
171171
strategy.centerVertically().height('100%').apply(element);
172172

173173
flushMicrotasks();
174174

175-
expect(element.style.top).toBe('0px');
176-
expect(element.style.transform).toBe('');
175+
expect(element.style.marginTop).toBe('0px');
176+
expect((element.parentNode as HTMLElement).style.alignItems).toBe('flex-start');
177177
}));
178178
});
179179

src/lib/dialog/dialog.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('MdDialog', () => {
169169

170170
let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement;
171171

172-
expect(overlayPane.style.top).toBe('100px');
172+
expect(overlayPane.style.marginTop).toBe('100px');
173173
});
174174

175175
it('should should override the bottom offset of the overlay pane', () => {
@@ -183,7 +183,7 @@ describe('MdDialog', () => {
183183

184184
let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement;
185185

186-
expect(overlayPane.style.bottom).toBe('200px');
186+
expect(overlayPane.style.marginBottom).toBe('200px');
187187
});
188188

189189
it('should should override the left offset of the overlay pane', () => {
@@ -197,7 +197,7 @@ describe('MdDialog', () => {
197197

198198
let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement;
199199

200-
expect(overlayPane.style.left).toBe('250px');
200+
expect(overlayPane.style.marginLeft).toBe('250px');
201201
});
202202

203203
it('should should override the right offset of the overlay pane', () => {
@@ -211,7 +211,7 @@ describe('MdDialog', () => {
211211

212212
let overlayPane = overlayContainerElement.querySelector('.md-overlay-pane') as HTMLElement;
213213

214-
expect(overlayPane.style.right).toBe('125px');
214+
expect(overlayPane.style.marginRight).toBe('125px');
215215
});
216216

217217
describe('disableClose option', () => {

0 commit comments

Comments
 (0)