Skip to content

Commit

Permalink
Fix the unit tests after the recent changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Dec 2, 2016
1 parent 189c03e commit eab458f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,17 @@ 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(() => {
strategy.centerVertically().height('100%').apply(element);

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');
}));
});

Expand Down
8 changes: 4 additions & 4 deletions src/lib/dialog/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand Down

0 comments on commit eab458f

Please sign in to comment.