Skip to content

Commit 4731cb4

Browse files
jelbourncrisbeto
authored andcommitted
wip debugging
1 parent 84e2496 commit 4731cb4

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/lib/autocomplete/autocomplete.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {Observable} from 'rxjs/Observable';
3232
import {Subject} from 'rxjs/Subject';
3333

3434

35-
fdescribe('MdAutocomplete', () => {
35+
describe('MdAutocomplete', () => {
3636
let overlayContainerElement: HTMLElement;
3737
let dir: Direction;
3838
let scrolledSubject = new Subject();

src/lib/menu/menu.spec.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -848,24 +848,30 @@ fdescribe('MdMenu', () => {
848848
expect(Math.round(triggerRect.top)).toBe(Math.round(panelRect.top) + MENU_PANEL_TOP_PADDING);
849849
});
850850

851-
it('should fall back to aligning to the right edge of the trigger in rtl', () => {
851+
fit('should fall back to aligning to the right edge of the trigger in rtl', fakeAsync(() => {
852852
dir = 'rtl';
853853
compileTestComponent();
854854
instance.rootTriggerEl.nativeElement.style.position = 'fixed';
855855
instance.rootTriggerEl.nativeElement.style.left = '10px';
856856
instance.rootTriggerEl.nativeElement.style.top = '50%';
857857
instance.rootTrigger.openMenu();
858858
fixture.detectChanges();
859+
tick(1000);
859860

860861
instance.levelOneTrigger.openMenu();
861862
fixture.detectChanges();
863+
tick(1000);
864+
865+
866+
fixture.detectChanges();
867+
tick(1000);
862868

863869
const triggerRect = overlay.querySelector('#level-one-trigger')!.getBoundingClientRect();
864870
const panelRect = overlay.querySelectorAll('.mat-menu-panel')[1].getBoundingClientRect();
865871

866872
expect(Math.round(triggerRect.right)).toBe(Math.round(panelRect.left));
867873
expect(Math.round(triggerRect.top)).toBe(Math.round(panelRect.top) + MENU_PANEL_TOP_PADDING);
868-
});
874+
}));
869875

870876
it('should close all of the menus when an item is clicked', fakeAsync(() => {
871877
compileTestComponent();
@@ -974,7 +980,7 @@ fdescribe('MdMenu', () => {
974980
.not.toContain('mat-elevation-z3', 'Expected no stacked elevation.');
975981
});
976982

977-
it('should close all of the menus when the root is closed programmatically', () => {
983+
it('should close all of the menus when the root is closed programmatically', fakeAsync(() => {
978984
compileTestComponent();
979985
instance.rootTrigger.openMenu();
980986
fixture.detectChanges();
@@ -991,9 +997,10 @@ fdescribe('MdMenu', () => {
991997

992998
instance.rootTrigger.closeMenu();
993999
fixture.detectChanges();
1000+
tick(500);
9941001

9951002
expect(overlay.querySelectorAll('.mat-menu-panel').length).toBe(0, 'Expected no open menus');
996-
});
1003+
}));
9971004

9981005
it('should toggle a nested menu when its trigger is added after init', fakeAsync(() => {
9991006
compileTestComponent();

src/lib/select/select.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
import {extendObject} from '../core/util/object-extend';
4343

4444

45-
fdescribe('MdSelect', () => {
45+
describe('MdSelect', () => {
4646
let overlayContainerElement: HTMLElement;
4747
let dir: {value: 'ltr'|'rtl'};
4848
let scrolledSubject = new Subject();

0 commit comments

Comments
 (0)