Skip to content

Commit e8d95fc

Browse files
committed
fix test
1 parent 45b3c40 commit e8d95fc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/demo-app/tabs/tabs-demo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.md-tab-header {
1717
background: #f9f9f9;
1818
}
19-
.md-tab-body-content {
19+
.md-tab-body {
2020
padding: 12px;
2121
}
2222
}

src/lib/tabs/tab-group.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,19 @@ describe('MdTabGroup', () => {
123123
expect(testComponent.focusEvent.index).toBe(0);
124124
}));
125125

126-
it('should change tabs based on selectedIndex and update tab body positions', fakeAsync(() => {
126+
it('should change tabs based on selectedIndex', fakeAsync(() => {
127127
let component = fixture.componentInstance;
128128
let tabComponent = fixture.debugElement.query(By.css('md-tab-group')).componentInstance;
129-
spyOn(component, 'handleSelection').and.callThrough();
130129

131-
fixture.detectChanges();
130+
spyOn(component, 'handleSelection').and.callThrough();
132131

133132
checkSelectedIndex(1, fixture);
134133

135134
tabComponent.selectedIndex = 2;
136-
checkSelectedIndex(2, fixture);
137135

136+
checkSelectedIndex(2, fixture);
138137
tick();
138+
139139
expect(component.handleSelection).toHaveBeenCalledTimes(1);
140140
expect(component.selectEvent.index).toBe(2);
141141
}));
@@ -328,8 +328,8 @@ describe('MdTabGroup', () => {
328328
});
329329

330330
/**
331-
* Checks that the `selectedIndex` has been updated; checks that the label and body have the
332-
* `active` class
331+
* Checks that the `selectedIndex` has been updated; checks that the label and body have their
332+
* respective `active` classes
333333
*/
334334
function checkSelectedIndex(index: number, fixture: ComponentFixture<any>) {
335335
fixture.detectChanges();

0 commit comments

Comments
 (0)